Documentation ¶
Index ¶
- type AttributeRow
- type AttributeRowIter
- type Bool
- type CatalogHandler
- func (c *CatalogHandler) HandleAddTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.AddTableDefReq, ...) (err error)
- func (c *CatalogHandler) HandleClose(ctx context.Context) error
- func (c *CatalogHandler) HandleCloseTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CloseTableIterReq, ...) (err error)
- func (c *CatalogHandler) HandleCommit(ctx context.Context, meta txn.TxnMeta) (timestamp.Timestamp, error)
- func (c *CatalogHandler) HandleCommitting(ctx context.Context, meta txn.TxnMeta) error
- func (c *CatalogHandler) HandleCreateDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateDatabaseReq, ...) (err error)
- func (c *CatalogHandler) HandleCreateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateRelationReq, ...) (err error)
- func (c *CatalogHandler) HandleDelTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DelTableDefReq, ...) (err error)
- func (c *CatalogHandler) HandleDelete(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteReq, ...) (err error)
- func (c *CatalogHandler) HandleDeleteDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteDatabaseReq, ...) (err error)
- func (c *CatalogHandler) HandleDeleteRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteRelationReq, ...) (err error)
- func (c *CatalogHandler) HandleDestroy(ctx context.Context) error
- func (c *CatalogHandler) HandleGetDatabases(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetDatabasesReq, ...) error
- func (c *CatalogHandler) HandleGetHiddenKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetHiddenKeysReq, ...) (err error)
- func (c *CatalogHandler) HandleGetPrimaryKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetPrimaryKeysReq, ...) (err error)
- func (c *CatalogHandler) HandleGetRelations(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetRelationsReq, ...) (err error)
- func (c *CatalogHandler) HandleGetTableColumns(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableColumnsReq, ...) (err error)
- func (c *CatalogHandler) HandleGetTableDefs(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableDefsReq, ...) (err error)
- func (c *CatalogHandler) HandleNewTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.NewTableIterReq, ...) (err error)
- func (c *CatalogHandler) HandleOpenDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenDatabaseReq, ...) (err error)
- func (c *CatalogHandler) HandleOpenRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenRelationReq, ...) (err error)
- func (c *CatalogHandler) HandlePrepare(ctx context.Context, meta txn.TxnMeta) (timestamp.Timestamp, error)
- func (c *CatalogHandler) HandleRead(ctx context.Context, meta txn.TxnMeta, req *memoryengine.ReadReq, ...) (err error)
- func (c *CatalogHandler) HandleRollback(ctx context.Context, meta txn.TxnMeta) error
- func (c *CatalogHandler) HandleStartRecovery(ctx context.Context, ch chan txn.TxnMeta)
- func (c *CatalogHandler) HandleTableStats(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TableStatsReq, ...) (err error)
- func (c *CatalogHandler) HandleTruncateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TruncateRelationReq, ...) (err error)
- func (c *CatalogHandler) HandleUpdate(ctx context.Context, meta txn.TxnMeta, req *memoryengine.UpdateReq, ...) (err error)
- func (c *CatalogHandler) HandleWrite(ctx context.Context, meta txn.TxnMeta, req *memoryengine.WriteReq, ...) (err error)
- type DataKey
- type DataRow
- type DataValue
- type DatabaseRow
- type DatabaseRowIter
- type DynamicStorage
- func (d *DynamicStorage) Close(ctx context.Context) error
- func (d *DynamicStorage) Commit(ctx context.Context, txnMeta txn.TxnMeta) (timestamp.Timestamp, error)
- func (d *DynamicStorage) Committing(ctx context.Context, txnMeta txn.TxnMeta) error
- func (d *DynamicStorage) Debug(context.Context, txn.TxnMeta, uint32, []byte) ([]byte, error)
- func (d *DynamicStorage) Destroy(ctx context.Context) error
- func (d *DynamicStorage) Prepare(ctx context.Context, txnMeta txn.TxnMeta) (ts timestamp.Timestamp, err error)
- func (d *DynamicStorage) Read(ctx context.Context, txnMeta txn.TxnMeta, op uint32, payload []byte) (res storage.ReadResult, err error)
- func (d *DynamicStorage) Rollback(ctx context.Context, txnMeta txn.TxnMeta) error
- func (d *DynamicStorage) Start() error
- func (d *DynamicStorage) StartRecovery(ctx context.Context, ch chan txn.TxnMeta)
- func (d *DynamicStorage) Write(ctx context.Context, txnMeta txn.TxnMeta, op uint32, payload []byte) ([]byte, error)
- type Handler
- type ID
- type Iter
- type MemHandler
- func (m *MemHandler) HandleAddTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.AddTableDefReq, ...) error
- func (*MemHandler) HandleClose(ctx context.Context) error
- func (m *MemHandler) HandleCloseTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CloseTableIterReq, ...) error
- func (m *MemHandler) HandleCommit(ctx context.Context, meta txn.TxnMeta) (timestamp.Timestamp, error)
- func (m *MemHandler) HandleCommitting(ctx context.Context, meta txn.TxnMeta) error
- func (m *MemHandler) HandleCreateDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateDatabaseReq, ...) error
- func (m *MemHandler) HandleCreateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateRelationReq, ...) error
- func (m *MemHandler) HandleDelTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DelTableDefReq, ...) error
- func (m *MemHandler) HandleDelete(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteReq, ...) error
- func (m *MemHandler) HandleDeleteDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteDatabaseReq, ...) error
- func (m *MemHandler) HandleDeleteRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteRelationReq, ...) error
- func (m *MemHandler) HandleDestroy(ctx context.Context) error
- func (m *MemHandler) HandleGetDatabases(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetDatabasesReq, ...) error
- func (m *MemHandler) HandleGetHiddenKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetHiddenKeysReq, ...) error
- func (m *MemHandler) HandleGetPrimaryKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetPrimaryKeysReq, ...) error
- func (m *MemHandler) HandleGetRelations(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetRelationsReq, ...) error
- func (m *MemHandler) HandleGetTableColumns(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableColumnsReq, ...) error
- func (m *MemHandler) HandleGetTableDefs(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableDefsReq, ...) error
- func (m *MemHandler) HandleNewTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.NewTableIterReq, ...) error
- func (m *MemHandler) HandleOpenDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenDatabaseReq, ...) error
- func (m *MemHandler) HandleOpenRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenRelationReq, ...) error
- func (m *MemHandler) HandlePrepare(ctx context.Context, meta txn.TxnMeta) (timestamp.Timestamp, error)
- func (m *MemHandler) HandleRead(ctx context.Context, meta txn.TxnMeta, req *memoryengine.ReadReq, ...) error
- func (m *MemHandler) HandleRollback(ctx context.Context, meta txn.TxnMeta) error
- func (m *MemHandler) HandleStartRecovery(ctx context.Context, ch chan txn.TxnMeta)
- func (m *MemHandler) HandleTableStats(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TableStatsReq, ...) (err error)
- func (m *MemHandler) HandleTruncateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TruncateRelationReq, ...) error
- func (m *MemHandler) HandleUpdate(ctx context.Context, meta txn.TxnMeta, req *memoryengine.UpdateReq, ...) error
- func (m *MemHandler) HandleWrite(ctx context.Context, meta txn.TxnMeta, req *memoryengine.WriteReq, ...) error
- type NamedDataRow
- type NamedRow
- type Nullable
- type RelationRow
- type RelationRowIter
- type Storage
- func (s *Storage) Close(ctx context.Context) error
- func (s *Storage) Commit(ctx context.Context, txnMeta txn.TxnMeta) (timestamp.Timestamp, error)
- func (s *Storage) Committing(ctx context.Context, txnMeta txn.TxnMeta) error
- func (s *Storage) Debug(context.Context, txn.TxnMeta, uint32, []byte) ([]byte, error)
- func (s *Storage) Destroy(ctx context.Context) error
- func (s *Storage) Prepare(ctx context.Context, txnMeta txn.TxnMeta) (timestamp.Timestamp, error)
- func (s *Storage) Read(ctx context.Context, txnMeta txn.TxnMeta, op uint32, payload []byte) (res storage.ReadResult, err error)
- func (s *Storage) Rollback(ctx context.Context, txnMeta txn.TxnMeta) error
- func (s *Storage) Start() error
- func (s *Storage) StartRecovery(ctx context.Context, ch chan txn.TxnMeta)
- func (s *Storage) Write(ctx context.Context, txnMeta txn.TxnMeta, op uint32, payload []byte) (result []byte, err error)
- type StorageTxnClient
- func (*StorageTxnClient) AbortAllRunningTxn()
- func (*StorageTxnClient) CNBasedConsistencyEnabled() bool
- func (*StorageTxnClient) Close() error
- func (*StorageTxnClient) GetLatestCommitTS() timestamp.Timestamp
- func (*StorageTxnClient) GetSyncLatestCommitTSTimes() uint64
- func (s *StorageTxnClient) IterTxns(func(client.TxnOverview) bool)
- func (*StorageTxnClient) MinTimestamp() timestamp.Timestamp
- func (s *StorageTxnClient) New(ctx context.Context, ts timestamp.Timestamp, options ...client.TxnOption) (client.TxnOperator, error)
- func (*StorageTxnClient) NewWithSnapshot(snapshot []byte) (client.TxnOperator, error)
- func (*StorageTxnClient) Pause()
- func (*StorageTxnClient) RefreshExpressionEnabled() bool
- func (*StorageTxnClient) Resume()
- func (*StorageTxnClient) SyncLatestCommitTS(timestamp.Timestamp)
- func (*StorageTxnClient) WaitLogTailAppliedAt(ctx context.Context, ts timestamp.Timestamp) (timestamp.Timestamp, error)
- type StorageTxnOperator
- func (s *StorageTxnOperator) AddLockTable(lock.LockTable) error
- func (s *StorageTxnOperator) AddWaitLock(tableID uint64, rows [][]byte, opt lock.LockOptions) uint64
- func (s *StorageTxnOperator) AddWorkspace(_ client.Workspace)
- func (s *StorageTxnOperator) AppendEventCallback(event client.EventType, callbacks ...func(txn.TxnMeta))
- func (s *StorageTxnOperator) ApplySnapshot(data []byte) error
- func (s *StorageTxnOperator) Commit(ctx context.Context) error
- func (s *StorageTxnOperator) Debug(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
- func (s *StorageTxnOperator) GetOperationHandler(shard memoryengine.Shard) (memoryengine.OperationHandler, txn.TxnMeta)
- func (s *StorageTxnOperator) GetOverview() client.TxnOverview
- func (s *StorageTxnOperator) GetWorkspace() client.Workspace
- func (s *StorageTxnOperator) IsRetry() bool
- func (s *StorageTxnOperator) Read(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
- func (s *StorageTxnOperator) RemoveWaitLock(key uint64)
- func (s *StorageTxnOperator) ResetRetry(retry bool)
- func (s *StorageTxnOperator) Rollback(ctx context.Context) error
- func (*StorageTxnOperator) Snapshot() ([]byte, error)
- func (s *StorageTxnOperator) SnapshotTS() timestamp.Timestamp
- func (s *StorageTxnOperator) Status() txn.TxnStatus
- func (s *StorageTxnOperator) Txn() txn.TxnMeta
- func (s *StorageTxnOperator) TxnRef() *txn.TxnMeta
- func (s *StorageTxnOperator) UpdateSnapshot(ctx context.Context, ts timestamp.Timestamp) error
- func (s *StorageTxnOperator) Write(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
- func (s *StorageTxnOperator) WriteAndCommit(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
- type Text
- type Time
- type Transaction
- type Tuple
- type Uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeRow ¶
func (*AttributeRow) AttrByName ¶
func (a *AttributeRow) AttrByName(handler *MemHandler, tx *Transaction, name string) (ret Nullable, err error)
func (*AttributeRow) Indexes ¶
func (a *AttributeRow) Indexes() []Tuple
func (*AttributeRow) Key ¶
func (a *AttributeRow) Key() ID
func (*AttributeRow) UniqueIndexes ¶
func (a *AttributeRow) UniqueIndexes() []Tuple
func (*AttributeRow) Value ¶
func (a *AttributeRow) Value() *AttributeRow
type AttributeRowIter ¶
type AttributeRowIter = Iter[ID, *AttributeRow]
type Bool ¶
type Bool = memorytable.Bool
type CatalogHandler ¶
type CatalogHandler struct {
// contains filtered or unexported fields
}
CatalogHandler handles read-only requests for catalog
func NewCatalogHandler ¶
func NewCatalogHandler(upstream *MemHandler) (*CatalogHandler, error)
func (*CatalogHandler) HandleAddTableDef ¶
func (c *CatalogHandler) HandleAddTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.AddTableDefReq, resp *memoryengine.AddTableDefResp) (err error)
func (*CatalogHandler) HandleClose ¶
func (c *CatalogHandler) HandleClose(ctx context.Context) error
func (*CatalogHandler) HandleCloseTableIter ¶
func (c *CatalogHandler) HandleCloseTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CloseTableIterReq, resp *memoryengine.CloseTableIterResp) (err error)
func (*CatalogHandler) HandleCommit ¶
func (*CatalogHandler) HandleCommitting ¶
func (*CatalogHandler) HandleCreateDatabase ¶
func (c *CatalogHandler) HandleCreateDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateDatabaseReq, resp *memoryengine.CreateDatabaseResp) (err error)
func (*CatalogHandler) HandleCreateRelation ¶
func (c *CatalogHandler) HandleCreateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateRelationReq, resp *memoryengine.CreateRelationResp) (err error)
func (*CatalogHandler) HandleDelTableDef ¶
func (c *CatalogHandler) HandleDelTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DelTableDefReq, resp *memoryengine.DelTableDefResp) (err error)
func (*CatalogHandler) HandleDelete ¶
func (c *CatalogHandler) HandleDelete(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteReq, resp *memoryengine.DeleteResp) (err error)
func (*CatalogHandler) HandleDeleteDatabase ¶
func (c *CatalogHandler) HandleDeleteDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteDatabaseReq, resp *memoryengine.DeleteDatabaseResp) (err error)
func (*CatalogHandler) HandleDeleteRelation ¶
func (c *CatalogHandler) HandleDeleteRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteRelationReq, resp *memoryengine.DeleteRelationResp) (err error)
func (*CatalogHandler) HandleDestroy ¶
func (c *CatalogHandler) HandleDestroy(ctx context.Context) error
func (*CatalogHandler) HandleGetDatabases ¶
func (c *CatalogHandler) HandleGetDatabases(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetDatabasesReq, resp *memoryengine.GetDatabasesResp) error
func (*CatalogHandler) HandleGetHiddenKeys ¶
func (c *CatalogHandler) HandleGetHiddenKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetHiddenKeysReq, resp *memoryengine.GetHiddenKeysResp) (err error)
func (*CatalogHandler) HandleGetPrimaryKeys ¶
func (c *CatalogHandler) HandleGetPrimaryKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetPrimaryKeysReq, resp *memoryengine.GetPrimaryKeysResp) (err error)
func (*CatalogHandler) HandleGetRelations ¶
func (c *CatalogHandler) HandleGetRelations(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetRelationsReq, resp *memoryengine.GetRelationsResp) (err error)
func (*CatalogHandler) HandleGetTableColumns ¶
func (c *CatalogHandler) HandleGetTableColumns(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableColumnsReq, resp *memoryengine.GetTableColumnsResp) (err error)
func (*CatalogHandler) HandleGetTableDefs ¶
func (c *CatalogHandler) HandleGetTableDefs(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableDefsReq, resp *memoryengine.GetTableDefsResp) (err error)
func (*CatalogHandler) HandleNewTableIter ¶
func (c *CatalogHandler) HandleNewTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.NewTableIterReq, resp *memoryengine.NewTableIterResp) (err error)
func (*CatalogHandler) HandleOpenDatabase ¶
func (c *CatalogHandler) HandleOpenDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenDatabaseReq, resp *memoryengine.OpenDatabaseResp) (err error)
func (*CatalogHandler) HandleOpenRelation ¶
func (c *CatalogHandler) HandleOpenRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenRelationReq, resp *memoryengine.OpenRelationResp) (err error)
func (*CatalogHandler) HandlePrepare ¶
func (*CatalogHandler) HandleRead ¶
func (c *CatalogHandler) HandleRead(ctx context.Context, meta txn.TxnMeta, req *memoryengine.ReadReq, resp *memoryengine.ReadResp) (err error)
func (*CatalogHandler) HandleRollback ¶
func (*CatalogHandler) HandleStartRecovery ¶
func (c *CatalogHandler) HandleStartRecovery(ctx context.Context, ch chan txn.TxnMeta)
func (*CatalogHandler) HandleTableStats ¶
func (c *CatalogHandler) HandleTableStats(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TableStatsReq, resp *memoryengine.TableStatsResp) (err error)
func (*CatalogHandler) HandleTruncateRelation ¶
func (c *CatalogHandler) HandleTruncateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TruncateRelationReq, resp *memoryengine.TruncateRelationResp) (err error)
func (*CatalogHandler) HandleUpdate ¶
func (c *CatalogHandler) HandleUpdate(ctx context.Context, meta txn.TxnMeta, req *memoryengine.UpdateReq, resp *memoryengine.UpdateResp) (err error)
func (*CatalogHandler) HandleWrite ¶
func (c *CatalogHandler) HandleWrite(ctx context.Context, meta txn.TxnMeta, req *memoryengine.WriteReq, resp *memoryengine.WriteResp) (err error)
type DataRow ¶
type DataRow struct {
// contains filtered or unexported fields
}
func NewDataRow ¶
func (DataRow) UniqueIndexes ¶
type DatabaseRow ¶
type DatabaseRow struct { ID ID AccountID uint32 // 0 is the sys account Name []byte Typ []byte CreateSql []byte }
func (*DatabaseRow) AttrByName ¶
func (d *DatabaseRow) AttrByName(handler *MemHandler, tx *Transaction, name string) (ret Nullable, err error)
func (*DatabaseRow) Indexes ¶
func (d *DatabaseRow) Indexes() []Tuple
func (*DatabaseRow) Key ¶
func (d *DatabaseRow) Key() ID
func (*DatabaseRow) UniqueIndexes ¶
func (d *DatabaseRow) UniqueIndexes() []Tuple
func (*DatabaseRow) Value ¶
func (d *DatabaseRow) Value() *DatabaseRow
type DatabaseRowIter ¶
type DatabaseRowIter = Iter[ID, *DatabaseRow]
type DynamicStorage ¶
type DynamicStorage struct {
// contains filtered or unexported fields
}
func NewDynamicStorage ¶
func (*DynamicStorage) Committing ¶
func (*DynamicStorage) Read ¶
func (d *DynamicStorage) Read(ctx context.Context, txnMeta txn.TxnMeta, op uint32, payload []byte) (res storage.ReadResult, err error)
func (*DynamicStorage) Start ¶ added in v0.7.0
func (d *DynamicStorage) Start() error
func (*DynamicStorage) StartRecovery ¶
func (d *DynamicStorage) StartRecovery(ctx context.Context, ch chan txn.TxnMeta)
type Handler ¶
type Handler interface { memoryengine.OperationHandler HandleCommit( ctx context.Context, meta txn.TxnMeta, ) (timestamp.Timestamp, error) HandleRollback( ctx context.Context, meta txn.TxnMeta, ) error HandleCommitting( ctx context.Context, meta txn.TxnMeta, ) error HandlePrepare( ctx context.Context, meta txn.TxnMeta, ) ( timestamp.Timestamp, error, ) HandleStartRecovery( ctx context.Context, ch chan txn.TxnMeta, ) HandleClose(ctx context.Context) error HandleDestroy(ctx context.Context) error }
type ID ¶
type ID = memoryengine.ID
type Iter ¶
type Iter[ K memorytable.Ordered[K], V any, ] struct { TableIter *memorytable.TableIter[K, V] TableID ID AttrsMap map[string]*AttributeRow Expr *plan.Expr Tx *Transaction // contains filtered or unexported fields }
type MemHandler ¶
type MemHandler struct {
// contains filtered or unexported fields
}
func NewMemHandler ¶
func NewMemHandler( mp *mpool.MPool, clock clock.Clock, idGenerator memoryengine.IDGenerator, ) *MemHandler
func (*MemHandler) HandleAddTableDef ¶
func (m *MemHandler) HandleAddTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.AddTableDefReq, resp *memoryengine.AddTableDefResp) error
func (*MemHandler) HandleClose ¶
func (*MemHandler) HandleClose(ctx context.Context) error
func (*MemHandler) HandleCloseTableIter ¶
func (m *MemHandler) HandleCloseTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CloseTableIterReq, resp *memoryengine.CloseTableIterResp) error
func (*MemHandler) HandleCommit ¶
func (*MemHandler) HandleCommitting ¶
func (*MemHandler) HandleCreateDatabase ¶
func (m *MemHandler) HandleCreateDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateDatabaseReq, resp *memoryengine.CreateDatabaseResp) error
func (*MemHandler) HandleCreateRelation ¶
func (m *MemHandler) HandleCreateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.CreateRelationReq, resp *memoryengine.CreateRelationResp) error
func (*MemHandler) HandleDelTableDef ¶
func (m *MemHandler) HandleDelTableDef(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DelTableDefReq, resp *memoryengine.DelTableDefResp) error
func (*MemHandler) HandleDelete ¶
func (m *MemHandler) HandleDelete(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteReq, resp *memoryengine.DeleteResp) error
func (*MemHandler) HandleDeleteDatabase ¶
func (m *MemHandler) HandleDeleteDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteDatabaseReq, resp *memoryengine.DeleteDatabaseResp) error
func (*MemHandler) HandleDeleteRelation ¶
func (m *MemHandler) HandleDeleteRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.DeleteRelationReq, resp *memoryengine.DeleteRelationResp) error
func (*MemHandler) HandleDestroy ¶
func (m *MemHandler) HandleDestroy(ctx context.Context) error
func (*MemHandler) HandleGetDatabases ¶
func (m *MemHandler) HandleGetDatabases(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetDatabasesReq, resp *memoryengine.GetDatabasesResp) error
func (*MemHandler) HandleGetHiddenKeys ¶
func (m *MemHandler) HandleGetHiddenKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetHiddenKeysReq, resp *memoryengine.GetHiddenKeysResp) error
func (*MemHandler) HandleGetPrimaryKeys ¶
func (m *MemHandler) HandleGetPrimaryKeys(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetPrimaryKeysReq, resp *memoryengine.GetPrimaryKeysResp) error
func (*MemHandler) HandleGetRelations ¶
func (m *MemHandler) HandleGetRelations(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetRelationsReq, resp *memoryengine.GetRelationsResp) error
func (*MemHandler) HandleGetTableColumns ¶
func (m *MemHandler) HandleGetTableColumns(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableColumnsReq, resp *memoryengine.GetTableColumnsResp) error
func (*MemHandler) HandleGetTableDefs ¶
func (m *MemHandler) HandleGetTableDefs(ctx context.Context, meta txn.TxnMeta, req *memoryengine.GetTableDefsReq, resp *memoryengine.GetTableDefsResp) error
func (*MemHandler) HandleNewTableIter ¶
func (m *MemHandler) HandleNewTableIter(ctx context.Context, meta txn.TxnMeta, req *memoryengine.NewTableIterReq, resp *memoryengine.NewTableIterResp) error
func (*MemHandler) HandleOpenDatabase ¶
func (m *MemHandler) HandleOpenDatabase(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenDatabaseReq, resp *memoryengine.OpenDatabaseResp) error
func (*MemHandler) HandleOpenRelation ¶
func (m *MemHandler) HandleOpenRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.OpenRelationReq, resp *memoryengine.OpenRelationResp) error
func (*MemHandler) HandlePrepare ¶
func (*MemHandler) HandleRead ¶
func (m *MemHandler) HandleRead(ctx context.Context, meta txn.TxnMeta, req *memoryengine.ReadReq, resp *memoryengine.ReadResp) error
func (*MemHandler) HandleRollback ¶
func (*MemHandler) HandleStartRecovery ¶
func (m *MemHandler) HandleStartRecovery(ctx context.Context, ch chan txn.TxnMeta)
func (*MemHandler) HandleTableStats ¶
func (m *MemHandler) HandleTableStats(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TableStatsReq, resp *memoryengine.TableStatsResp) (err error)
func (*MemHandler) HandleTruncateRelation ¶
func (m *MemHandler) HandleTruncateRelation(ctx context.Context, meta txn.TxnMeta, req *memoryengine.TruncateRelationReq, resp *memoryengine.TruncateRelationResp) error
func (*MemHandler) HandleUpdate ¶
func (m *MemHandler) HandleUpdate(ctx context.Context, meta txn.TxnMeta, req *memoryengine.UpdateReq, resp *memoryengine.UpdateResp) error
func (*MemHandler) HandleWrite ¶
func (m *MemHandler) HandleWrite(ctx context.Context, meta txn.TxnMeta, req *memoryengine.WriteReq, resp *memoryengine.WriteResp) error
type NamedDataRow ¶
type NamedDataRow struct { Value DataValue AttrsMap map[string]*AttributeRow }
func (*NamedDataRow) AttrByName ¶
func (n *NamedDataRow) AttrByName(handler *MemHandler, tx *Transaction, name string) (Nullable, error)
type NamedRow ¶
type NamedRow interface {
AttrByName(handler *MemHandler, tx *Transaction, name string) (Nullable, error)
}
type Nullable ¶
type Nullable = memorytable.Nullable
type RelationRow ¶
type RelationRow struct { ID ID DatabaseID ID Name []byte Type memoryengine.RelationType Comments []byte Properties map[string]string Partitioned int8 // 1 : the table has partitions. 0 : no partition PartitionDef []byte // partition info for the table has paritions ViewDef []byte Constraint []byte }
func (*RelationRow) AttrByName ¶
func (r *RelationRow) AttrByName(handler *MemHandler, tx *Transaction, name string) (ret Nullable, err error)
func (*RelationRow) Indexes ¶
func (r *RelationRow) Indexes() []Tuple
func (*RelationRow) Key ¶
func (r *RelationRow) Key() ID
func (*RelationRow) UniqueIndexes ¶
func (r *RelationRow) UniqueIndexes() []Tuple
func (*RelationRow) Value ¶
func (r *RelationRow) Value() *RelationRow
type RelationRowIter ¶
type RelationRowIter = Iter[ID, *RelationRow]
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewMemoryStorage ¶
func NewMemoryStorage( mheap *mpool.MPool, clock clock.Clock, idGenerator memoryengine.IDGenerator, ) (*Storage, error)
func (*Storage) Committing ¶
func (*Storage) StartRecovery ¶
type StorageTxnClient ¶
type StorageTxnClient struct {
// contains filtered or unexported fields
}
func NewStorageTxnClient ¶
func NewStorageTxnClient( clock clock.Clock, storages map[string]*Storage, ) *StorageTxnClient
func (*StorageTxnClient) AbortAllRunningTxn ¶ added in v0.8.0
func (*StorageTxnClient) AbortAllRunningTxn()
func (*StorageTxnClient) CNBasedConsistencyEnabled ¶ added in v1.0.0
func (*StorageTxnClient) CNBasedConsistencyEnabled() bool
func (*StorageTxnClient) Close ¶
func (*StorageTxnClient) Close() error
func (*StorageTxnClient) GetLatestCommitTS ¶ added in v1.0.0
func (*StorageTxnClient) GetLatestCommitTS() timestamp.Timestamp
func (*StorageTxnClient) GetSyncLatestCommitTSTimes ¶ added in v1.0.0
func (*StorageTxnClient) GetSyncLatestCommitTSTimes() uint64
func (*StorageTxnClient) IterTxns ¶ added in v1.0.0
func (s *StorageTxnClient) IterTxns(func(client.TxnOverview) bool)
func (*StorageTxnClient) MinTimestamp ¶ added in v0.8.0
func (*StorageTxnClient) MinTimestamp() timestamp.Timestamp
func (*StorageTxnClient) New ¶
func (s *StorageTxnClient) New( ctx context.Context, ts timestamp.Timestamp, options ...client.TxnOption) (client.TxnOperator, error)
func (*StorageTxnClient) NewWithSnapshot ¶
func (*StorageTxnClient) NewWithSnapshot(snapshot []byte) (client.TxnOperator, error)
func (*StorageTxnClient) Pause ¶ added in v1.0.0
func (*StorageTxnClient) Pause()
func (*StorageTxnClient) RefreshExpressionEnabled ¶ added in v1.0.0
func (*StorageTxnClient) RefreshExpressionEnabled() bool
func (*StorageTxnClient) Resume ¶ added in v1.0.0
func (*StorageTxnClient) Resume()
func (*StorageTxnClient) SyncLatestCommitTS ¶ added in v1.0.0
func (*StorageTxnClient) SyncLatestCommitTS(timestamp.Timestamp)
func (*StorageTxnClient) WaitLogTailAppliedAt ¶ added in v0.8.0
type StorageTxnOperator ¶
type StorageTxnOperator struct {
// contains filtered or unexported fields
}
func (*StorageTxnOperator) AddLockTable ¶ added in v0.8.0
func (s *StorageTxnOperator) AddLockTable(lock.LockTable) error
func (*StorageTxnOperator) AddWaitLock ¶ added in v1.0.0
func (s *StorageTxnOperator) AddWaitLock(tableID uint64, rows [][]byte, opt lock.LockOptions) uint64
func (*StorageTxnOperator) AddWorkspace ¶ added in v0.8.0
func (s *StorageTxnOperator) AddWorkspace(_ client.Workspace)
func (*StorageTxnOperator) AppendEventCallback ¶ added in v1.0.0
func (s *StorageTxnOperator) AppendEventCallback(event client.EventType, callbacks ...func(txn.TxnMeta))
func (*StorageTxnOperator) ApplySnapshot ¶
func (s *StorageTxnOperator) ApplySnapshot(data []byte) error
func (*StorageTxnOperator) Debug ¶ added in v1.0.0
func (s *StorageTxnOperator) Debug(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
func (*StorageTxnOperator) GetOperationHandler ¶
func (s *StorageTxnOperator) GetOperationHandler(shard memoryengine.Shard) (memoryengine.OperationHandler, txn.TxnMeta)
func (*StorageTxnOperator) GetOverview ¶ added in v1.0.0
func (s *StorageTxnOperator) GetOverview() client.TxnOverview
func (*StorageTxnOperator) GetWorkspace ¶ added in v0.8.0
func (s *StorageTxnOperator) GetWorkspace() client.Workspace
func (*StorageTxnOperator) IsRetry ¶ added in v1.0.0
func (s *StorageTxnOperator) IsRetry() bool
func (*StorageTxnOperator) Read ¶
func (s *StorageTxnOperator) Read(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
func (*StorageTxnOperator) RemoveWaitLock ¶ added in v1.0.0
func (s *StorageTxnOperator) RemoveWaitLock(key uint64)
func (*StorageTxnOperator) ResetRetry ¶ added in v1.0.0
func (s *StorageTxnOperator) ResetRetry(retry bool)
func (*StorageTxnOperator) Rollback ¶
func (s *StorageTxnOperator) Rollback(ctx context.Context) error
func (*StorageTxnOperator) Snapshot ¶
func (*StorageTxnOperator) Snapshot() ([]byte, error)
func (*StorageTxnOperator) SnapshotTS ¶ added in v1.0.0
func (s *StorageTxnOperator) SnapshotTS() timestamp.Timestamp
func (*StorageTxnOperator) Status ¶ added in v1.0.0
func (s *StorageTxnOperator) Status() txn.TxnStatus
func (*StorageTxnOperator) Txn ¶
func (s *StorageTxnOperator) Txn() txn.TxnMeta
func (*StorageTxnOperator) TxnRef ¶ added in v0.8.0
func (s *StorageTxnOperator) TxnRef() *txn.TxnMeta
func (*StorageTxnOperator) UpdateSnapshot ¶ added in v0.8.0
func (*StorageTxnOperator) Write ¶
func (s *StorageTxnOperator) Write(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
func (*StorageTxnOperator) WriteAndCommit ¶
func (s *StorageTxnOperator) WriteAndCommit(ctx context.Context, ops []txn.TxnRequest) (*rpc.SendResult, error)
type Text ¶
type Text = memorytable.Text
type Time ¶
type Time = memorytable.Time
type Transaction ¶
type Transaction = memorytable.Transaction
type Tuple ¶
type Tuple = memorytable.Tuple
type Uint ¶
type Uint = memorytable.Uint
Source Files ¶
Click to show internal directories.
Click to hide internal directories.