postgresql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgreSQLSource

func NewPostgreSQLSource(config *config.BaseConfig) (core.Source, error)

NewPostgreSQLSource creates a new PostgreSQL source connector

Types

type PostgreSQLPosition

type PostgreSQLPosition struct {
	Offset int64 `json:"offset"`
}

PostgreSQLPosition implements core.Position for PostgreSQL

func (*PostgreSQLPosition) Compare

func (p *PostgreSQLPosition) Compare(other core.Position) int

func (*PostgreSQLPosition) String

func (p *PostgreSQLPosition) String() string

type PostgreSQLSource

type PostgreSQLSource struct {
	*base.BaseConnector
	// contains filtered or unexported fields
}

PostgreSQLSource implements the core.Source interface for PostgreSQL

func (*PostgreSQLSource) Close

func (s *PostgreSQLSource) Close(ctx context.Context) error

Close closes the PostgreSQL connection and cleans up resources

func (*PostgreSQLSource) Discover

func (s *PostgreSQLSource) Discover(ctx context.Context) (*core.Schema, error)

Discover returns the schema of the PostgreSQL table/query

func (*PostgreSQLSource) GetPosition

func (s *PostgreSQLSource) GetPosition() core.Position

State management methods

func (*PostgreSQLSource) GetState

func (s *PostgreSQLSource) GetState() core.State

func (*PostgreSQLSource) Health

func (s *PostgreSQLSource) Health(ctx context.Context) error

Health returns the health status

func (*PostgreSQLSource) Initialize

func (s *PostgreSQLSource) Initialize(ctx context.Context, config *config.BaseConfig) error

Initialize sets up the PostgreSQL connection and prepares for reading

func (*PostgreSQLSource) Metrics

func (s *PostgreSQLSource) Metrics() map[string]interface{}

Metrics returns performance metrics

func (*PostgreSQLSource) Read

Read returns a stream of records from PostgreSQL

func (*PostgreSQLSource) ReadBatch

func (s *PostgreSQLSource) ReadBatch(ctx context.Context, batchSize int) (*core.BatchStream, error)

ReadBatch returns a stream of record batches from PostgreSQL

func (*PostgreSQLSource) SetPosition

func (s *PostgreSQLSource) SetPosition(position core.Position) error

func (*PostgreSQLSource) SetState

func (s *PostgreSQLSource) SetState(state core.State) error

func (*PostgreSQLSource) Subscribe

func (s *PostgreSQLSource) Subscribe(ctx context.Context, tables []string) (*core.ChangeStream, error)

Real-time methods (not supported)

func (*PostgreSQLSource) SupportsBatch

func (s *PostgreSQLSource) SupportsBatch() bool

func (*PostgreSQLSource) SupportsIncremental

func (s *PostgreSQLSource) SupportsIncremental() bool

Capability methods

func (*PostgreSQLSource) SupportsRealtime

func (s *PostgreSQLSource) SupportsRealtime() bool

Jump to

Keyboard shortcuts

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