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 ¶ added in v0.17.0
func MultiDelete[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
func MultiInsert ¶ added in v0.17.0
func MultiInsert[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], row sql.Row) error
func MultiToRows ¶ added in v0.17.0
func MultiToRows[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V]) ([]sql.Row, error)
func MultiUpdate ¶ added in v0.17.0
func MultiUpdate[V any](ctx *sql.Context, ops *MultiValueOps[V], is IndexedSet[V], old, new sql.Row) error
Types ¶
type IndexedSet ¶ added in v0.17.0
func NewIndexedSet ¶ added in v0.17.0
func NewIndexedSet[V any](eqf func(V, V) bool, keyers []Keyer[V]) IndexedSet[V]
func (IndexedSet[V]) Clear ¶ added in v0.17.0
func (is IndexedSet[V]) Clear()
func (IndexedSet[V]) Count ¶ added in v0.17.0
func (is IndexedSet[V]) Count() int
func (IndexedSet[V]) Get ¶ added in v0.17.0
func (is IndexedSet[V]) Get(v V) (V, bool)
func (IndexedSet[V]) GetMany ¶ added in v0.17.0
func (is IndexedSet[V]) GetMany(keyer Keyer[V], k any) []V
func (IndexedSet[V]) Put ¶ added in v0.17.0
func (is IndexedSet[V]) Put(v V)
func (IndexedSet[V]) Remove ¶ added in v0.17.0
func (is IndexedSet[V]) Remove(v V) (res V, found bool)
func (IndexedSet[V]) RemoveMany ¶ added in v0.17.0
func (is IndexedSet[V]) RemoveMany(keyer Keyer[V], k any)
func (IndexedSet[V]) VisitEntries ¶ added in v0.17.0
func (is IndexedSet[V]) VisitEntries(f func(v V))
type IndexedSetTable ¶ added in v0.17.0
type IndexedSetTable[V any] struct { // contains filtered or unexported fields }
func NewIndexedSetTable ¶ added in v0.17.0
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 ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Collation() sql.CollationID
func (*IndexedSetTable[V]) Deleter ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
func (*IndexedSetTable[V]) Editor ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Editor() editor
func (*IndexedSetTable[V]) Inserter ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
func (*IndexedSetTable[V]) Name ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Name() string
func (*IndexedSetTable[V]) PartitionRows ¶ added in v0.17.0
func (*IndexedSetTable[V]) Partitions ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
func (*IndexedSetTable[V]) Replacer ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
func (*IndexedSetTable[V]) Schema ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Schema() sql.Schema
func (*IndexedSetTable[V]) Set ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Set() IndexedSet[V]
func (*IndexedSetTable[V]) String ¶ added in v0.17.0
func (t *IndexedSetTable[V]) String() string
func (*IndexedSetTable[V]) TableId ¶ added in v0.18.0
func (t *IndexedSetTable[V]) TableId() sql.TableId
func (*IndexedSetTable[V]) Truncate ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Truncate(ctx *sql.Context) (int, error)
func (*IndexedSetTable[V]) Updater ¶ added in v0.17.0
func (t *IndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
type IndexedSetTableEditor ¶ added in v0.17.0
type IndexedSetTableEditor[V any] struct { Set IndexedSet[V] Ops ValueOps[V] }
func (*IndexedSetTableEditor[V]) Close ¶ added in v0.17.0
func (e *IndexedSetTableEditor[V]) Close(ctx *sql.Context) error
func (*IndexedSetTableEditor[V]) DiscardChanges ¶ added in v0.17.0
func (e *IndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
func (*IndexedSetTableEditor[V]) StatementBegin ¶ added in v0.17.0
func (e *IndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
func (*IndexedSetTableEditor[V]) StatementComplete ¶ added in v0.17.0
func (e *IndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
type MultiIndexedSetTable ¶ added in v0.17.0
type MultiIndexedSetTable[V any] struct { // contains filtered or unexported fields }
func NewMultiIndexedSetTable ¶ added in v0.17.0
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 ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Collation() sql.CollationID
func (*MultiIndexedSetTable[V]) Deleter ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Deleter(ctx *sql.Context) sql.RowDeleter
func (*MultiIndexedSetTable[V]) Editor ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Editor() editor
func (*MultiIndexedSetTable[V]) Inserter ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Inserter(ctx *sql.Context) sql.RowInserter
func (*MultiIndexedSetTable[V]) Name ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Name() string
func (*MultiIndexedSetTable[V]) PartitionRows ¶ added in v0.17.0
func (*MultiIndexedSetTable[V]) Partitions ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
func (*MultiIndexedSetTable[V]) Replacer ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Replacer(ctx *sql.Context) sql.RowReplacer
func (*MultiIndexedSetTable[V]) Schema ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Schema() sql.Schema
func (*MultiIndexedSetTable[V]) Set ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Set() IndexedSet[V]
func (*MultiIndexedSetTable[V]) String ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) String() string
func (*MultiIndexedSetTable[V]) Updater ¶ added in v0.17.0
func (t *MultiIndexedSetTable[V]) Updater(ctx *sql.Context) sql.RowUpdater
type MultiIndexedSetTableEditor ¶ added in v0.17.0
type MultiIndexedSetTableEditor[V any] struct { Set IndexedSet[V] Ops MultiValueOps[V] }
func (*MultiIndexedSetTableEditor[V]) Close ¶ added in v0.17.0
func (e *MultiIndexedSetTableEditor[V]) Close(ctx *sql.Context) error
func (*MultiIndexedSetTableEditor[V]) DiscardChanges ¶ added in v0.17.0
func (e *MultiIndexedSetTableEditor[V]) DiscardChanges(ctx *sql.Context, cause error) error
func (*MultiIndexedSetTableEditor[V]) StatementBegin ¶ added in v0.17.0
func (e *MultiIndexedSetTableEditor[V]) StatementBegin(ctx *sql.Context)
func (*MultiIndexedSetTableEditor[V]) StatementComplete ¶ added in v0.17.0
func (e *MultiIndexedSetTableEditor[V]) StatementComplete(ctx *sql.Context) error
type MultiMap ¶ added in v0.17.0
type MultiMap[V any] struct { Equals func(v1, v2 V) bool // contains filtered or unexported fields }
func NewMultiMap ¶ added in v0.17.0
func (MultiMap[V]) VisitEntries ¶ added in v0.17.0
func (m MultiMap[V]) VisitEntries(f func(v V))
type MultiValueOps ¶ added in v0.17.0
type OperationLockingTableEditor ¶ added in v0.17.0
type OperationLockingTableEditor struct { L sync.Locker E sql.TableEditor }
func (OperationLockingTableEditor) Close ¶ added in v0.17.0
func (e OperationLockingTableEditor) Close(ctx *sql.Context) error
Close implements the sql.Closer interface.
func (OperationLockingTableEditor) Delete ¶ added in v0.17.0
Delete implements the sql.RowDeleter interface.
func (OperationLockingTableEditor) DiscardChanges ¶ added in v0.17.0
func (e OperationLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
DiscardChanges implements the sql.TableEditor interface.
func (OperationLockingTableEditor) Insert ¶ added in v0.17.0
Insert implements the sql.RowInserter interface.
func (OperationLockingTableEditor) StatementBegin ¶ added in v0.17.0
func (e OperationLockingTableEditor) StatementBegin(ctx *sql.Context)
StatementBegin implements the sql.TableEditor interface.
func (OperationLockingTableEditor) StatementComplete ¶ added in v0.17.0
func (e OperationLockingTableEditor) StatementComplete(ctx *sql.Context) error
OperationComplete implements the sql.TableEditor interface.
type StatementLockingTableEditor ¶ added in v0.17.0
type StatementLockingTableEditor struct { L sync.Locker E sql.TableEditor }
func (StatementLockingTableEditor) Close ¶ added in v0.17.0
func (e StatementLockingTableEditor) Close(ctx *sql.Context) error
Close implements the sql.Closer interface.
func (StatementLockingTableEditor) Delete ¶ added in v0.17.0
Delete implements the sql.RowDeleter interface.
func (StatementLockingTableEditor) DiscardChanges ¶ added in v0.17.0
func (e StatementLockingTableEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
DiscardChanges implements the sql.TableEditor interface.
func (StatementLockingTableEditor) Insert ¶ added in v0.17.0
Insert implements the sql.RowInserter interface.
func (StatementLockingTableEditor) StatementBegin ¶ added in v0.17.0
func (e StatementLockingTableEditor) StatementBegin(ctx *sql.Context)
StatementBegin implements the sql.TableEditor interface.
func (StatementLockingTableEditor) StatementComplete ¶ added in v0.17.0
func (e StatementLockingTableEditor) StatementComplete(ctx *sql.Context) error
StatementComplete implements the sql.TableEditor interface.
Click to show internal directories.
Click to hide internal directories.