Hey @dalu
From the SetObject example
type Person struct {
Uid string `json:"uid,omitempty"`
Name string `json:"name,omitempty"`
Age int `json:"age,omitempty"`
Dob *time.Time `json:"dob,omitempty"`
Married bool `json:"married,omitempty"`
}
The predicates would be name, age, dob, married. They are analogous to column names in a SQL DB.
For your example, you should have something like below in which case is_community would be a predicate.
type Community struct {
IsCommunity bool `json:"is_community"`
}
That depends on the kind of queries you want to perform. If you just wanted to retrieve them then you don’t need any indexes, on the other hand if you wanted to perform an eq query then you would need some index.
Internally, uid is stored as a uint64 but for the user its a string. You give us a string and we return a string.
No, you only set the value of uid when you want to update something. In other words, if the marshalled object has a uid field, we assume its an update otherwise we create a new node.