postgres

package
v0.0.0-...-1f98a57 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres implements a YASE connector for PostgreSQL using timestamp-based incremental sync. For full CDC (WAL logical replication), use the pglogrepl-based streaming mode (future enhancement).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector(cfg connector.ConnectorConfig) (connector.Connector, error)

NewConnector creates a PostgreSQL connector from configuration.

Types

type Config

type Config struct {
	ConnectionString string   `json:"connection_string"` // e.g., "postgres://user:pass@localhost:5432/db"
	Tables           []string `json:"tables"`            // tables to sync
	TimestampColumn  string   `json:"timestamp_column"`  // column for incremental sync (default "updated_at")
	ContentColumns   []string `json:"content_columns"`   // columns to concatenate as content
	IDColumn         string   `json:"id_column"`         // primary key column (default "id")
	URLTemplate      string   `json:"url_template"`      // e.g., "https://wiki.internal/articles/{id}"
}

Config holds PostgreSQL-specific configuration.

type Connector

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

Connector implements the YASE Connector interface for PostgreSQL.

func (*Connector) Close

func (c *Connector) Close() error

func (*Connector) Discover

func (c *Connector) Discover(ctx context.Context) (*connector.Catalog, error)

func (*Connector) DisplayName

func (c *Connector) DisplayName() string

func (*Connector) ID

func (c *Connector) ID() string

func (*Connector) Read

func (c *Connector) Read(ctx context.Context, streams []connector.ConfiguredStream, state *connector.SyncState) (<-chan connector.Record, <-chan error)

func (*Connector) Spec

func (c *Connector) Spec() *connector.ConnectorSpec

func (*Connector) Validate

func (c *Connector) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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