Documentation ¶
Index ¶
- Constants
- type Array_Data
- type EmbeddedDocument_Data
- type UserAggregate
- func (a *UserAggregate) Find(ctx context.Context, val []any) (err error)
- func (a *UserAggregate) FindOne(ctx context.Context, val interface{}) (err error)
- func (a *UserAggregate) Save(ctx context.Context) error
- func (a *UserAggregate) SetAllowDiskUse(b bool) *UserAggregate
- func (a *UserAggregate) SetBatchSize(i int32) *UserAggregate
- func (a *UserAggregate) SetBypassDocumentValidation(b bool) *UserAggregate
- func (a *UserAggregate) SetCollation(c *options.Collation) *UserAggregate
- func (a *UserAggregate) SetComment(s string) *UserAggregate
- func (a *UserAggregate) SetCustom(c bson.M) *UserAggregate
- func (a *UserAggregate) SetHint(h interface{}) *UserAggregate
- func (a *UserAggregate) SetLet(let interface{}) *UserAggregate
- func (a *UserAggregate) SetMaxAwaitTime(d time.Duration) *UserAggregate
- func (a *UserAggregate) SetMaxTime(d time.Duration) *UserAggregate
- func (a *UserAggregate) SetPipe(pipe aggregates.Pipe) *UserAggregate
- type UserClient
- func (c *UserClient) Aggregate() *UserAggregate
- func (c *UserClient) BulkWrite(ctx context.Context, mds []bulks.BulkModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
- func (c *UserClient) Clone(opts ...*options.CollectionOptions) (*mongo.Collection, error)
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) DBName(database string) *UserClient
- func (c *UserClient) Database() *mongo.Database
- func (c *UserClient) DeleteMany() *UserDeleteMany
- func (c *UserClient) DeleteOne() *UserDeleteOne
- func (c *UserClient) Drop(ctx context.Context) error
- func (c *UserClient) Indexes() mongo.IndexView
- func (c *UserClient) Name() string
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) ReplaceOne() *UserReplaceOne
- func (c *UserClient) UpdateMany() *UserUpdateMany
- func (c *UserClient) UpdateOne() *UserUpdateOne
- func (c *UserClient) UpdateOneID(id primitive.ObjectID) *UserUpdateOneID
- func (c *UserClient) Watch(ctx context.Context, pipeline watch.WatchPipe, ...) (*mongo.ChangeStream, error)
- type UserCreate
- type UserData
- type UserDeleteMany
- func (u *UserDeleteMany) Save(ctx context.Context) (*mongo.DeleteResult, error)
- func (u *UserDeleteMany) SetCollation(c *options.Collation) *UserDeleteMany
- func (u *UserDeleteMany) SetComment(comment interface{}) *UserDeleteMany
- func (u *UserDeleteMany) SetFilter(f filters.Filter) *UserDeleteMany
- func (u *UserDeleteMany) SetHint(h interface{}) *UserDeleteMany
- func (u *UserDeleteMany) SetLet(l interface{}) *UserDeleteMany
- type UserDeleteOne
- func (u *UserDeleteOne) Save(ctx context.Context) (*mongo.DeleteResult, error)
- func (u *UserDeleteOne) SetCollation(c *options.Collation) *UserDeleteOne
- func (u *UserDeleteOne) SetComment(comment interface{}) *UserDeleteOne
- func (u *UserDeleteOne) SetFilter(f filters.Filter) *UserDeleteOne
- func (u *UserDeleteOne) SetHint(h interface{}) *UserDeleteOne
- func (u *UserDeleteOne) SetLet(l interface{}) *UserDeleteOne
- type UserQuery
- func (q *UserQuery) CountDocuments(ctx context.Context, opts ...*options.CountOptions) (int64, error)
- func (q *UserQuery) Distinct(ctx context.Context, opts ...*options.DistinctOptions) ([]interface{}, error)
- func (q *UserQuery) EstimatedDocumentCount(ctx context.Context, opts ...*options.EstimatedDocumentCountOptions) (int64, error)
- func (q *UserQuery) Find(ctx context.Context, opts ...*options.FindOptions) (result []*UserData, err error)
- func (q *UserQuery) FindOne(ctx context.Context, opts ...*options.FindOneOptions) (result *UserData, err error)
- func (q *UserQuery) FindOneAndDelete(ctx context.Context, opts ...*options.FindOneAndDeleteOptions) (result *UserData, err error)
- func (q *UserQuery) FindOneAndReplace(ctx context.Context, opts ...*options.FindOneAndReplaceOptions) (result *UserData, err error)
- func (q *UserQuery) FindOneAndUpdate(ctx context.Context, opts ...*options.FindOneAndUpdateOptions) (result *UserData, err error)
- func (q *UserQuery) SetFieldName(replace *UserData) *UserQuery
- func (q *UserQuery) SetFilter(f filters.Filter) *UserQuery
- func (q *UserQuery) SetReplace(replace *UserData) *UserQuery
- func (q *UserQuery) SetUpdate(up updates.Update) *UserQuery
- type UserReplaceOne
- func (u *UserReplaceOne) Save(ctx context.Context) (*mongo.UpdateResult, error)
- func (u *UserReplaceOne) SetBypassDocumentValidation(b bool) *UserReplaceOne
- func (u *UserReplaceOne) SetCollation(c *options.Collation) *UserReplaceOne
- func (u *UserReplaceOne) SetComment(comment interface{}) *UserReplaceOne
- func (u *UserReplaceOne) SetFilter(f filters.Filter) *UserReplaceOne
- func (u *UserReplaceOne) SetHint(h interface{}) *UserReplaceOne
- func (u *UserReplaceOne) SetLet(l interface{}) *UserReplaceOne
- func (u *UserReplaceOne) SetReplace(replace *UserData) *UserReplaceOne
- func (u *UserReplaceOne) SetUpsert(b bool) *UserReplaceOne
- type UserUpdateMany
- func (u *UserUpdateMany) Save(ctx context.Context) (*mongo.UpdateResult, error)
- func (u *UserUpdateMany) SetArrayFilters(af options.ArrayFilters) *UserUpdateMany
- func (u *UserUpdateMany) SetBypassDocumentValidation(b bool) *UserUpdateMany
- func (u *UserUpdateMany) SetCollation(c *options.Collation) *UserUpdateMany
- func (u *UserUpdateMany) SetComment(comment interface{}) *UserUpdateMany
- func (u *UserUpdateMany) SetFilter(f filters.Filter) *UserUpdateMany
- func (u *UserUpdateMany) SetHint(h interface{}) *UserUpdateMany
- func (u *UserUpdateMany) SetLet(l interface{}) *UserUpdateMany
- func (u *UserUpdateMany) SetUpdate(up updates.Update) *UserUpdateMany
- func (u *UserUpdateMany) SetUpsert(b bool) *UserUpdateMany
- type UserUpdateOne
- func (u *UserUpdateOne) Save(ctx context.Context) (*mongo.UpdateResult, error)
- func (u *UserUpdateOne) SetArrayFilters(af options.ArrayFilters) *UserUpdateOne
- func (u *UserUpdateOne) SetBypassDocumentValidation(b bool) *UserUpdateOne
- func (u *UserUpdateOne) SetCollation(c *options.Collation) *UserUpdateOne
- func (u *UserUpdateOne) SetComment(comment interface{}) *UserUpdateOne
- func (u *UserUpdateOne) SetFilter(f filters.Filter) *UserUpdateOne
- func (u *UserUpdateOne) SetHint(h interface{}) *UserUpdateOne
- func (u *UserUpdateOne) SetLet(l interface{}) *UserUpdateOne
- func (u *UserUpdateOne) SetUpdate(up updates.Update) *UserUpdateOne
- func (u *UserUpdateOne) SetUpsert(b bool) *UserUpdateOne
- type UserUpdateOneID
- func (u *UserUpdateOneID) Save(ctx context.Context) (*mongo.UpdateResult, error)
- func (u *UserUpdateOneID) SetArrayFilters(af options.ArrayFilters) *UserUpdateOneID
- func (u *UserUpdateOneID) SetBypassDocumentValidation(b bool) *UserUpdateOneID
- func (u *UserUpdateOneID) SetCollation(c *options.Collation) *UserUpdateOneID
- func (u *UserUpdateOneID) SetComment(comment interface{}) *UserUpdateOneID
- func (u *UserUpdateOneID) SetHint(h interface{}) *UserUpdateOneID
- func (u *UserUpdateOneID) SetLet(l interface{}) *UserUpdateOneID
- func (u *UserUpdateOneID) SetUpdate(up updates.Update) *UserUpdateOneID
- func (u *UserUpdateOneID) SetUpsert(b bool) *UserUpdateOneID
Constants ¶
const ( DatabaseName = "db1" CollectionName = "user" FieldId = "_id" FieldUserName = "user_name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array_Data ¶
type Array_Data struct { Double float64 `bson:"double"` String string `bson:"string"` EmbeddedDocument *EmbeddedDocument_Data `bson:"embedded_document"` Array []*Array_Data `bson:"array"` Binary primitive.Binary `bson:"binary"` Boolean bool `bson:"boolean"` DateTime primitive.DateTime `bson:"date_time"` Regex primitive.Regex `bson:"regex"` JavaScript primitive.JavaScript `bson:"java_script"` Int32 int32 `bson:"int32"` Timestamp primitive.Timestamp `bson:"timestamp"` Int64 int64 `bson:"int64"` Decimal128 primitive.Decimal128 `bson:"decimal128"` }
type EmbeddedDocument_Data ¶
type EmbeddedDocument_Data struct { Double float64 `bson:"double"` String string `bson:"string"` EmbeddedDocument *EmbeddedDocument_Data `bson:"embedded_document"` Array []*Array_Data `bson:"array"` Binary primitive.Binary `bson:"binary"` Boolean bool `bson:"boolean"` DateTime primitive.DateTime `bson:"date_time"` Regex primitive.Regex `bson:"regex"` JavaScript primitive.JavaScript `bson:"java_script"` Int32 int32 `bson:"int32"` Timestamp primitive.Timestamp `bson:"timestamp"` Int64 int64 `bson:"int64"` Decimal128 primitive.Decimal128 `bson:"decimal128"` }
type UserAggregate ¶
type UserAggregate struct {
// contains filtered or unexported fields
}
func NewUserAggregate ¶
func NewUserAggregate(cc *mongo.Collection) *UserAggregate
func (*UserAggregate) Find ¶
func (a *UserAggregate) Find(ctx context.Context, val []any) (err error)
Find get result as slice
func (*UserAggregate) FindOne ¶
func (a *UserAggregate) FindOne(ctx context.Context, val interface{}) (err error)
FindOne get one data
func (*UserAggregate) Save ¶
func (a *UserAggregate) Save(ctx context.Context) error
Save only save result,such as: $out,$merge
func (*UserAggregate) SetAllowDiskUse ¶
func (a *UserAggregate) SetAllowDiskUse(b bool) *UserAggregate
SetAllowDiskUse sets the value for the AllowDiskUse field.
func (*UserAggregate) SetBatchSize ¶
func (a *UserAggregate) SetBatchSize(i int32) *UserAggregate
SetBatchSize sets the value for the BatchSize field.
func (*UserAggregate) SetBypassDocumentValidation ¶
func (a *UserAggregate) SetBypassDocumentValidation(b bool) *UserAggregate
SetBypassDocumentValidation sets the value for the BypassDocumentValidation field.
func (*UserAggregate) SetCollation ¶
func (a *UserAggregate) SetCollation(c *options.Collation) *UserAggregate
SetCollation sets the value for the Collation field.
func (*UserAggregate) SetComment ¶
func (a *UserAggregate) SetComment(s string) *UserAggregate
SetComment sets the value for the Comment field.
func (*UserAggregate) SetCustom ¶
func (a *UserAggregate) SetCustom(c bson.M) *UserAggregate
SetCustom sets the value for the Custom field. Key-value pairs of the BSON map should correlate with desired option names and values. Values must be Marshalable. Custom options may conflict with non-custom options, and custom options bypass client-side validation. Prefer using non-custom options where possible.
func (*UserAggregate) SetHint ¶
func (a *UserAggregate) SetHint(h interface{}) *UserAggregate
SetHint sets the value for the Hint field.
func (*UserAggregate) SetLet ¶
func (a *UserAggregate) SetLet(let interface{}) *UserAggregate
SetLet sets the value for the Let field.
func (*UserAggregate) SetMaxAwaitTime ¶
func (a *UserAggregate) SetMaxAwaitTime(d time.Duration) *UserAggregate
SetMaxAwaitTime sets the value for the MaxAwaitTime field.
func (*UserAggregate) SetMaxTime ¶
func (a *UserAggregate) SetMaxTime(d time.Duration) *UserAggregate
SetMaxTime sets the value for the MaxTime field.
NOTE(benjirewis): MaxTime will be deprecated in a future release. The more general Timeout option may be used in its place to control the amount of time that a single operation can run before returning an error. MaxTime is ignored if Timeout is set on the client.
func (*UserAggregate) SetPipe ¶
func (a *UserAggregate) SetPipe(pipe aggregates.Pipe) *UserAggregate
SetPipe set aggregate pipe
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
func NewUserClient ¶
func NewUserClient(db *mongo.Client) *UserClient
func (*UserClient) Aggregate ¶
func (c *UserClient) Aggregate() *UserAggregate
func (*UserClient) BulkWrite ¶
func (c *UserClient) BulkWrite(ctx context.Context, mds []bulks.BulkModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
func (*UserClient) Clone ¶
func (c *UserClient) Clone(opts ...*options.CollectionOptions) (*mongo.Collection, error)
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
func (*UserClient) DBName ¶
func (c *UserClient) DBName(database string) *UserClient
func (*UserClient) Database ¶
func (c *UserClient) Database() *mongo.Database
func (*UserClient) DeleteMany ¶
func (c *UserClient) DeleteMany() *UserDeleteMany
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne() *UserDeleteOne
func (*UserClient) Indexes ¶
func (c *UserClient) Indexes() mongo.IndexView
func (*UserClient) Name ¶
func (c *UserClient) Name() string
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
func (*UserClient) ReplaceOne ¶
func (c *UserClient) ReplaceOne() *UserReplaceOne
func (*UserClient) UpdateMany ¶
func (c *UserClient) UpdateMany() *UserUpdateMany
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne() *UserUpdateOne
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id primitive.ObjectID) *UserUpdateOneID
func (*UserClient) Watch ¶
func (c *UserClient) Watch(ctx context.Context, pipeline watch.WatchPipe, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
func NewUserCreate ¶
func NewUserCreate(cc *mongo.Collection) *UserCreate
func (*UserCreate) InsertMany ¶
func (q *UserCreate) InsertMany(ctx context.Context, docs []UserData, opts ...*options.InsertManyOptions) ([]UserData, error)
func (*UserCreate) InsertOne ¶
func (q *UserCreate) InsertOne(ctx context.Context, doc UserData, opts ...*options.InsertOneOptions) (*UserData, error)
type UserData ¶
type UserData struct { ID primitive.ObjectID `bson:"_id"` Double float64 `bson:"double"` String string `bson:"string"` EmbeddedDocument *EmbeddedDocument_Data `bson:"embedded_document"` Array []*Array_Data `bson:"array"` Binary primitive.Binary `bson:"binary"` Boolean bool `bson:"boolean"` DateTime primitive.DateTime `bson:"date_time"` Regex primitive.Regex `bson:"regex"` JavaScript primitive.JavaScript `bson:"java_script"` Int32 int32 `bson:"int32"` Timestamp primitive.Timestamp `bson:"timestamp"` Int64 int64 `bson:"int64"` Decimal128 primitive.Decimal128 `bson:"decimal128"` }
UserData .
type UserDeleteMany ¶
type UserDeleteMany struct {
// contains filtered or unexported fields
}
func NewUserDeleteMany ¶
func NewUserDeleteMany(cc *mongo.Collection) *UserDeleteMany
func (*UserDeleteMany) Save ¶
func (u *UserDeleteMany) Save(ctx context.Context) (*mongo.DeleteResult, error)
func (*UserDeleteMany) SetCollation ¶
func (u *UserDeleteMany) SetCollation(c *options.Collation) *UserDeleteMany
SetCollation sets the value for the Collation field.
func (*UserDeleteMany) SetComment ¶
func (u *UserDeleteMany) SetComment(comment interface{}) *UserDeleteMany
SetComment sets the value for the Comment field.
func (*UserDeleteMany) SetFilter ¶
func (u *UserDeleteMany) SetFilter(f filters.Filter) *UserDeleteMany
SetFilter set filter
func (*UserDeleteMany) SetHint ¶
func (u *UserDeleteMany) SetHint(h interface{}) *UserDeleteMany
SetHint sets the value for the Hint field.
func (*UserDeleteMany) SetLet ¶
func (u *UserDeleteMany) SetLet(l interface{}) *UserDeleteMany
SetLet sets the value for the Let field.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
func NewUserDeleteOne ¶
func NewUserDeleteOne(cc *mongo.Collection) *UserDeleteOne
func (*UserDeleteOne) Save ¶
func (u *UserDeleteOne) Save(ctx context.Context) (*mongo.DeleteResult, error)
func (*UserDeleteOne) SetCollation ¶
func (u *UserDeleteOne) SetCollation(c *options.Collation) *UserDeleteOne
SetCollation sets the value for the Collation field.
func (*UserDeleteOne) SetComment ¶
func (u *UserDeleteOne) SetComment(comment interface{}) *UserDeleteOne
SetComment sets the value for the Comment field.
func (*UserDeleteOne) SetFilter ¶
func (u *UserDeleteOne) SetFilter(f filters.Filter) *UserDeleteOne
SetFilter set filter
func (*UserDeleteOne) SetHint ¶
func (u *UserDeleteOne) SetHint(h interface{}) *UserDeleteOne
SetHint sets the value for the Hint field.
func (*UserDeleteOne) SetLet ¶
func (u *UserDeleteOne) SetLet(l interface{}) *UserDeleteOne
SetLet sets the value for the Let field.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
func NewUserQuery ¶
func NewUserQuery(cc *mongo.Collection) *UserQuery
func (*UserQuery) CountDocuments ¶
func (*UserQuery) EstimatedDocumentCount ¶
func (*UserQuery) FindOneAndDelete ¶
func (*UserQuery) FindOneAndReplace ¶
func (*UserQuery) FindOneAndUpdate ¶
func (*UserQuery) SetFieldName ¶
SetFieldName set distinct fieldName, use when Distinct
func (*UserQuery) SetReplace ¶
SetReplace set replace doc, use when FindOneAndReplace
type UserReplaceOne ¶
type UserReplaceOne struct {
// contains filtered or unexported fields
}
func NewUserReplaceOne ¶
func NewUserReplaceOne(cc *mongo.Collection) *UserReplaceOne
func (*UserReplaceOne) Save ¶
func (u *UserReplaceOne) Save(ctx context.Context) (*mongo.UpdateResult, error)
func (*UserReplaceOne) SetBypassDocumentValidation ¶
func (u *UserReplaceOne) SetBypassDocumentValidation(b bool) *UserReplaceOne
SetBypassDocumentValidation sets the value for the BypassDocumentValidation field.
func (*UserReplaceOne) SetCollation ¶
func (u *UserReplaceOne) SetCollation(c *options.Collation) *UserReplaceOne
SetCollation sets the value for the Collation field.
func (*UserReplaceOne) SetComment ¶
func (u *UserReplaceOne) SetComment(comment interface{}) *UserReplaceOne
SetComment sets the value for the Comment field.
func (*UserReplaceOne) SetFilter ¶
func (u *UserReplaceOne) SetFilter(f filters.Filter) *UserReplaceOne
SetFilter set filter
func (*UserReplaceOne) SetHint ¶
func (u *UserReplaceOne) SetHint(h interface{}) *UserReplaceOne
SetHint sets the value for the Hint field.
func (*UserReplaceOne) SetLet ¶
func (u *UserReplaceOne) SetLet(l interface{}) *UserReplaceOne
SetLet sets the value for the Let field.
func (*UserReplaceOne) SetReplace ¶
func (u *UserReplaceOne) SetReplace(replace *UserData) *UserReplaceOne
SetReplace set replace doc
func (*UserReplaceOne) SetUpsert ¶
func (u *UserReplaceOne) SetUpsert(b bool) *UserReplaceOne
SetUpsert sets the value for the Upsert field.
type UserUpdateMany ¶
type UserUpdateMany struct {
// contains filtered or unexported fields
}
func NewUserUpdateMany ¶
func NewUserUpdateMany(cc *mongo.Collection) *UserUpdateMany
func (*UserUpdateMany) Save ¶
func (u *UserUpdateMany) Save(ctx context.Context) (*mongo.UpdateResult, error)
func (*UserUpdateMany) SetArrayFilters ¶
func (u *UserUpdateMany) SetArrayFilters(af options.ArrayFilters) *UserUpdateMany
SetArrayFilters sets the value for the ArrayFilters field.
func (*UserUpdateMany) SetBypassDocumentValidation ¶
func (u *UserUpdateMany) SetBypassDocumentValidation(b bool) *UserUpdateMany
SetBypassDocumentValidation sets the value for the BypassDocumentValidation field.
func (*UserUpdateMany) SetCollation ¶
func (u *UserUpdateMany) SetCollation(c *options.Collation) *UserUpdateMany
SetCollation sets the value for the Collation field.
func (*UserUpdateMany) SetComment ¶
func (u *UserUpdateMany) SetComment(comment interface{}) *UserUpdateMany
SetComment sets the value for the Comment field.
func (*UserUpdateMany) SetFilter ¶
func (u *UserUpdateMany) SetFilter(f filters.Filter) *UserUpdateMany
SetFilter set filter
func (*UserUpdateMany) SetHint ¶
func (u *UserUpdateMany) SetHint(h interface{}) *UserUpdateMany
SetHint sets the value for the Hint field.
func (*UserUpdateMany) SetLet ¶
func (u *UserUpdateMany) SetLet(l interface{}) *UserUpdateMany
SetLet sets the value for the Let field.
func (*UserUpdateMany) SetUpdate ¶
func (u *UserUpdateMany) SetUpdate(up updates.Update) *UserUpdateMany
SetUpdate set update doc
func (*UserUpdateMany) SetUpsert ¶
func (u *UserUpdateMany) SetUpsert(b bool) *UserUpdateMany
SetUpsert sets the value for the Upsert field.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
func NewUserUpdateOne ¶
func NewUserUpdateOne(cc *mongo.Collection) *UserUpdateOne
func (*UserUpdateOne) Save ¶
func (u *UserUpdateOne) Save(ctx context.Context) (*mongo.UpdateResult, error)
func (*UserUpdateOne) SetArrayFilters ¶
func (u *UserUpdateOne) SetArrayFilters(af options.ArrayFilters) *UserUpdateOne
SetArrayFilters sets the value for the ArrayFilters field.
func (*UserUpdateOne) SetBypassDocumentValidation ¶
func (u *UserUpdateOne) SetBypassDocumentValidation(b bool) *UserUpdateOne
SetBypassDocumentValidation sets the value for the BypassDocumentValidation field.
func (*UserUpdateOne) SetCollation ¶
func (u *UserUpdateOne) SetCollation(c *options.Collation) *UserUpdateOne
SetCollation sets the value for the Collation field.
func (*UserUpdateOne) SetComment ¶
func (u *UserUpdateOne) SetComment(comment interface{}) *UserUpdateOne
SetComment sets the value for the Comment field.
func (*UserUpdateOne) SetFilter ¶
func (u *UserUpdateOne) SetFilter(f filters.Filter) *UserUpdateOne
SetFilter set filter
func (*UserUpdateOne) SetHint ¶
func (u *UserUpdateOne) SetHint(h interface{}) *UserUpdateOne
SetHint sets the value for the Hint field.
func (*UserUpdateOne) SetLet ¶
func (u *UserUpdateOne) SetLet(l interface{}) *UserUpdateOne
SetLet sets the value for the Let field.
func (*UserUpdateOne) SetUpdate ¶
func (u *UserUpdateOne) SetUpdate(up updates.Update) *UserUpdateOne
SetUpdate set update doc
func (*UserUpdateOne) SetUpsert ¶
func (u *UserUpdateOne) SetUpsert(b bool) *UserUpdateOne
SetUpsert sets the value for the Upsert field.
type UserUpdateOneID ¶
type UserUpdateOneID struct {
// contains filtered or unexported fields
}
func NewUserUpdateOneID ¶
func NewUserUpdateOneID(id primitive.ObjectID, cc *mongo.Collection) *UserUpdateOneID
func (*UserUpdateOneID) Save ¶
func (u *UserUpdateOneID) Save(ctx context.Context) (*mongo.UpdateResult, error)
func (*UserUpdateOneID) SetArrayFilters ¶
func (u *UserUpdateOneID) SetArrayFilters(af options.ArrayFilters) *UserUpdateOneID
SetArrayFilters sets the value for the ArrayFilters field.
func (*UserUpdateOneID) SetBypassDocumentValidation ¶
func (u *UserUpdateOneID) SetBypassDocumentValidation(b bool) *UserUpdateOneID
SetBypassDocumentValidation sets the value for the BypassDocumentValidation field.
func (*UserUpdateOneID) SetCollation ¶
func (u *UserUpdateOneID) SetCollation(c *options.Collation) *UserUpdateOneID
SetCollation sets the value for the Collation field.
func (*UserUpdateOneID) SetComment ¶
func (u *UserUpdateOneID) SetComment(comment interface{}) *UserUpdateOneID
SetComment sets the value for the Comment field.
func (*UserUpdateOneID) SetHint ¶
func (u *UserUpdateOneID) SetHint(h interface{}) *UserUpdateOneID
SetHint sets the value for the Hint field.
func (*UserUpdateOneID) SetLet ¶
func (u *UserUpdateOneID) SetLet(l interface{}) *UserUpdateOneID
SetLet sets the value for the Let field.
func (*UserUpdateOneID) SetUpdate ¶
func (u *UserUpdateOneID) SetUpdate(up updates.Update) *UserUpdateOneID
SetUpdate set update doc
func (*UserUpdateOneID) SetUpsert ¶
func (u *UserUpdateOneID) SetUpsert(b bool) *UserUpdateOneID
SetUpsert sets the value for the Upsert field.