Versions in this module Expand all Collapse all v0 v0.2.0 Aug 25, 2026 Changes in this version + const NotePartialParquetExclusion + var ErrDuckDBUnavailable = errors.New("duckdb unavailable") + var ErrFederatedReadFailed = errors.New("federated read failed") + var ErrKeysetUnsupportedOnPostgres = errors.New("keyset cursor unsupported on the postgres-only path") + var ErrManifestSchemaMismatch = forma.ErrManifestSchemaMismatch + var ErrNoParquetPaths = forma.ErrNoParquetPaths + var ErrParquetSetInconsistent = forma.ErrParquetSetInconsistent + var ErrPostgresReadFailed = errors.New("postgres read failed") + var ErrSchemaMetadataCacheRequired = errors.New("schema metadata cache required but not loaded") + func DuckDBPostgresConnStringFromPool(pool *pgxpool.Pool) string + func EvaluateRoutingPolicy(cfg forma.DuckDBConfig, fq *model.FederatedAttributeQuery, ...) model.RoutingDecision + func MergePersistentRecordsByTier(inputs map[model.DataTier][]*model.PersistentRecord, preferHot bool) ([]*model.PersistentRecord, error) + func ValidateDuckDBConfig(cfg forma.DuckDBConfig) error + type CircuitBreaker struct + func NewCircuitBreaker(threshold int, window, openDuration time.Duration) *CircuitBreaker + func (cb *CircuitBreaker) Allow() (admitted bool, probe ProbeToken) + func (cb *CircuitBreaker) IsOpen() bool + func (cb *CircuitBreaker) RecordFailure() + func (cb *CircuitBreaker) RecordSuccess() + func (cb *CircuitBreaker) ReleaseProbe(probe ProbeToken) + type DBFederatedQueryEngine struct + func NewDBFederatedQueryEngine(pgSource PostgresFederatedSource, dirtyIDFetcher DirtyIDFetcher, ...) *DBFederatedQueryEngine + func (e *DBFederatedQueryEngine) ExecuteDuckDBFederatedQuery(ctx context.Context, tables model.StorageTables, ...) ([]*model.PersistentRecord, int64, error) + func (e *DBFederatedQueryEngine) ExecuteFederatedPaginatedQuery(ctx context.Context, tables model.StorageTables, ...) ([]*model.PersistentRecord, int64, error) + func (e *DBFederatedQueryEngine) Query(ctx context.Context, tables model.StorageTables, ...) (*model.PersistentRecordPage, error) + func (e *DBFederatedQueryEngine) StreamDuckDBFederatedQuery(ctx context.Context, tables model.StorageTables, ...) (int64, error) + type DirtyIDFetcher interface + FetchDirtyRowIDs func(ctx context.Context, changeLogTable string, schemaID int16) ([]uuid.UUID, error) + type DirtyIDPool = dirtyIDPool + type DuckDBClient struct + DB *sql.DB + func NewDuckDBClient(cfg forma.DuckDBConfig) (*DuckDBClient, error) + func NewDuckDBClientContext(ctx context.Context, cfg forma.DuckDBConfig) (*DuckDBClient, error) + func (c *DuckDBClient) Close() error + func (c *DuckDBClient) HealthCheck(ctx context.Context) error + type DuckDBClientQueryExecutor struct + func (e *DuckDBClientQueryExecutor) Query(ctx context.Context, sql string, args ...any) (duckDBRowsIterator, error) + type DuckDBQueryExecutor interface + Query func(ctx context.Context, sql string, args ...any) (duckDBRowsIterator, error) + func NewDuckDBClientQueryExecutor(client *DuckDBClient) DuckDBQueryExecutor + type EngineOption func(*DBFederatedQueryEngine) + func WithCorruptPathRetention(d time.Duration) EngineOption + func WithFlushVisibilityGrace(d time.Duration) EngineOption + func WithLogger(l *zap.Logger) EngineOption + func WithParquetSource(src ParquetSource) EngineOption + func WithPlanCache(c *queryplan.Cache) EngineOption + type ManifestSchemaMismatchError = forma.ManifestSchemaMismatchError + type NoParquetPathsError = forma.NoParquetPathsError + type ParquetGuardViolationError struct + Paths []string + SchemaID int16 + func (e *ParquetGuardViolationError) Error() string + func (e *ParquetGuardViolationError) Unwrap() error + type ParquetSetInconsistentError = forma.ParquetSetInconsistentError + type ParquetSource interface + MissingIn func(ctx context.Context, scanned []string) ([]string, error) + Paths func(ctx context.Context, schemaID int16) (paths []string, stamps map[string]map[string]string, err error) + type PostgresDirtyIDFetcher struct + func NewPostgresDirtyIDFetcher(pool dirtyIDPool) *PostgresDirtyIDFetcher + func (f *PostgresDirtyIDFetcher) FetchDirtyRowIDs(ctx context.Context, changeLogTable string, schemaID int16) ([]uuid.UUID, error) + type PostgresFederatedSource interface + BuildHybridConditions func(tables model.StorageTables, fq *model.FederatedAttributeQuery) (string, []any, error) + QueryPersistentRecords func(ctx context.Context, query *model.PersistentRecordQuery) (*model.PersistentRecordPage, error) + RunOptimizedQuery func(ctx context.Context, tables model.StorageTables, schemaID int16, clause string, ...) ([]*model.PersistentRecord, int64, error) + type ProbeToken uint64