Documentation ¶
Index ¶
- Variables
- type Addr
- type Bson
- type BulkWriteResult
- type DataType
- type Float
- type Index
- func (i *Index) Background() *Indexdeprecated
- func (i *Index) Bits(bits int32) *Index
- func (i *Index) BucketSize(bucketSize int32) *Index
- func (i *Index) Collation(collation *rawopts.Collation) *Index
- func (i *Index) DefaultLanguage(language string) *Index
- func (i *Index) ExpireAfterSeconds(seconds int32) *Index
- func (i *Index) Hidden() *Index
- func (i *Index) LanguageOverride(override string) *Index
- func (i *Index) Marshal() mongo.IndexModel
- func (i *Index) Max(max float64) *Index
- func (i *Index) Min(min float64) *Index
- func (i *Index) Name(name string) *Index
- func (i *Index) PartialFilterExpression(expression interface{}) *Index
- func (i *Index) Sparse() *Index
- func (i *Index) SphereVersion(version int32) *Index
- func (i *Index) StorageEngine(engine interface{}) *Index
- func (i *Index) TextVersion(version int32) *Index
- func (i *Index) Unique() *Index
- func (i *Index) Version(version int32) *Index
- func (i *Index) Weights(weights interface{}) *Index
- func (i *Index) WildcardProjection(wildcardProjection interface{}) *Index
- type Int
- type Number
- type Pair
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DataTypeDouble = &DataType{number: 1, alias: "double"} DataTypeString = &DataType{number: 2, alias: "string"} DataTypeObject = &DataType{number: 3, alias: "object"} DataTypeArray = &DataType{number: 4, alias: "array"} DataTypeBinaryData = &DataType{number: 5, alias: "binData"} DataTypeUndefined = &DataType{number: 6, alias: "undefined"} DataTypeObjectId = &DataType{number: 7, alias: "objectId"} DataTypeBool = &DataType{number: 8, alias: "bool"} DataTypeDate = &DataType{number: 9, alias: "date"} DataTypeNull = &DataType{number: 10, alias: "null"} DataTypeRegex = &DataType{number: 11, alias: "regex"} DataTypeDBPointer = &DataType{number: 12, alias: "dbPointer"} DataTypeJavascript = &DataType{number: 13, alias: "javascript"} DataTypeSymbol = &DataType{number: 14, alias: "symbol"} DataTypeJavascriptWithScope = &DataType{number: 15, alias: "javascriptWithScope"} DataTypeInt32 = &DataType{number: 16, alias: "int"} DataTypeTimestamp = &DataType{number: 17, alias: "timestamp"} DataTypeInt64 = &DataType{number: 18, alias: "long"} DataTypeDecimal128 = &DataType{number: 19, alias: "decimal"} DataTypeMinKey = &DataType{number: -1, alias: "minKey"} DataTypeMaxKey = &DataType{number: 127, alias: "maxKey"} )
Functions ¶
This section is empty.
Types ¶
type BulkWriteResult ¶ added in v0.0.21
type BulkWriteResult[I DocumentId] struct { // The number of documents inserted. InsertedCount int64 // The number of documents matched by filters in update and replace operations. MatchedCount int64 // The number of documents modified by update and replace operations. ModifiedCount int64 // The number of documents deleted. DeletedCount int64 // The number of documents upserted by update and replace operations. UpsertedCount int64 // A map of operation index to the _id of each upserted document. UpsertedIDs map[int64]I }
BulkWriteResult is the result type returned by a BulkWrite operation.
func FromBulkWriteResult ¶ added in v0.0.21
func FromBulkWriteResult[I DocumentId](r *mongo.BulkWriteResult) *BulkWriteResult[I]
type Index ¶ added in v0.0.21
type Index struct {
// contains filtered or unexported fields
}
func From ¶ added in v0.0.21
func From(model *mongo.IndexModel) *Index
func (*Index) Background
deprecated
added in
v0.0.21
func (*Index) BucketSize ¶ added in v0.0.21
BucketSize sets the value for the BucketSize field
func (*Index) DefaultLanguage ¶ added in v0.0.21
DefaultLanguage sets the value for the DefaultLanguage field.
func (*Index) ExpireAfterSeconds ¶ added in v0.0.21
ExpireAfterSeconds sets value for the ExpireAfterSeconds field.
func (*Index) LanguageOverride ¶ added in v0.0.21
LanguageOverride sets the value of the LanguageOverride field.
func (*Index) Marshal ¶ added in v0.0.21
func (i *Index) Marshal() mongo.IndexModel
func (*Index) PartialFilterExpression ¶ added in v0.0.21
PartialFilterExpression sets the value for the PartialFilterExpression field.
func (*Index) SphereVersion ¶ added in v0.0.21
SphereVersion sets the value for the SphereVersion field.
func (*Index) StorageEngine ¶ added in v0.0.21
StorageEngine sets the value for the StorageEngine field.
func (*Index) TextVersion ¶ added in v0.0.21
TextVersion sets the value for the TextVersion field.
func (*Index) WildcardProjection ¶ added in v0.0.21
WildcardProjection sets the value for the WildcardProjection field.
type UpdateResult ¶ added in v0.0.21
type UpdateResult[I DocumentId] struct { MatchedCount int64 // The number of documents matched by the filter. ModifiedCount int64 // The number of documents modified by the operation. UpsertedCount int64 // The number of documents upserted by the operation. UpsertedID I // The _id field of the upserted document, or nil if no upsert was done. }
func FromUpdateResult ¶ added in v0.0.21
func FromUpdateResult[I DocumentId](r *mongo.UpdateResult) *UpdateResult[I]
Click to show internal directories.
Click to hide internal directories.