Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExtraHandleColumnInfo = model.NewExtraHandleColInfo()
Functions ¶
func KvPairsFromRows ¶
KvPairsFromRows converts a Rows instance constructed from MakeRowsFromKvPairs back into a slice of KvPair. This method panics if the Rows is not constructed in such way. nolint:golint // kv.KvPairsFromRows sounds good.
func NewPanickingAllocators ¶
func NewPanickingAllocators(base int64) autoid.Allocators
NewPanickingAllocator creates a PanickingAllocator shared by all allocation types.
func NewSession ¶
func NewSession(options *SessionOptions) sessionctx.Context
NewSession creates a new trimmed down Session matching the options.
Types ¶
type Encoder ¶
type Encoder interface { // Close the encoder. Close() // Encode encodes a row of SQL values into a backend-friendly format. Encode( logger log.Logger, row []types.Datum, rowID int64, columnPermutation []int, ) (Row, error) }
Encoder encodes a row of SQL values into some opaque type which can be consumed by OpenEngine.WriteEncoded.
func NewTableKVEncoder ¶
func NewTableKVEncoder(tbl table.Table, options *SessionOptions) (Encoder, error)
type Row ¶
type Row interface { // ClassifyAndAppend separates the data-like and index-like parts of the // encoded row, and appends these parts into the existing buffers and // checksums. ClassifyAndAppend( data *Rows, dataChecksum *verification.KVChecksum, indices *Rows, indexChecksum *verification.KVChecksum, ) // Size represents the total kv size of this Row. Size() uint64 }
Row represents a single encoded row.
func MakeRowFromKvPairs ¶
MakeRowFromKvPairs converts a KvPair slice into a Row instance. This is mainly used for testing only. The resulting Row instance should only be used for the importer backend.
type RowArrayMarshaler ¶
RowArrayMarshaler wraps a slice of types.Datum for logging the content into zap.
func (RowArrayMarshaler) MarshalLogArray ¶
func (row RowArrayMarshaler) MarshalLogArray(encoder zapcore.ArrayEncoder) error
MarshalLogArray implements the zapcore.ArrayMarshaler interface
type Rows ¶
type Rows interface { // SplitIntoChunks splits the rows into multiple consecutive parts, each // part having total byte size less than `splitSize`. The meaning of "byte // size" should be consistent with the value used in `Row.ClassifyAndAppend`. SplitIntoChunks(splitSize int) []Rows // Clear returns a new collection with empty content. It may share the // capacity with the current instance. The typical usage is `x = x.Clear()`. Clear() Rows }
Rows represents a collection of encoded rows.
func MakeRowsFromKvPairs ¶
MakeRowsFromKvPairs converts a KvPair slice into a Rows instance. This is mainly used for testing only. The resulting Rows instance should only be used for the importer backend.