Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UpdateManyBuilder ¶
type UpdateManyBuilder struct {
// contains filtered or unexported fields
}
func NewUpdateManyBuilder ¶
func NewUpdateManyBuilder() *UpdateManyBuilder
func (*UpdateManyBuilder) Add ¶
func (u *UpdateManyBuilder) Add(operator string, values ...bson.E) *UpdateManyBuilder
Add creates a structure used for an UpdateMany command. The order in which command are provided are preserved. Example: u.Add(operator.Set, bson.E{Key: "name", "Asari"}).
Add(operator.Mul, bson.E{Key: "count", Value: 2}). Add(operator.Set, bson.E{Key: "email", "asari@gmail.com"})
Will result in {$set: {name: "Asari", email: "asari@gmail.com"}, $mul: {count: 2}}
func (*UpdateManyBuilder) Get ¶
func (u *UpdateManyBuilder) Get() bson.D
Get returns all the updateOperations. Test for empty value or use the HasValues() method to check if empty.
func (*UpdateManyBuilder) HasValues ¶
func (u *UpdateManyBuilder) HasValues() bool
HasValues checks if there are any values in updateOperations.
Click to show internal directories.
Click to hide internal directories.