delta

package
v0.0.0-...-068cd59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AugmentedColumnList = "action, txn_tag, txn_server, txn_group, txn_seq, txn_stmt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeltaAppender

type DeltaAppender struct {
	// contains filtered or unexported fields
}

func (*DeltaAppender) Action

func (a *DeltaAppender) Action() *array.Int8Builder

func (*DeltaAppender) BaseSchema

func (a *DeltaAppender) BaseSchema() sql.Schema

func (*DeltaAppender) Build

func (a *DeltaAppender) Build() arrow.Record

func (*DeltaAppender) Field

func (a *DeltaAppender) Field(i int) array.Builder

func (*DeltaAppender) Fields

func (a *DeltaAppender) Fields() []array.Builder

func (*DeltaAppender) Grow

func (a *DeltaAppender) Grow(n int)

func (*DeltaAppender) NumAugmentedFields

func (a *DeltaAppender) NumAugmentedFields() int

func (*DeltaAppender) ObserveEvents

func (a *DeltaAppender) ObserveEvents(event binlog.RowEventType, count int)

func (*DeltaAppender) Release

func (a *DeltaAppender) Release()

func (*DeltaAppender) ResetCounters

func (a *DeltaAppender) ResetCounters()

func (*DeltaAppender) RowCount

func (a *DeltaAppender) RowCount() int

func (*DeltaAppender) Schema

func (a *DeltaAppender) Schema() sql.Schema

func (*DeltaAppender) TxnGroup

func (*DeltaAppender) TxnSeqNumber

func (a *DeltaAppender) TxnSeqNumber() *array.Uint64Builder

func (*DeltaAppender) TxnServer

func (*DeltaAppender) TxnStmtOrdinal

func (a *DeltaAppender) TxnStmtOrdinal() *array.Uint64Builder

func (*DeltaAppender) TxnTag

func (*DeltaAppender) UpdateActionStats

func (a *DeltaAppender) UpdateActionStats(action binlog.RowEventType, count int)

type DeltaController

type DeltaController struct {
	// contains filtered or unexported fields
}

func NewController

func NewController() *DeltaController

func (*DeltaController) Close

func (c *DeltaController) Close()

func (*DeltaController) Flush

func (c *DeltaController) Flush(ctx *sql.Context, conn *stdsql.Conn, tx *stdsql.Tx, reason FlushReason) (FlushStats, error)

Flush writes the accumulated changes to the database.

func (*DeltaController) GetDeltaAppender

func (c *DeltaController) GetDeltaAppender(
	databaseName, tableName string,
	schema sql.Schema,
) (*DeltaAppender, error)

type FlushReason

type FlushReason uint8
const (
	// UnknownFlushReason means that the changes have to be flushed for an unknown reason.
	UnknownFlushReason FlushReason = iota
	// DDLStmtFlushReason means that the changes have to be flushed because of a DDL statement.
	DDLStmtFlushReason
	// DMLStmtFlushReason means that the changes have to be flushed because of a DML statement.
	DMLStmtFlushReason
	// RowCountLimitFlushReason means that the changes have to be flushed because the row count limit is reached.
	RowCountLimitFlushReason
	// MemoryLimitFlushReason means that the changes have to be flushed because the memory limit is reached.
	MemoryLimitFlushReason
	// TimeTickFlushReason means that the changes have to be flushed because a time ticker is fired.
	TimeTickFlushReason
	// QueryFlushReason means that the changes have to be flushed because some tables are queried.
	QueryFlushReason
	// InitFlushReason means that the changes have to be flushed because the controller is initialized.
	InitFlushReason
	// OnCloseFlushReason means that the changes have to be flushed because the controller is closed.
	OnCloseFlushReason
)

func (FlushReason) String

func (r FlushReason) String() string

type FlushStats

type FlushStats struct {
	DeltaSize  int64
	Insertions int64
	Deletions  int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL