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 ¶
- func NewConnector(cfg connector.ConnectorConfig) (connector.Connector, error)
- type Config
- type Connector
- func (c *Connector) Close() error
- func (c *Connector) Discover(ctx context.Context) (*connector.Catalog, error)
- func (c *Connector) DisplayName() string
- func (c *Connector) ID() string
- func (c *Connector) Read(ctx context.Context, streams []connector.ConfiguredStream, ...) (<-chan connector.Record, <-chan error)
- func (c *Connector) Spec() *connector.ConnectorSpec
- func (c *Connector) Validate(ctx context.Context) error
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) DisplayName ¶
func (*Connector) Spec ¶
func (c *Connector) Spec() *connector.ConnectorSpec
Click to show internal directories.
Click to hide internal directories.