Documentation ¶
Index ¶
- Variables
- func Delete[V any](ctx *sql.Context, ops *ValueOps[V], is IndexedSet[V], row sql.Row) error
- func Insert[V any](ctx *sql.Context, ops *ValueOps[V], is IndexedSet[V], row sql.Row) error
- func MultiDelete[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
- func MultiInsert[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
- func MultiToRows[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V]) ([]sql.Row, error)
- func MultiUpdate[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], old, new sql.Row) error
- func ToRows[V any](ctx *sql.Context, ops *ValueOps[V], is IndexedSet[V]) ([]sql.Row, error)
- func Update[V any](ctx *sql.Context, ops *ValueOps[V], is IndexedSet[V], old, new sql.Row) error
- type IndexedSet
- func (is IndexedSet[V]) Clear()
- func (is IndexedSet[V]) Count() int
- func (is IndexedSet[V]) Get(v V) (V, bool)
- func (is IndexedSet[V]) GetMany(keyer Keyer[V], k any) []V
- func (is IndexedSet[V]) Put(v V)
- func (is IndexedSet[V]) Remove(v V) (res V, found bool)
- func (is IndexedSet[V]) RemoveMany(keyer Keyer[V], k any)
- func (is IndexedSet[V]) VisitEntries(f func(v V))
- type IndexedSetTable
- func (t *IndexedSetTable[V]) Collation() sql.CollationID
- func (t *IndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
- func (t *IndexedSetTable[V]) Editor() editor
- func (t *IndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
- func (t *IndexedSetTable[V]) Name() string
- func (t *IndexedSetTable[V]) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (t *IndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (t *IndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
- func (t *IndexedSetTable[V]) Schema() sql.Schema
- func (t *IndexedSetTable[V]) Set() IndexedSet[V]
- func (t *IndexedSetTable[V]) String() string
- func (t *IndexedSetTable[V]) TableId() sql.TableId
- func (t *IndexedSetTable[V]) Truncate(ctx *sql.Context) (int, error)
- func (t *IndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
- type IndexedSetTableEditor
- func (e *IndexedSetTableEditor[V]) Close(ctx *sql.Context) error
- func (e *IndexedSetTableEditor[V]) Delete(ctx *sql.Context, row sql.Row) error
- func (e *IndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
- func (e *IndexedSetTableEditor[V]) Insert(ctx *sql.Context, row sql.Row) error
- func (e *IndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
- func (e *IndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
- func (e *IndexedSetTableEditor[V]) Update(ctx *sql.Context, old, new sql.Row) error
- type Keyer
- type MultiIndexedSetTable
- func (t *MultiIndexedSetTable[V]) Collation() sql.CollationID
- func (t *MultiIndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
- func (t *MultiIndexedSetTable[V]) Editor() editor
- func (t *MultiIndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
- func (t *MultiIndexedSetTable[V]) Name() string
- func (t *MultiIndexedSetTable[V]) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (t *MultiIndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (t *MultiIndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
- func (t *MultiIndexedSetTable[V]) Schema() sql.Schema
- func (t *MultiIndexedSetTable[V]) Set() IndexedSet[V]
- func (t *MultiIndexedSetTable[V]) String() string
- func (t *MultiIndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
- type MultiIndexedSetTableEditor
- func (e *MultiIndexedSetTableEditor[V]) Close(ctx *sql.Context) error
- func (e *MultiIndexedSetTableEditor[V]) Delete(ctx *sql.Context, row sql.Row) error
- func (e *MultiIndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
- func (e *MultiIndexedSetTableEditor[V]) Insert(ctx *sql.Context, row sql.Row) error
- func (e *MultiIndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
- func (e *MultiIndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
- func (e *MultiIndexedSetTableEditor[V]) Update(ctx *sql.Context, old, new sql.Row) error
- type MultiMap
- type MultiValueOps
- type OperationLockingTableEditor
- func (e OperationLockingTableEditor) Close(ctx *sql.Context) error
- func (e OperationLockingTableEditor) Delete(ctx *sql.Context, row sql.Row) error
- func (e OperationLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
- func (e OperationLockingTableEditor) Insert(ctx *sql.Context, row sql.Row) error
- func (e OperationLockingTableEditor) StatementBegin(ctx *sql.Context)
- func (e OperationLockingTableEditor) StatementComplete(ctx *sql.Context) error
- func (e OperationLockingTableEditor) Update(ctx *sql.Context, old sql.Row, new sql.Row) error
- type StatementLockingTableEditor
- func (e StatementLockingTableEditor) Close(ctx *sql.Context) error
- func (e StatementLockingTableEditor) Delete(ctx *sql.Context, row sql.Row) error
- func (e StatementLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
- func (e StatementLockingTableEditor) Insert(ctx *sql.Context, row sql.Row) error
- func (e StatementLockingTableEditor) StatementBegin(ctx *sql.Context)
- func (e StatementLockingTableEditor) StatementComplete(ctx *sql.Context) error
- func (e StatementLockingTableEditor) Update(ctx *sql.Context, old sql.Row, new sql.Row) error
- type ValueOps
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEntryNotFound = errors.New("cannot insert row; matching entry not found")
Functions ¶
func MultiDelete ¶
func MultiDelete[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
func MultiInsert ¶
func MultiInsert[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
func MultiToRows ¶
func MultiToRows[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V]) ([]sql.Row, error)
func MultiUpdate ¶
func MultiUpdate[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], old, new sql.Row) error
Types ¶
type IndexedSet ¶
func NewIndexedSet ¶
func NewIndexedSet[V any](eqf func(V, V) bool, keyers []Keyer[V]) IndexedSet[V]
func (IndexedSet[V]) Clear ¶
func (is IndexedSet[V]) Clear()
func (IndexedSet[V]) Count ¶
func (is IndexedSet[V]) Count() int
func (IndexedSet[V]) Get ¶
func (is IndexedSet[V]) Get(v V) (V, bool)
func (IndexedSet[V]) GetMany ¶
func (is IndexedSet[V]) GetMany(keyer Keyer[V], k any) []V
func (IndexedSet[V]) Put ¶
func (is IndexedSet[V]) Put(v V)
func (IndexedSet[V]) Remove ¶
func (is IndexedSet[V]) Remove(v V) (res V, found bool)
func (IndexedSet[V]) RemoveMany ¶
func (is IndexedSet[V]) RemoveMany(keyer Keyer[V], k any)
func (IndexedSet[V]) VisitEntries ¶
func (is IndexedSet[V]) VisitEntries(f func(v V))
type IndexedSetTable ¶
type IndexedSetTable[V any] struct { // contains filtered or unexported fields }
func NewIndexedSetTable ¶
func NewIndexedSetTable[V any](name string, schema sql.Schema, coll sql.CollationID, set IndexedSet[V], ops ValueOps[V], lock, rlock sync.Locker) *IndexedSetTable[V]
func (*IndexedSetTable[V]) Collation ¶
func (t *IndexedSetTable[V]) Collation() sql.CollationID
func (*IndexedSetTable[V]) Deleter ¶
func (t *IndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
func (*IndexedSetTable[V]) Editor ¶
func (t *IndexedSetTable[V]) Editor() editor
func (*IndexedSetTable[V]) Inserter ¶
func (t *IndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
func (*IndexedSetTable[V]) Name ¶
func (t *IndexedSetTable[V]) Name() string
func (*IndexedSetTable[V]) PartitionRows ¶
func (*IndexedSetTable[V]) Partitions ¶
func (t *IndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
func (*IndexedSetTable[V]) Replacer ¶
func (t *IndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
func (*IndexedSetTable[V]) Schema ¶
func (t *IndexedSetTable[V]) Schema() sql.Schema
func (*IndexedSetTable[V]) Set ¶
func (t *IndexedSetTable[V]) Set() IndexedSet[V]
func (*IndexedSetTable[V]) String ¶
func (t *IndexedSetTable[V]) String() string
func (*IndexedSetTable[V]) TableId ¶
func (t *IndexedSetTable[V]) TableId() sql.TableId
func (*IndexedSetTable[V]) Truncate ¶
func (t *IndexedSetTable[V]) Truncate(ctx *sql.Context) (int, error)
func (*IndexedSetTable[V]) Updater ¶
func (t *IndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
type IndexedSetTableEditor ¶
type IndexedSetTableEditor[V any] struct { Set IndexedSet[V] Ops ValueOps[V] }
func (*IndexedSetTableEditor[V]) Close ¶
func (e *IndexedSetTableEditor[V]) Close(ctx *sql.Context) error
func (*IndexedSetTableEditor[V]) DiscardChanges ¶
func (e *IndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
func (*IndexedSetTableEditor[V]) StatementBegin ¶
func (e *IndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
func (*IndexedSetTableEditor[V]) StatementComplete ¶
func (e *IndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
type MultiIndexedSetTable ¶
type MultiIndexedSetTable[V any] struct { // contains filtered or unexported fields }
func NewMultiIndexedSetTable ¶
func NewMultiIndexedSetTable[V any](name string, schema sql.Schema, coll sql.CollationID, set IndexedSet[V], ops MultiValueOps[V], lock, rlock sync.Locker) *MultiIndexedSetTable[V]
func (*MultiIndexedSetTable[V]) Collation ¶
func (t *MultiIndexedSetTable[V]) Collation() sql.CollationID
func (*MultiIndexedSetTable[V]) Deleter ¶
func (t *MultiIndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
func (*MultiIndexedSetTable[V]) Editor ¶
func (t *MultiIndexedSetTable[V]) Editor() editor
func (*MultiIndexedSetTable[V]) Inserter ¶
func (t *MultiIndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
func (*MultiIndexedSetTable[V]) Name ¶
func (t *MultiIndexedSetTable[V]) Name() string
func (*MultiIndexedSetTable[V]) PartitionRows ¶
func (*MultiIndexedSetTable[V]) Partitions ¶
func (t *MultiIndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
func (*MultiIndexedSetTable[V]) Replacer ¶
func (t *MultiIndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
func (*MultiIndexedSetTable[V]) Schema ¶
func (t *MultiIndexedSetTable[V]) Schema() sql.Schema
func (*MultiIndexedSetTable[V]) Set ¶
func (t *MultiIndexedSetTable[V]) Set() IndexedSet[V]
func (*MultiIndexedSetTable[V]) String ¶
func (t *MultiIndexedSetTable[V]) String() string
func (*MultiIndexedSetTable[V]) Updater ¶
func (t *MultiIndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
type MultiIndexedSetTableEditor ¶
type MultiIndexedSetTableEditor[V any] struct { Set IndexedSet[V] Ops MultiValueOps[V] }
func (*MultiIndexedSetTableEditor[V]) Close ¶
func (e *MultiIndexedSetTableEditor[V]) Close(ctx *sql.Context) error
func (*MultiIndexedSetTableEditor[V]) DiscardChanges ¶
func (e *MultiIndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
func (*MultiIndexedSetTableEditor[V]) StatementBegin ¶
func (e *MultiIndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
func (*MultiIndexedSetTableEditor[V]) StatementComplete ¶
func (e *MultiIndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
type MultiMap ¶
type MultiMap[V any] struct { Equals func(v1, v2 V) bool // contains filtered or unexported fields }
func NewMultiMap ¶
func (MultiMap[V]) VisitEntries ¶
func (m MultiMap[V]) VisitEntries(f func(v V))
type MultiValueOps ¶
type OperationLockingTableEditor ¶
type OperationLockingTableEditor struct { L sync.Locker E sql.TableEditor }
func (OperationLockingTableEditor) Close ¶
func (e OperationLockingTableEditor) Close(ctx *sql.Context) error
Close implements the sql.Closer interface.
func (OperationLockingTableEditor) DiscardChanges ¶
func (e OperationLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
DiscardChanges implements the sql.TableEditor interface.
func (OperationLockingTableEditor) StatementBegin ¶
func (e OperationLockingTableEditor) StatementBegin(ctx *sql.Context)
StatementBegin implements the sql.TableEditor interface.
func (OperationLockingTableEditor) StatementComplete ¶
func (e OperationLockingTableEditor) StatementComplete(ctx *sql.Context) error
OperationComplete implements the sql.TableEditor interface.
type StatementLockingTableEditor ¶
type StatementLockingTableEditor struct { L sync.Locker E sql.TableEditor }
func (StatementLockingTableEditor) Close ¶
func (e StatementLockingTableEditor) Close(ctx *sql.Context) error
Close implements the sql.Closer interface.
func (StatementLockingTableEditor) DiscardChanges ¶
func (e StatementLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
DiscardChanges implements the sql.TableEditor interface.
func (StatementLockingTableEditor) StatementBegin ¶
func (e StatementLockingTableEditor) StatementBegin(ctx *sql.Context)
StatementBegin implements the sql.TableEditor interface.
func (StatementLockingTableEditor) StatementComplete ¶
func (e StatementLockingTableEditor) StatementComplete(ctx *sql.Context) error
StatementComplete implements the sql.TableEditor interface.
Click to show internal directories.
Click to hide internal directories.