Documentation ¶
Index ¶
- Variables
- type Condition
- func And[T any](conditions ...*Condition[T]) *Condition[T]
- func AttributeExists[T any](selector func(*T) any) *Condition[T]
- func AttributeNotExists[T any](selector func(*T) any) *Condition[T]
- func Equal[T any](v *T) *Condition[T]
- func GreaterThan[T any](v *T) *Condition[T]
- func GreaterThanOrEqual[T any](v *T) *Condition[T]
- func LessThan[T any](v *T) *Condition[T]
- func LessThanOrEqual[T any](v *T) *Condition[T]
- func NotEqual[T any](v *T) *Condition[T]
- func Or[T any](conditions ...*Condition[T]) *Condition[T]
- type DeleteAllRequest
- type DeleteRequest
- type GetRequest
- type PutRequest
- type QueryRequest
- type TransactionWriteRequest
- type UpdateRequest
- func (r *UpdateRequest[T]) Add(t *T) *UpdateRequest[T]
- func (r *UpdateRequest[T]) Delete(t *T) *UpdateRequest[T]
- func (r *UpdateRequest[T]) Exec() error
- func (r *UpdateRequest[T]) If(condition *Condition[T]) *UpdateRequest[T]
- func (r *UpdateRequest[T]) Remove(remove func(t *T) any) *UpdateRequest[T]
- func (r *UpdateRequest[T]) Set(t *T) *UpdateRequest[T]
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConditionFailed = errors.New("condition failed")
View Source
var ErrItemNotFound = errors.New("item not found")
View Source
var TagChar = '#'
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition[T any] struct { // contains filtered or unexported fields }
func AttributeExists ¶
func AttributeNotExists ¶
func GreaterThan ¶ added in v0.0.4
func GreaterThanOrEqual ¶ added in v0.0.4
func LessThanOrEqual ¶ added in v0.0.4
type DeleteAllRequest ¶
type DeleteAllRequest[T any] struct { // contains filtered or unexported fields }
func DeleteAll ¶
func DeleteAll[T any](v *T) *DeleteAllRequest[T]
func (*DeleteAllRequest[T]) BeginsWith ¶
func (r *DeleteAllRequest[T]) BeginsWith(v *T) *DeleteAllRequest[T]
func (*DeleteAllRequest[T]) Between ¶
func (r *DeleteAllRequest[T]) Between(start *T, end *T) *DeleteAllRequest[T]
func (*DeleteAllRequest[T]) Exec ¶
func (r *DeleteAllRequest[T]) Exec() error
type DeleteRequest ¶
type DeleteRequest[T any] struct { // contains filtered or unexported fields }
func Delete ¶
func Delete[T any](v *T) *DeleteRequest[T]
func (*DeleteRequest[T]) Exec ¶
func (r *DeleteRequest[T]) Exec() error
func (*DeleteRequest[T]) If ¶
func (r *DeleteRequest[T]) If(condition *Condition[T]) *DeleteRequest[T]
type GetRequest ¶
type GetRequest[T any] struct { // contains filtered or unexported fields }
func Get ¶
func Get[T any](v *T) *GetRequest[T]
func (*GetRequest[T]) Consistent ¶
func (r *GetRequest[T]) Consistent() *GetRequest[T]
func (*GetRequest[T]) Exec ¶
func (r *GetRequest[T]) Exec() (*T, error)
type PutRequest ¶
type PutRequest[T any] struct { // contains filtered or unexported fields }
func Put ¶
func Put[T any](item *T) *PutRequest[T]
func (*PutRequest[T]) Exec ¶
func (r *PutRequest[T]) Exec() error
func (*PutRequest[T]) If ¶
func (r *PutRequest[T]) If(condition *Condition[T]) *PutRequest[T]
type QueryRequest ¶
type QueryRequest[T any] struct { // contains filtered or unexported fields }
func Query ¶
func Query[T any](item *T) *QueryRequest[T]
func (*QueryRequest[T]) BeginsWith ¶
func (r *QueryRequest[T]) BeginsWith(v *T) *QueryRequest[T]
func (*QueryRequest[T]) Between ¶
func (r *QueryRequest[T]) Between(start *T, end *T) *QueryRequest[T]
func (*QueryRequest[T]) Exec ¶
func (r *QueryRequest[T]) Exec() ([]*T, error)
func (*QueryRequest[T]) Page ¶
func (r *QueryRequest[T]) Page(maxSize int, offset *string) *QueryRequest[T]
type TransactionWriteRequest ¶ added in v0.0.5
type TransactionWriteRequest struct {
// contains filtered or unexported fields
}
func TransactionWrite ¶ added in v0.0.5
func TransactionWrite() *TransactionWriteRequest
func (*TransactionWriteRequest) Delete ¶ added in v0.0.5
func (t *TransactionWriteRequest) Delete(value any) *TransactionWriteRequest
func (*TransactionWriteRequest) Exec ¶ added in v0.0.5
func (t *TransactionWriteRequest) Exec() error
func (*TransactionWriteRequest) Put ¶ added in v0.0.5
func (t *TransactionWriteRequest) Put(value any) *TransactionWriteRequest
type UpdateRequest ¶
type UpdateRequest[T any] struct { // contains filtered or unexported fields }
func Update ¶
func Update[T any](item *T) *UpdateRequest[T]
func (*UpdateRequest[T]) Add ¶
func (r *UpdateRequest[T]) Add(t *T) *UpdateRequest[T]
func (*UpdateRequest[T]) Delete ¶
func (r *UpdateRequest[T]) Delete(t *T) *UpdateRequest[T]
func (*UpdateRequest[T]) Exec ¶
func (r *UpdateRequest[T]) Exec() error
func (*UpdateRequest[T]) If ¶
func (r *UpdateRequest[T]) If(condition *Condition[T]) *UpdateRequest[T]
func (*UpdateRequest[T]) Remove ¶
func (r *UpdateRequest[T]) Remove(remove func(t *T) any) *UpdateRequest[T]
func (*UpdateRequest[T]) Set ¶
func (r *UpdateRequest[T]) Set(t *T) *UpdateRequest[T]
Click to show internal directories.
Click to hide internal directories.