reference

package
v0.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canon

func Canon(t *testing.T, source server.Source)

func ConductSequenceWithAllSubsequencesTest

func ConductSequenceWithAllSubsequencesTest(t *testing.T, sequenceCase dt_canon.CanonizedSequenceCase, transfer *server.Transfer, sink abstract.Sinker, sinkAsSource server.Source)

ConductSequenceWithAllSubsequencesTest is the method which MUST be called by concrete sequence checking tests. It automatically conducts a test for all subsequences of the given sequence test and canonizes the output.

func Dump

func Dump(t *testing.T, source server.Source)

func FromClickhouse

func FromClickhouse(t *testing.T, src *model.ChSource, noTimeCols bool) string

func ReferenceTestFn

func ReferenceTestFn(transfer *server.Transfer, sinkAsSource server.Source, items []abstract.ChangeItem) func(*testing.T)

ReferenceTestFn returns a function which conducts a reference test with the given items and transfer for all transfer typesystem versions.

Reference test is a canonization test which records the final state of the target database (sink) after a precanonized set of "reference" items has been pushed into the target. The final state of the target database is obtained as if it was a snapshot source; that is why a sink-as-source object is required.

This method conducts a cleanup of the target database automatically before each test. Note that transfer's target endpoint should specify cleanup policy DROP or TRUNCATE for this feature to work.

func Table

func Table() []abstract.ChangeItem

Types

type Row

type Row struct {
	Key       int64  `yson:"t_int64_key"`
	SystemKey int64  `yson:"t_int64_system_key"`
	Int8      int8   `yson:"t_int8"`
	Int16     int16  `yson:"t_int16"`
	Int32     int32  `yson:"t_int32"`
	Int64     int64  `yson:"t_int64"`
	UInt8     uint8  `yson:"t_uint8"`
	UInt16    uint16 `yson:"t_uint16"`
	UInt32    uint32 `yson:"t_uint32"`
	UInt64    uint64 `yson:"t_uint64"`

	Float  float32 `yson:"t_float"`
	Double float64 `yson:"t_double"`
	Bool   bool    `yson:"t_bool"`

	String string `yson:"t_string"`
	Utf8   string `yson:"t_utf8"`

	Date      time.Time `yson:"t_date"`
	DateTime  time.Time `yson:"t_datetime"`
	Timestamp time.Time `yson:"t_timestamp"`
	//Interval  int64     `yson:"t_interval"`
	Yson string `yson:"t_yson"`

	Decimal   string            `yson:"t_decimal"`
	List      []uint64          `yson:"t_list"`
	Struct    Struct            `yson:"t_struct"`
	Tuple     []interface{}     `yson:"t_tuple"`
	VarTuple  []interface{}     `yson:"t_var_tuple"`
	VarStruct []interface{}     `yson:"t_var_struct"`
	Dict      map[string]string `yson:"t_dict"`
	Tagged    string            `yson:"t_tagged"`
}

type Struct

type Struct struct {
	Int64 int64  `yson:"s_int64"`
	Utf8  string `yson:"s_utf8"`
}

Jump to

Keyboard shortcuts

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