Documentation
¶
Index ¶
- type BoolField
- func (f *BoolField) BSONName() string
- func (f *BoolField) Eq(v bool) bson.M
- func (f *BoolField) Exists() bson.M
- func (f *BoolField) In(v []bool) bson.M
- func (f *BoolField) IsNotNull() bson.M
- func (f *BoolField) IsNull() bson.M
- func (f *BoolField) Ne(v bool) bson.M
- func (f *BoolField) Nin(v []bool) bson.M
- func (f *BoolField) NotExists() bson.M
- type Decimal128Field
- func (f *Decimal128Field) BSONName() string
- func (f *Decimal128Field) Eq(v bson.Decimal128) bson.M
- func (f *Decimal128Field) Exists() bson.M
- func (f *Decimal128Field) Gt(v bson.Decimal128) bson.M
- func (f *Decimal128Field) Gte(v bson.Decimal128) bson.M
- func (f *Decimal128Field) In(v []bson.Decimal128) bson.M
- func (f *Decimal128Field) IsNotNull() bson.M
- func (f *Decimal128Field) IsNull() bson.M
- func (f *Decimal128Field) Lt(v bson.Decimal128) bson.M
- func (f *Decimal128Field) Lte(v bson.Decimal128) bson.M
- func (f *Decimal128Field) Ne(v bson.Decimal128) bson.M
- func (f *Decimal128Field) Nin(v []bson.Decimal128) bson.M
- func (f *Decimal128Field) NotExists() bson.M
- type Float64Field
- func (f *Float64Field) BSONName() string
- func (f *Float64Field) Eq(v float64) bson.M
- func (f *Float64Field) Exists() bson.M
- func (f *Float64Field) Gt(v float64) bson.M
- func (f *Float64Field) Gte(v float64) bson.M
- func (f *Float64Field) In(v []float64) bson.M
- func (f *Float64Field) IsNotNull() bson.M
- func (f *Float64Field) IsNull() bson.M
- func (f *Float64Field) Lt(v float64) bson.M
- func (f *Float64Field) Lte(v float64) bson.M
- func (f *Float64Field) Ne(v float64) bson.M
- func (f *Float64Field) Nin(v []float64) bson.M
- func (f *Float64Field) NotExists() bson.M
- type GenericField
- func (f *GenericField) BSONName() string
- func (f *GenericField) Contains(v any) bson.M
- func (f *GenericField) ContainsAll(v []any) bson.M
- func (f *GenericField) ElemMatch(v bson.M) bson.M
- func (f *GenericField) Eq(v any) bson.M
- func (f *GenericField) Exists() bson.M
- func (f *GenericField) In(v []any) bson.M
- func (f *GenericField) IsNotNull() bson.M
- func (f *GenericField) IsNull() bson.M
- func (f *GenericField) Ne(v any) bson.M
- func (f *GenericField) Nin(v []any) bson.M
- func (f *GenericField) NotExists() bson.M
- func (f *GenericField) Path(path string) *GenericField
- func (f *GenericField) Size(v int) bson.M
- type GeoField
- func (f *GeoField) BSONName() string
- func (f *GeoField) Eq(v any) bson.M
- func (f *GeoField) Exists() bson.M
- func (f *GeoField) Intersects(geometry any) bson.M
- func (f *GeoField) IsNotNull() bson.M
- func (f *GeoField) IsNull() bson.M
- func (f *GeoField) Ne(v any) bson.M
- func (f *GeoField) Near(geometry any) bson.M
- func (f *GeoField) NearSphere(geometry any) bson.M
- func (f *GeoField) NearSphereWithDistance(geometry any, minDistance *float64, maxDistance *float64) bson.M
- func (f *GeoField) NearWithDistance(geometry any, minDistance *float64, maxDistance *float64) bson.M
- func (f *GeoField) NotExists() bson.M
- func (f *GeoField) Within(geometry any) bson.M
- func (f *GeoField) WithinBox(bottomLeft []float64, upperRight []float64) bson.M
- func (f *GeoField) WithinCenter(center []float64, radius float64) bson.M
- func (f *GeoField) WithinCenterSphere(center []float64, radius float64) bson.M
- type Int64Field
- func (f *Int64Field) BSONName() string
- func (f *Int64Field) Eq(v int64) bson.M
- func (f *Int64Field) Exists() bson.M
- func (f *Int64Field) Gt(v int64) bson.M
- func (f *Int64Field) Gte(v int64) bson.M
- func (f *Int64Field) In(v []int64) bson.M
- func (f *Int64Field) IsNotNull() bson.M
- func (f *Int64Field) IsNull() bson.M
- func (f *Int64Field) Lt(v int64) bson.M
- func (f *Int64Field) Lte(v int64) bson.M
- func (f *Int64Field) Ne(v int64) bson.M
- func (f *Int64Field) Nin(v []int64) bson.M
- func (f *Int64Field) NotExists() bson.M
- type ObjectIDField
- func (f *ObjectIDField) BSONName() string
- func (f *ObjectIDField) Eq(v bson.ObjectID) bson.M
- func (f *ObjectIDField) Exists() bson.M
- func (f *ObjectIDField) Gt(v bson.ObjectID) bson.M
- func (f *ObjectIDField) Gte(v bson.ObjectID) bson.M
- func (f *ObjectIDField) In(v []bson.ObjectID) bson.M
- func (f *ObjectIDField) IsNotNull() bson.M
- func (f *ObjectIDField) IsNull() bson.M
- func (f *ObjectIDField) Lt(v bson.ObjectID) bson.M
- func (f *ObjectIDField) Lte(v bson.ObjectID) bson.M
- func (f *ObjectIDField) Ne(v bson.ObjectID) bson.M
- func (f *ObjectIDField) Nin(v []bson.ObjectID) bson.M
- func (f *ObjectIDField) NotExists() bson.M
- type StringArrayField
- func (f *StringArrayField) BSONName() string
- func (f *StringArrayField) Contains(v string) bson.M
- func (f *StringArrayField) ContainsAll(v []string) bson.M
- func (f *StringArrayField) ElemMatch(v bson.M) bson.M
- func (f *StringArrayField) Eq(v []string) bson.M
- func (f *StringArrayField) Exists() bson.M
- func (f *StringArrayField) In(v []string) bson.M
- func (f *StringArrayField) IsNotNull() bson.M
- func (f *StringArrayField) IsNull() bson.M
- func (f *StringArrayField) Ne(v []string) bson.M
- func (f *StringArrayField) Nin(v []string) bson.M
- func (f *StringArrayField) NotExists() bson.M
- func (f *StringArrayField) Size(v int) bson.M
- type StringField
- func (f *StringField) BSONName() string
- func (f *StringField) Eq(v string) bson.M
- func (f *StringField) Exists() bson.M
- func (f *StringField) In(v []string) bson.M
- func (f *StringField) IsNotNull() bson.M
- func (f *StringField) IsNull() bson.M
- func (f *StringField) Ne(v string) bson.M
- func (f *StringField) Nin(v []string) bson.M
- func (f *StringField) NotExists() bson.M
- func (f *StringField) Reg(v string) bson.M
- type TimestampField
- func (f *TimestampField) BSONName() string
- func (f *TimestampField) Eq(v time.Time) bson.M
- func (f *TimestampField) Exists() bson.M
- func (f *TimestampField) Gt(v time.Time) bson.M
- func (f *TimestampField) Gte(v time.Time) bson.M
- func (f *TimestampField) In(v []time.Time) bson.M
- func (f *TimestampField) IsNotNull() bson.M
- func (f *TimestampField) IsNull() bson.M
- func (f *TimestampField) Lt(v time.Time) bson.M
- func (f *TimestampField) Lte(v time.Time) bson.M
- func (f *TimestampField) Ne(v time.Time) bson.M
- func (f *TimestampField) Nin(v []time.Time) bson.M
- func (f *TimestampField) NotExists() bson.M
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolField ¶
type BoolField struct {
// contains filtered or unexported fields
}
func (*BoolField) Exists ¶
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*BoolField) In ¶
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*BoolField) IsNotNull ¶
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*BoolField) IsNull ¶
This method generates a query to check if the field is null, e.g., {field: null}
type Decimal128Field ¶ added in v1.0.24
type Decimal128Field struct {
// contains filtered or unexported fields
}
func Decimal128Type ¶ added in v1.0.24
func Decimal128Type(name string) *Decimal128Field
func (*Decimal128Field) BSONName ¶ added in v1.0.24
func (f *Decimal128Field) BSONName() string
func (*Decimal128Field) Eq ¶ added in v1.0.24
func (f *Decimal128Field) Eq(v bson.Decimal128) bson.M
func (*Decimal128Field) Exists ¶ added in v1.0.24
func (f *Decimal128Field) Exists() bson.M
func (*Decimal128Field) Gt ¶ added in v1.0.24
func (f *Decimal128Field) Gt(v bson.Decimal128) bson.M
func (*Decimal128Field) Gte ¶ added in v1.0.24
func (f *Decimal128Field) Gte(v bson.Decimal128) bson.M
func (*Decimal128Field) In ¶ added in v1.0.24
func (f *Decimal128Field) In(v []bson.Decimal128) bson.M
func (*Decimal128Field) IsNotNull ¶ added in v1.0.24
func (f *Decimal128Field) IsNotNull() bson.M
func (*Decimal128Field) IsNull ¶ added in v1.0.24
func (f *Decimal128Field) IsNull() bson.M
func (*Decimal128Field) Lt ¶ added in v1.0.24
func (f *Decimal128Field) Lt(v bson.Decimal128) bson.M
func (*Decimal128Field) Lte ¶ added in v1.0.24
func (f *Decimal128Field) Lte(v bson.Decimal128) bson.M
func (*Decimal128Field) Ne ¶ added in v1.0.24
func (f *Decimal128Field) Ne(v bson.Decimal128) bson.M
func (*Decimal128Field) Nin ¶ added in v1.0.24
func (f *Decimal128Field) Nin(v []bson.Decimal128) bson.M
func (*Decimal128Field) NotExists ¶ added in v1.0.24
func (f *Decimal128Field) NotExists() bson.M
type Float64Field ¶
type Float64Field struct {
// contains filtered or unexported fields
}
func Float64Type ¶
func Float64Type(name string) *Float64Field
func (*Float64Field) BSONName ¶
func (f *Float64Field) BSONName() string
func (*Float64Field) Eq ¶
func (f *Float64Field) Eq(v float64) bson.M
This method generates a query for equality, e.g., {field: value}
func (*Float64Field) Exists ¶
func (f *Float64Field) Exists() bson.M
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*Float64Field) Gt ¶
func (f *Float64Field) Gt(v float64) bson.M
This method generates a query for greater than, e.g., {field: {$gt: value}}
func (*Float64Field) Gte ¶
func (f *Float64Field) Gte(v float64) bson.M
This method generates a query for greater than or equal to, e.g., {field: {$gte: value}}
func (*Float64Field) In ¶
func (f *Float64Field) In(v []float64) bson.M
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*Float64Field) IsNotNull ¶
func (f *Float64Field) IsNotNull() bson.M
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*Float64Field) IsNull ¶
func (f *Float64Field) IsNull() bson.M
This method generates a query to check if the field is null, e.g., {field: null}
func (*Float64Field) Lt ¶
func (f *Float64Field) Lt(v float64) bson.M
This method generates a query for less than, e.g., {field: {$lt: value}}
func (*Float64Field) Lte ¶
func (f *Float64Field) Lte(v float64) bson.M
This method generates a query for less than or equal to, e.g., {field: {$lte: value}}
func (*Float64Field) Ne ¶
func (f *Float64Field) Ne(v float64) bson.M
This method generates a query for inequality, e.g., {field: {$ne: value}}
func (*Float64Field) Nin ¶
func (f *Float64Field) Nin(v []float64) bson.M
This method generates a query for values not in the given list, e.g., {field: {$nin: [value1, value2, ...]}}
func (*Float64Field) NotExists ¶
func (f *Float64Field) NotExists() bson.M
This method generates a query to check if the field does not exist, e.g., {field: {$exists: false}}
type GenericField ¶
type GenericField struct {
// contains filtered or unexported fields
}
func GenericType ¶
func GenericType(name string) *GenericField
func (*GenericField) BSONName ¶
func (f *GenericField) BSONName() string
func (*GenericField) ContainsAll ¶ added in v1.0.3
func (f *GenericField) ContainsAll(v []any) bson.M
func (*GenericField) Exists ¶ added in v1.0.3
func (f *GenericField) Exists() bson.M
func (*GenericField) IsNotNull ¶ added in v1.0.3
func (f *GenericField) IsNotNull() bson.M
func (*GenericField) IsNull ¶ added in v1.0.3
func (f *GenericField) IsNull() bson.M
func (*GenericField) NotExists ¶ added in v1.0.3
func (f *GenericField) NotExists() bson.M
func (*GenericField) Path ¶ added in v1.0.3
func (f *GenericField) Path(path string) *GenericField
type GeoField ¶
type GeoField struct {
// contains filtered or unexported fields
}
func (*GeoField) NearSphereWithDistance ¶
func (*GeoField) NearWithDistance ¶
func (*GeoField) WithinCenter ¶
type Int64Field ¶
type Int64Field struct {
// contains filtered or unexported fields
}
func Int64Type ¶
func Int64Type(name string) *Int64Field
func (*Int64Field) BSONName ¶
func (f *Int64Field) BSONName() string
func (*Int64Field) Eq ¶
func (f *Int64Field) Eq(v int64) bson.M
This method generates a query for equality, e.g., {field: value}
func (*Int64Field) Exists ¶
func (f *Int64Field) Exists() bson.M
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*Int64Field) Gt ¶
func (f *Int64Field) Gt(v int64) bson.M
This method generates a query for greater than, e.g., {field: {$gt: value}}
func (*Int64Field) Gte ¶
func (f *Int64Field) Gte(v int64) bson.M
This method generates a query for greater than or equal to, e.g., {field: {$gte: value}}
func (*Int64Field) In ¶
func (f *Int64Field) In(v []int64) bson.M
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*Int64Field) IsNotNull ¶
func (f *Int64Field) IsNotNull() bson.M
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*Int64Field) IsNull ¶
func (f *Int64Field) IsNull() bson.M
This method generates a query to check if the field is null, e.g., {field: null}
func (*Int64Field) Lt ¶
func (f *Int64Field) Lt(v int64) bson.M
This method generates a query for less than, e.g., {field: {$lt: value}}
func (*Int64Field) Lte ¶
func (f *Int64Field) Lte(v int64) bson.M
This method generates a query for less than or equal to, e.g., {field: {$lte: value}}
func (*Int64Field) Ne ¶
func (f *Int64Field) Ne(v int64) bson.M
This method generates a query for inequality, e.g., {field: {$ne: value}}
func (*Int64Field) Nin ¶
func (f *Int64Field) Nin(v []int64) bson.M
This method generates a query for values not in the given list, e.g., {field: {$nin: [value1, value2, ...]}}
func (*Int64Field) NotExists ¶
func (f *Int64Field) NotExists() bson.M
This method generates a query to check if the field does not exist, e.g., {field: {$exists: false}}
type ObjectIDField ¶
type ObjectIDField struct {
// contains filtered or unexported fields
}
func ObjectIDType ¶
func ObjectIDType(name string) *ObjectIDField
func (*ObjectIDField) BSONName ¶
func (f *ObjectIDField) BSONName() string
func (*ObjectIDField) Eq ¶
func (f *ObjectIDField) Eq(v bson.ObjectID) bson.M
This method generates a query for equality, e.g., {field: value}
func (*ObjectIDField) Exists ¶
func (f *ObjectIDField) Exists() bson.M
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*ObjectIDField) Gt ¶
func (f *ObjectIDField) Gt(v bson.ObjectID) bson.M
This method generates a query for greater than, e.g., {field: {$gt: value}}
func (*ObjectIDField) Gte ¶
func (f *ObjectIDField) Gte(v bson.ObjectID) bson.M
This method generates a query for greater than or equal, e.g., {field: {$gte: value}}
func (*ObjectIDField) In ¶
func (f *ObjectIDField) In(v []bson.ObjectID) bson.M
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*ObjectIDField) IsNotNull ¶
func (f *ObjectIDField) IsNotNull() bson.M
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*ObjectIDField) IsNull ¶
func (f *ObjectIDField) IsNull() bson.M
This method generates a query to check if the field is null, e.g., {field: null}
func (*ObjectIDField) Lt ¶
func (f *ObjectIDField) Lt(v bson.ObjectID) bson.M
This method generates a query for less than, e.g., {field: {$lt: value}}
func (*ObjectIDField) Lte ¶
func (f *ObjectIDField) Lte(v bson.ObjectID) bson.M
This method generates a query for less than or equal, e.g., {field: {$lte: value}}
func (*ObjectIDField) Ne ¶
func (f *ObjectIDField) Ne(v bson.ObjectID) bson.M
This method generates a query for inequality, e.g., {field: {$ne: value}}
func (*ObjectIDField) Nin ¶
func (f *ObjectIDField) Nin(v []bson.ObjectID) bson.M
This method generates a query for values not in the given list, e.g., {field: {$nin: [value1, value2, ...]}}
func (*ObjectIDField) NotExists ¶
func (f *ObjectIDField) NotExists() bson.M
This method generates a query to check if the field does not exist, e.g., {field: {$exists: false}}
type StringArrayField ¶ added in v1.0.3
type StringArrayField struct {
// contains filtered or unexported fields
}
func StringArrayType ¶ added in v1.0.3
func StringArrayType(name string) *StringArrayField
func (*StringArrayField) BSONName ¶ added in v1.0.3
func (f *StringArrayField) BSONName() string
func (*StringArrayField) Contains ¶ added in v1.0.3
func (f *StringArrayField) Contains(v string) bson.M
func (*StringArrayField) ContainsAll ¶ added in v1.0.3
func (f *StringArrayField) ContainsAll(v []string) bson.M
func (*StringArrayField) ElemMatch ¶ added in v1.0.3
func (f *StringArrayField) ElemMatch(v bson.M) bson.M
func (*StringArrayField) Exists ¶ added in v1.0.3
func (f *StringArrayField) Exists() bson.M
func (*StringArrayField) IsNotNull ¶ added in v1.0.3
func (f *StringArrayField) IsNotNull() bson.M
func (*StringArrayField) IsNull ¶ added in v1.0.3
func (f *StringArrayField) IsNull() bson.M
func (*StringArrayField) NotExists ¶ added in v1.0.3
func (f *StringArrayField) NotExists() bson.M
type StringField ¶
type StringField struct {
// contains filtered or unexported fields
}
func StringType ¶
func StringType(name string) *StringField
func (*StringField) BSONName ¶
func (f *StringField) BSONName() string
func (*StringField) Eq ¶
func (f *StringField) Eq(v string) bson.M
This method generates a query for equality, e.g., {field: value}
func (*StringField) Exists ¶
func (f *StringField) Exists() bson.M
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*StringField) In ¶
func (f *StringField) In(v []string) bson.M
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*StringField) IsNotNull ¶
func (f *StringField) IsNotNull() bson.M
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*StringField) IsNull ¶
func (f *StringField) IsNull() bson.M
This method generates a query to check if the field is null, e.g., {field: null}
func (*StringField) Ne ¶
func (f *StringField) Ne(v string) bson.M
This method generates a query for inequality, e.g., {field: {$ne: value}}
func (*StringField) Nin ¶
func (f *StringField) Nin(v []string) bson.M
This method generates a query for values not in the given list, e.g., {field: {$nin: [value1, value2, ...]}}
func (*StringField) NotExists ¶
func (f *StringField) NotExists() bson.M
This method generates a query to check if the field does not exist, e.g., {field: {$exists: false}}
type TimestampField ¶
type TimestampField struct {
// contains filtered or unexported fields
}
func TimestampType ¶
func TimestampType(name string) *TimestampField
func (*TimestampField) BSONName ¶
func (f *TimestampField) BSONName() string
func (*TimestampField) Eq ¶
func (f *TimestampField) Eq(v time.Time) bson.M
This method generates a query for equality, e.g., {field: value}
func (*TimestampField) Exists ¶
func (f *TimestampField) Exists() bson.M
This method generates a query to check if the field exists, e.g., {field: {$exists: true}}
func (*TimestampField) Gt ¶
func (f *TimestampField) Gt(v time.Time) bson.M
This method generates a query for greater than, e.g., {field: {$gt: value}}
func (*TimestampField) Gte ¶
func (f *TimestampField) Gte(v time.Time) bson.M
This method generates a query for greater than or equal to, e.g., {field: {$gte: value}}
func (*TimestampField) In ¶
func (f *TimestampField) In(v []time.Time) bson.M
This method generates a query for multiple values, e.g., {field: {$in: [value1, value2, ...]}}
func (*TimestampField) IsNotNull ¶
func (f *TimestampField) IsNotNull() bson.M
This method generates a query to check if the field is not null, e.g., {field: {$ne: null}}
func (*TimestampField) IsNull ¶
func (f *TimestampField) IsNull() bson.M
This method generates a query to check if the field is null, e.g., {field: null}
func (*TimestampField) Lt ¶
func (f *TimestampField) Lt(v time.Time) bson.M
This method generates a query for less than, e.g., {field: {$lt: value}}
func (*TimestampField) Lte ¶
func (f *TimestampField) Lte(v time.Time) bson.M
This method generates a query for less than or equal to, e.g., {field: {$lte: value}}
func (*TimestampField) Ne ¶
func (f *TimestampField) Ne(v time.Time) bson.M
This method generates a query for inequality, e.g., {field: {$ne: value}}
func (*TimestampField) Nin ¶
func (f *TimestampField) Nin(v []time.Time) bson.M
This method generates a query for values not in the given list, e.g., {field: {$nin: [value1, value2, ...]}}
func (*TimestampField) NotExists ¶
func (f *TimestampField) NotExists() bson.M
This method generates a query to check if the field does not exist, e.g., {field: {$exists: false}}