command

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnknownType = iota
	VarcharType
	IntegerType
	FloatType
	BooleanType
	DateType
	TimeType
	TimetzType
	TimestampType
	TimestamptzType
	JSONType
)

Variables

View Source
var Tenants []string

Functions

func DataTypeToSQL

func DataTypeToSQL(dtype DataType, typeSize int64) string

func DataTypeToSQLNew added in v0.0.2

func DataTypeToSQLNew(dtype DataType, typeSize int64) (string, int64)

func SQLEncodeData

func SQLEncodeData(data interface{}, datatype DataType, semtype string) string

Types

type Command

type Command struct {
	Op              Operation
	SchemaName      string
	TableName       string
	Origin          string
	Column          []CommandColumn
	ChangeEvent     *change.Event
	SourceTimestamp string
}

func NewCommand

func NewCommand(ce *change.Event, schemaPassFilter []*regexp.Regexp, schemaPrefix string) (*Command, error)

Returns nil, nil in some cases.

func (Command) String

func (c Command) String() string

type CommandColumn

type CommandColumn struct {
	Name         string
	DType        DataType
	DTypeSize    int64
	SemanticType string
	Data         interface{}
	EncodedData  string
	PrimaryKey   int
}

type CommandList

type CommandList struct {
	Cmd []Command
}

type DataType

type DataType int

func MakeDataType

func MakeDataType(dtype string) DataType

func MakeDataTypeNew added in v0.0.2

func MakeDataTypeNew(dataType string, charMaxLen int64) (DataType, int64)

func (DataType) String

func (d DataType) String() string

type Operation

type Operation int
const (
	MergeOp Operation = iota
	DeleteOp
)

func (Operation) String

func (o Operation) String() string

Jump to

Keyboard shortcuts

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