Skip to content
Snippets Groups Projects
Commit 158be1cf authored by ensiouel's avatar ensiouel
Browse files

добавлен метод для сравнения View

parent 003ed41e
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,14 @@ type View struct { ...@@ -86,6 +86,14 @@ type View struct {
Filter string `json:"filter" bson:"filter,omitempty"` // Правила фильтрации записей оригинальной коллекции Filter string `json:"filter" bson:"filter,omitempty"` // Правила фильтрации записей оригинальной коллекции
} }
func (v *View) Equal(v1 *View) bool {
return v == v1 || v != nil && v1 != nil &&
v.SpaceID == v1.SpaceID &&
v.EnvID == v1.EnvID &&
v.CollectionID == v1.CollectionID &&
v.Filter == v1.Filter
}
type StateInfo struct { type StateInfo struct {
State State `json:"state" bson:"state"` State State `json:"state" bson:"state"`
Info string `json:"info" bson:"info"` Info string `json:"info" bson:"info"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment