Documentation
¶
Overview ¶
Package client provides resources for data persistence and retrieval.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Add ¶
type Add interface {
Encoder
To(collection string) Add
Item(value map[string]interface{}) Add
Query(query Query) Add
Execute(ctx context.Context) (int, error)
}
Add represents a command to add items to the collection
type Client ¶
type Client interface {
Connect() error
Query() Query
Add() Add
Update() Update
Remove() Remove
Transaction(ctx context.Context) (Transaction, error)
}
Client represents a client for operating on a database.
type Query ¶
type Query interface {
Encoder
Secondary() Query
From(collection string) Query
Complement(collection string, args ...interface{}) Query
Filter(filter interface{}) Query
Order(by string) Query
First(first int) Query
After(key string, value *time.Time) Query
Transform(transform func(string) string) Query
Fields(fields ...interface{}) Query
Field(key string, args ...interface{}) Query
Execute(ctx context.Context, dst interface{}) error
}
Query represents a query builder
type Remove ¶
type Remove interface {
Encoder
From(collection string) Remove
Filter(filter interface{}) Remove
Order(by string) Remove
After(key string, value *time.Time) Remove
Execute(ctx context.Context) (int, error)
}
Remove represents a command to remove items from the collection
Click to show internal directories.
Click to hide internal directories.