sqlite

package
v1.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteSource

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

SQLiteSource implements the hermod.Source interface for SQLite. Since SQLite doesn't have native CDC like Postgres, this implementation might rely on triggers or polling. For now, it's a placeholder consistent with other sources.

func NewSQLiteSource

func NewSQLiteSource(dbPath string, tables []string, useCDC bool) *SQLiteSource

func (*SQLiteSource) Ack

func (s *SQLiteSource) Ack(ctx context.Context, msg hermod.Message) error

Ack moves the persisted cursor to the acknowledged row. It must not move on read: GetState is the engine's persistence contract, so a cursor advanced when a row is handed out is already past rows still in flight, and a crash before the sinks wrote them erases them from the resume.

func (*SQLiteSource) Close

func (s *SQLiteSource) Close() error

func (*SQLiteSource) DiscoverColumns

func (s *SQLiteSource) DiscoverColumns(ctx context.Context, table string) ([]hermod.ColumnInfo, error)

func (*SQLiteSource) DiscoverDatabases

func (s *SQLiteSource) DiscoverDatabases(ctx context.Context) ([]string, error)

func (*SQLiteSource) DiscoverTables

func (s *SQLiteSource) DiscoverTables(ctx context.Context) ([]string, error)

func (*SQLiteSource) ExecuteSQL

func (s *SQLiteSource) ExecuteSQL(ctx context.Context, query string) ([]map[string]any, error)

func (*SQLiteSource) GetState

func (s *SQLiteSource) GetState() map[string]string

func (*SQLiteSource) IsReady

func (s *SQLiteSource) IsReady(ctx context.Context) error

func (*SQLiteSource) Ping

func (s *SQLiteSource) Ping(ctx context.Context) error

func (*SQLiteSource) Read

func (s *SQLiteSource) Read(ctx context.Context) (hermod.Message, error)

func (*SQLiteSource) Sample

func (s *SQLiteSource) Sample(ctx context.Context, table string) (hermod.Message, error)

func (*SQLiteSource) SetState

func (s *SQLiteSource) SetState(state map[string]string)

func (*SQLiteSource) Snapshot

func (s *SQLiteSource) Snapshot(ctx context.Context, tables ...string) error

Jump to

Keyboard shortcuts

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