Documentation ¶
Index ¶
- Variables
- func Close() (err error)
- func DBs(vault Vault, tenant convAuth.Tenant) ([]*sql.DB, error)
- func Open() (err error)
- func Where() whereExpectingFirstStatement
- type Engine
- type Key
- type Lock
- type Metadata
- type Object
- type ObjectSet
- type TenantObjectSet
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Delete(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Insert(ctx convCtx.Context, obj objT) (err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Lock(ctx convCtx.Context, obj objT, desc string) (lock *Lock[objT, idT, shardKeyT], err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Metadata(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (res *Metadata, err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Process(ctx convCtx.Context, where whereReady, ...) (count int, err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) SafeUpdate(ctx convCtx.Context, from, to objT) (err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Select(ctx convCtx.Context, where whereReady, shardKeys ...shardKeyT) (obs []objT, err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) SelectAll(ctx convCtx.Context) (obs []objT, err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) SelectByID(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (obj *objT, err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Update(ctx convCtx.Context, obj objT) (err error)
- func (tos TenantObjectSet[objT, idT, shardKeyT]) Upsert(ctx convCtx.Context, obj objT) (err error)
- type Vault
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoDBTenant = errors.New("db is not configured with provided tenant") ErrNoDBVault = errors.New("db is not configured with provided vault") )
View Source
var (
ErrObjectTypeNotRegistered = errors.New("object type not registered - use NewObjectSet to access vaults")
)
Functions ¶
Types ¶
type Lock ¶
type ObjectSet ¶
type ObjectSet[objT Object[idT, shardKeyT], idT, shardKeyT ~string] struct { // contains filtered or unexported fields }
func NewObjectSet ¶
type TenantObjectSet ¶
type TenantObjectSet[objT Object[idT, shardKeyT], idT, shardKeyT ~string] struct { ObjectSet[objT, idT, shardKeyT] // contains filtered or unexported fields }
func (TenantObjectSet[objT, idT, shardKeyT]) Delete ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) Delete(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (err error)
func (TenantObjectSet[objT, idT, shardKeyT]) Insert ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) Insert(ctx convCtx.Context, obj objT) (err error)
func (TenantObjectSet[objT, idT, shardKeyT]) Metadata ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) Metadata(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (res *Metadata, err error)
func (TenantObjectSet[objT, idT, shardKeyT]) SafeUpdate ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) SafeUpdate(ctx convCtx.Context, from, to objT) (err error)
func (TenantObjectSet[objT, idT, shardKeyT]) Select ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) Select(ctx convCtx.Context, where whereReady, shardKeys ...shardKeyT) (obs []objT, err error)
func (TenantObjectSet[objT, idT, shardKeyT]) SelectAll ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) SelectAll(ctx convCtx.Context) (obs []objT, err error)
func (TenantObjectSet[objT, idT, shardKeyT]) SelectByID ¶
func (tos TenantObjectSet[objT, idT, shardKeyT]) SelectByID(ctx convCtx.Context, id idT, shardKeys ...shardKeyT) (obj *objT, err error)
Click to show internal directories.
Click to hide internal directories.