Documentation ¶
Index ¶
- Variables
- type And
- type Collection
- type Config
- type Create
- type Creator
- type Database
- type Delete
- type Deleter
- type Equals
- type Event
- type Exists
- type Field
- type FieldType
- type Filter
- type GreaterThan
- type GreaterThanOrEqual
- type InArray
- type Index
- type LessThan
- type LessThanOrEqual
- type NotEquals
- type NotInArray
- type Operation
- type Or
- type Order
- type Querier
- type Query
- func (q *Query[T]) All(ctx context.Context) ([]T, error)
- func (q *Query[T]) Channel(ctx context.Context) (<-chan T, error)
- func (q *Query[T]) In(rng *Range) *Query[T]
- func (q *Query[T]) Single(ctx context.Context) (T, error)
- func (q *Query[T]) Sort(key string, order ...*Order) *Query[T]
- func (q *Query[T]) Where(filter Filter) *Query[T]
- type Range
- type Regex
- type Transaction
- type TransactionFn
- type Transactor
- type Update
- type Updater
- type Watch
- type WatchHandler
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OperationAny = []Operation{ OperationCreate, OperationUpdate, OperationDelete, } )
Functions ¶
This section is empty.
Types ¶
type Collection ¶
func NewCollection ¶
func NewCollection(database *Database, name string) *Collection
type GreaterThan ¶
type GreaterThan struct {
// contains filtered or unexported fields
}
func NewGreaterThan ¶
func NewGreaterThan(key string, value any) *GreaterThan
func (*GreaterThan) Key ¶
func (l *GreaterThan) Key() string
func (*GreaterThan) Left ¶
func (l *GreaterThan) Left() Filter
func (*GreaterThan) Right ¶
func (l *GreaterThan) Right() Filter
func (*GreaterThan) Value ¶
func (l *GreaterThan) Value() any
type GreaterThanOrEqual ¶
type GreaterThanOrEqual struct {
// contains filtered or unexported fields
}
func NewGreaterThanOrEqual ¶
func NewGreaterThanOrEqual(key string, value any) *GreaterThanOrEqual
func (*GreaterThanOrEqual) Key ¶
func (l *GreaterThanOrEqual) Key() string
func (*GreaterThanOrEqual) Left ¶
func (l *GreaterThanOrEqual) Left() Filter
func (*GreaterThanOrEqual) Right ¶
func (l *GreaterThanOrEqual) Right() Filter
func (*GreaterThanOrEqual) Value ¶
func (l *GreaterThanOrEqual) Value() any
type InArray ¶ added in v3.1.0
type InArray struct {
// contains filtered or unexported fields
}
func NewInArray ¶ added in v3.1.0
type LessThan ¶
type LessThan struct {
// contains filtered or unexported fields
}
func NewLessThan ¶
type LessThanOrEqual ¶
type LessThanOrEqual struct {
// contains filtered or unexported fields
}
func NewLessThanOrEqual ¶
func NewLessThanOrEqual(key string, value any) *LessThanOrEqual
func (*LessThanOrEqual) Key ¶
func (l *LessThanOrEqual) Key() string
func (*LessThanOrEqual) Left ¶
func (l *LessThanOrEqual) Left() Filter
func (*LessThanOrEqual) Right ¶
func (l *LessThanOrEqual) Right() Filter
func (*LessThanOrEqual) Value ¶
func (l *LessThanOrEqual) Value() any
type NotEquals ¶ added in v3.1.0
type NotEquals struct {
// contains filtered or unexported fields
}
func NewNotEquals ¶ added in v3.1.0
type NotInArray ¶ added in v3.1.0
type NotInArray struct {
// contains filtered or unexported fields
}
func NewNotInArray ¶ added in v3.1.0
func NewNotInArray(key string, value any) *NotInArray
func (*NotInArray) Key ¶ added in v3.1.0
func (l *NotInArray) Key() string
func (*NotInArray) Left ¶ added in v3.1.0
func (l *NotInArray) Left() Filter
func (*NotInArray) Right ¶ added in v3.1.0
func (l *NotInArray) Right() Filter
func (*NotInArray) Value ¶ added in v3.1.0
func (l *NotInArray) Value() any
type Order ¶
type Order struct {
IsAscending bool
}
func NewAscendingOrder ¶
func NewAscendingOrder() *Order
func NewDescendingOrder ¶
func NewDescendingOrder() *Order
type Query ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(transactor Transactor) *Transaction
func (*Transaction) Run ¶
func (t *Transaction) Run(ctx context.Context, fn TransactionFn) error
type TransactionFn ¶
type Transactor ¶
type Transactor interface {
ExecuteTransaction(ctx context.Context, fn TransactionFn) error
}
type Update ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.