command

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnknownType     = 0
	BooleanType     = 1
	DateType        = 2
	FloatType       = 3
	IntegerType     = 4
	JSONType        = 5
	NumericType     = 6
	TimeType        = 7
	TimestampType   = 8
	TimestamptzType = 9
	TimetzType      = 10
	UUIDType        = 11
	TextType        = 12
)

Variables

View Source
var ReshareTenants []string

var FolioTenant string

Functions

func DataToSQLData added in v0.10.0

func DataToSQLData(data any, datatype DataType, semtype string) (*string, error)

DataToSQLData converts data to a string ready for encoding to SQL.

func DataTypeToSQL

func DataTypeToSQL(dtype DataType, typeSize int64) string

DataTypeToSQL convert a data type and type size to a database type.

Types

type Command

type Command struct {
	Op              Operation
	SchemaName      string
	TableName       string
	Transformed     bool
	ParentTable     dbx.Table
	Origin          string
	Column          []CommandColumn
	SourceTimestamp string
	Subcommands     *list.List
}

func NewCommand

func NewCommand(dedup *log.MessageSet, ce *change.Event, schemaPassFilter, schemaStopFilter,
	tableStopFilter []*regexp.Regexp, trimSchemaPrefix, addSchemaPrefix string) (*Command, bool, error)

func (*Command) AddChild added in v1.3.0

func (c *Command) AddChild(child *Command)

func (*Command) String

func (c *Command) String() string

type CommandColumn

type CommandColumn struct {
	Name        string
	DType       DataType
	DTypeSize   int64
	Data        interface{}
	SQLData     *string
	PrimaryKey  int
	Unavailable bool
}

func PrimaryKeyColumns added in v0.8.0

func PrimaryKeyColumns(columns []CommandColumn) []CommandColumn

type CommandGraph added in v1.3.0

type CommandGraph struct {
	Commands *list.List
}

func NewCommandGraph added in v1.3.0

func NewCommandGraph() *CommandGraph

type DataType

type DataType int

func InferTypeFromString added in v0.11.0

func InferTypeFromString(data string) DataType

func MakeDataType

func MakeDataType(dataType string) (DataType, int64)

func (DataType) String

func (d DataType) String() string

type Operation

type Operation int
const (
	MergeOp Operation = iota
	DeleteOp
	TruncateOp
)

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