iterator

package
v0.0.0-...-77c121b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoKey                     = errors.New("no key")
	ErrNoOrderingColumn          = errors.New("no ordering column")
	ErrWrongTrackingIDType       = errors.New("tracking id wrong type")
	ErrWrongTrackingOperatorType = errors.New("tracking column wrong type")
	ErrUnknownOperatorType       = errors.New("unknown iterator type")
	ErrNoInitializedIterator     = errors.New("not initialized iterator")
)

Functions

This section is empty.

Types

type CombinedIterator

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

CombinedIterator combined iterator.

func NewCombinedIterator

func NewCombinedIterator(ctx context.Context, params CombinedParams) (*CombinedIterator, error)

NewCombinedIterator - create new iterator.

func (*CombinedIterator) Ack

Ack check if record with position was recorded.

func (*CombinedIterator) HasNext

func (c *CombinedIterator) HasNext(ctx context.Context) (bool, error)

HasNext returns a bool indicating whether the iterator has the next record to return or not. If the underlying snapshot iterator returns false, the combined iterator will try to switch to the cdc iterator.

func (*CombinedIterator) Next

func (c *CombinedIterator) Next(ctx context.Context) (sdk.Record, error)

Next returns the next record.

func (*CombinedIterator) Stop

func (c *CombinedIterator) Stop(ctx context.Context) error

Stop the underlying iterators.

type CombinedParams

type CombinedParams struct {
	DB             *sqlx.DB
	Table          string
	OrderingColumn string
	CfgKeys        []string
	BatchSize      int
	Snapshot       bool
	SdkPosition    sdk.Position
}

CombinedParams is an incoming params for the NewCombinedIterator function.

Jump to

Keyboard shortcuts

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