Documentation ¶
Index ¶
- type CurrentDateType
- type Update
- func AddToSet(field string, value interface{}) Update
- func BitAND(field string, value int) Update
- func BitOR(field string, value int) Update
- func BitXOR(field string, value int) Update
- func CurrentDate(field string, typ CurrentDateType) Update
- func Increment(field string, amount float64) Update
- func Multiply(field string, amount float64) Update
- func PopFirst(field string) Update
- func PopLast(field string) Update
- func Push(field string, newItems []interface{}) Update
- func RemoveAll(field string, array []interface{}) Update
- func Rename(field string, newName string) Update
- func Set(field string, value interface{}) Update
- func SetIfGreater(field string, value interface{}) Update
- func SetIfLess(field string, value interface{}) Update
- func SetIfNew(field string, value interface{}) Update
- func Unset(field string) Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentDateType ¶
type CurrentDateType string
CurrentDateType for the CurrentDate update operator
const ( // Date as type for update operator Date CurrentDateType = "date" // Timestamp as type for update operator Timestamp CurrentDateType = "timestamp" )
type Update ¶
Update fields
func CurrentDate ¶
func CurrentDate(field string, typ CurrentDateType) Update
CurrentDate sets a certain field to the current date or timestamp
func SetIfGreater ¶
SetIfGreater operator updates only when current stored value is greater than the new value
func SetIfLess ¶
SetIfLess operator updates only when current stored value is less than the new value
Click to show internal directories.
Click to hide internal directories.