position

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeSnapshot = "s"
	TypeCDC      = "c"
)

Variables

View Source
var ErrUnknownIteratorType = errors.New("unknown iterator type")

Functions

This section is empty.

Types

type IteratorType

type IteratorType string

IteratorType describe position type.

type Position

type Position struct {
	// IteratorType - shows in what iterator was created position.
	IteratorType IteratorType

	// Snapshot information.
	// SnapshotLastProcessedVal - last processed value from ordering column.
	SnapshotLastProcessedVal any
	// SnapshotMaxValue - max value from ordering column.
	SnapshotMaxValue any

	// CDC information.
	// CDCLastID - last processed id from tracking table.
	CDCLastID int
	// TrackingTableName tracking table name.
	TrackingTableName string
}

Position represents SAP Hana position.

func ParseSDKPosition

func ParseSDKPosition(p sdk.Position) (*Position, error)

ParseSDKPosition parses SDK position and returns Position.

func (Position) ConvertToSDKPosition

func (p Position) ConvertToSDKPosition() (sdk.Position, error)

ConvertToSDKPosition formats and returns sdk.Position.

Jump to

Keyboard shortcuts

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