format

package
v0.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCSVEvent

func NewCSVEvent(row []byte, cols *abstract.TableSchema, names []string, table abstract.TableID, readerTime time.Time) events.InsertEvent

func NewEvent

func NewEvent(format model.ClickhouseIOFormat, row []byte, cols *abstract.TableSchema, names []string, table abstract.TableID, readerTime time.Time) (base.Event, error)

func NewJSONCompactEvent

func NewJSONCompactEvent(row []byte, cols *abstract.TableSchema, names []string, table abstract.TableID, readerTime time.Time) events.InsertEvent

Types

type CSVEvent

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

func (*CSVEvent) NewValue

func (e *CSVEvent) NewValue(i int) (base.Value, error)

func (*CSVEvent) NewValuesCount

func (e *CSVEvent) NewValuesCount() int

func (*CSVEvent) Table

func (e *CSVEvent) Table() base.Table

func (*CSVEvent) ToOldChangeItem

func (e *CSVEvent) ToOldChangeItem() (*abstract.ChangeItem, error)

type CsvValidator

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

func NewCsvValidator

func NewCsvValidator(reader io.Reader, columnsCount int) *CsvValidator

func (*CsvValidator) ReadAndValidate

func (e *CsvValidator) ReadAndValidate() (int64, error)

type FatalValidatorWithInputLogger

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

func NewFatalValidator

func NewFatalValidator(in Validator) *FatalValidatorWithInputLogger

func NewValidator

func NewValidator(reader io.Reader, format model.ClickhouseIOFormat, expectedColumnsNum int) (*FatalValidatorWithInputLogger, error)

func (*FatalValidatorWithInputLogger) ReadAndValidate

func (v *FatalValidatorWithInputLogger) ReadAndValidate() (int64, error)

type JSONCompactEvent

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

func (*JSONCompactEvent) NewValue

func (e *JSONCompactEvent) NewValue(i int) (base.Value, error)

func (*JSONCompactEvent) NewValuesCount

func (e *JSONCompactEvent) NewValuesCount() int

func (*JSONCompactEvent) Table

func (e *JSONCompactEvent) Table() base.Table

func (*JSONCompactEvent) ToOldChangeItem

func (e *JSONCompactEvent) ToOldChangeItem() (*abstract.ChangeItem, error)

type JSONCompactValidator

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

func NewJSONCompactValidator

func NewJSONCompactValidator(reader io.Reader, columnsCount int) *JSONCompactValidator

func (*JSONCompactValidator) ReadAndValidate

func (e *JSONCompactValidator) ReadAndValidate() (int64, error)

type Validator

type Validator interface {
	ReadAndValidate() (n int64, err error)
}

Jump to

Keyboard shortcuts

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