repository

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MetadataColumnAction = "METADATA$ACTION"
	MetadataColumnUpdate = "METADATA$ISUPDATE"
	MetadataColumnRow    = "METADATA$ROW_ID"
	MetadataColumnTime   = "METADATA$TS"
)

Variables

Functions

This section is empty.

Types

type Snowflake

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

Snowflake repository.

func Create

func Create(ctx context.Context, connectionData string) (*Snowflake, error)

Create storage.

func (*Snowflake) Close

func (s *Snowflake) Close() error

Close conn.

func (*Snowflake) CreateStream

func (s *Snowflake) CreateStream(ctx context.Context, stream, table string) error

CreateStream create stream.

func (*Snowflake) CreateTrackingTable

func (s *Snowflake) CreateTrackingTable(ctx context.Context, trackingTable, table string) error

CreateTrackingTable create stream.

func (*Snowflake) GetMaxValue added in v0.3.1

func (s *Snowflake) GetMaxValue(ctx context.Context, table, orderingColumn string) (any, error)

GetMaxValue get max value by ordering column.

func (*Snowflake) GetPrimaryKeys added in v0.3.1

func (s *Snowflake) GetPrimaryKeys(ctx context.Context, table string) ([]string, error)

GetPrimaryKeys returns all primary keys of the table.

func (*Snowflake) GetRows added in v0.3.1

func (s *Snowflake) GetRows(
	ctx context.Context,
	table, orderingColumn string,
	fields []string,
	pos *position.Position,
	maxValue any,
	limit int,
) (*sqlx.Rows, error)

GetRows get rows with columns offset from table.

func (*Snowflake) GetTrackingData

func (s *Snowflake) GetTrackingData(
	ctx context.Context,
	stream, trackingTable string,
	fields []string,
	offset, limit int,
) ([]map[string]interface{}, error)

GetTrackingData get data from tracking table.

func (*Snowflake) TableExists added in v0.3.1

func (s *Snowflake) TableExists(ctx context.Context, table string) (bool, error)

TableExists check if table exist.

Jump to

Keyboard shortcuts

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