Documentation ¶
Index ¶
- Constants
- Variables
- func DedupOp[T comparable](t *types.Type, attr string, vs []T, tree map[any]uint32) (err error)
- func EncodeAppendInfo(info *appendInfo) []byte
- func FillColumnRow(table *catalog.TableEntry, node *catalog.MVCCNode[*catalog.TableMVCCNode], ...)
- func FillDBRow(db *catalog.DBEntry, _ *catalog.MVCCNode[*catalog.EmptyMVCCNode], attr string, ...)
- func FillTableRow(table *catalog.TableEntry, node *catalog.MVCCNode[*catalog.TableMVCCNode], ...)
- func InsertOp[T comparable](t *types.Type, attr string, vals []T, start, count int, fromRow uint32, ...) (err error)
- func MakeReplayTxn(ctx context.Context, mgr *txnbase.TxnManager, txnCtx *txnbase.TxnCtx, ...) *txnbase.Txn
- func NewANode(tbl *txnTable, meta *catalog.BlockEntry) *anode
- func NewSimpleTableIndex() *simpleTableIndex
- type AppendCmd
- func (c *AppendCmd) ApplyCommit()
- func (c *AppendCmd) ApplyRollback()
- func (c *AppendCmd) Close()
- func (c *AppendCmd) Desc() string
- func (c *AppendCmd) GetType() uint16
- func (c *AppendCmd) MarshalBinary() (buf []byte, err error)
- func (c *AppendCmd) ReadFrom(r io.Reader) (n int64, err error)
- func (c *AppendCmd) ReadFromV1(r io.Reader) (n int64, err error)
- func (c *AppendCmd) SetReplayTxn(_ txnif.AsyncTxn)
- func (c *AppendCmd) String() string
- func (c *AppendCmd) UnmarshalBinary(buf []byte) error
- func (c *AppendCmd) UnmarshalBinaryV1(buf []byte) error
- func (c *AppendCmd) VerboseString() string
- func (c *AppendCmd) WriteTo(w io.Writer) (n int64, err error)
- type InsertNode
- type TableIndex
Constants ¶
View Source
const ( IOET_WALTxnCommand_Append uint16 = 3008 IOET_WALTxnCommand_Append_V1 uint16 = 1 IOET_WALTxnCommand_Append_V2 uint16 = 2 IOET_WALTxnCommand_Append_CurrVer = IOET_WALTxnCommand_Append_V2 )
View Source
const ( IOET_WALEntry_TxnRecord = entry.IOET_WALEntry_CustomizedStart + iota IOET_WALEntry_TxnState )
View Source
const (
AppendInfoSize int64 = int64(unsafe.Sizeof(appendInfo{}))
)
View Source
const ( // Note: Do not edit this id!!! LocalSegmentStartID uint64 = 1 << 47 )
View Source
const MaxNodeRows = 10000
Variables ¶
View Source
var (
ErrDuplicateNode = moerr.NewInternalErrorNoCtx("tae: duplicate node")
)
View Source
var TxnFactory = func(catalog *catalog.Catalog) txnbase.TxnFactory { return func(mgr *txnbase.TxnManager, store txnif.TxnStore, txnId []byte, start, snapshot types.TS) txnif.AsyncTxn { return newTxnImpl(catalog, mgr, store, txnId, start, snapshot) } }
View Source
var TxnStoreFactory = func( ctx context.Context, catalog *catalog.Catalog, driver wal.Driver, rt *dbutils.Runtime, dataFactory *tables.DataFactory, maxMessageSize uint64) txnbase.TxnStoreFactory { return func() txnif.TxnStore { return newStore(ctx, catalog, driver, rt, dataFactory, maxMessageSize) } }
Functions ¶
func EncodeAppendInfo ¶ added in v0.8.0
func EncodeAppendInfo(info *appendInfo) []byte
func FillColumnRow ¶ added in v0.6.0
func FillColumnRow(table *catalog.TableEntry, node *catalog.MVCCNode[*catalog.TableMVCCNode], attr string, colData containers.Vector)
func FillDBRow ¶ added in v0.6.0
func FillDBRow(db *catalog.DBEntry, _ *catalog.MVCCNode[*catalog.EmptyMVCCNode], attr string, colData containers.Vector)
func FillTableRow ¶ added in v0.6.0
func FillTableRow(table *catalog.TableEntry, node *catalog.MVCCNode[*catalog.TableMVCCNode], attr string, colData containers.Vector)
func MakeReplayTxn ¶ added in v0.6.0
func NewANode ¶ added in v0.7.0
func NewANode( tbl *txnTable, meta *catalog.BlockEntry, ) *anode
NewANode creates a InsertNode with data in memory.
func NewSimpleTableIndex ¶
func NewSimpleTableIndex() *simpleTableIndex
Types ¶
type AppendCmd ¶
type AppendCmd struct { *txnbase.BaseCustomizedCmd Data *containers.Batch Infos []*appendInfo Ts types.TS Node InsertNode }
func NewAppendCmd ¶
func NewAppendCmd(id uint32, node InsertNode, data *containers.Batch) *AppendCmd
func NewEmptyAppendCmd ¶
func NewEmptyAppendCmd() *AppendCmd
func (*AppendCmd) ApplyCommit ¶ added in v0.8.0
func (c *AppendCmd) ApplyCommit()
func (*AppendCmd) ApplyRollback ¶ added in v0.8.0
func (c *AppendCmd) ApplyRollback()
func (*AppendCmd) MarshalBinary ¶ added in v0.8.0
func (*AppendCmd) ReadFromV1 ¶ added in v0.8.0
func (*AppendCmd) SetReplayTxn ¶ added in v0.8.0
func (*AppendCmd) UnmarshalBinary ¶ added in v0.8.0
func (*AppendCmd) UnmarshalBinaryV1 ¶ added in v0.8.0
func (*AppendCmd) VerboseString ¶
type InsertNode ¶
type InsertNode interface { Close() error Append(data *containers.Batch, offset uint32) (appended uint32, err error) RangeDelete(start, end uint32) error IsRowDeleted(row uint32) bool IsPersisted() bool PrintDeletes() string GetColumnDataByIds([]int) (*containers.BlockView, error) GetColumnDataById(context.Context, int) (*containers.ColumnView, error) Prefetch(idxes []uint16) error FillBlockView(view *containers.BlockView, colIdxes []int) (err error) FillColumnView(*containers.ColumnView) error Window(start, end uint32) (*containers.Batch, error) WindowColumn(start, end uint32, pos int) (containers.Vector, error) GetSpace() uint32 Rows() uint32 GetValue(col int, row uint32) (any, bool, error) MakeCommand(uint32) (txnif.TxnCmd, error) AddApplyInfo(srcOff, srcLen, destOff, destLen uint32, dest *common.ID) *appendInfo GetAppends() []*appendInfo GetTxn() txnif.AsyncTxn GetPersistedLoc() (objectio.Location, objectio.Location) }
type TableIndex ¶
type TableIndex interface { io.Closer BatchDedup(string, containers.Vector) error BatchInsert(string, containers.Vector, int, int, uint32, bool) error Insert(any, uint32) error Delete(any) error Search(any) (uint32, error) Name() string Count() int KeyToVector(types.Type) containers.Vector KeyToVectors(types.Type) []containers.Vector }
Click to show internal directories.
Click to hide internal directories.