Skip to content

Adapter: Implement Postgres adapter #222

@mattpocock

Description

@mattpocock

Overview

Create Postgres adapter for production-grade, scalable storage.

Characteristics

  • Production-grade relational DB
  • Best for large teams, high volume
  • Advanced querying, scalability
  • Connect to existing Postgres infrastructure

Implementation

  • Create src/adapters/postgres.ts
  • Implement EvaliteAdapter interface using postgres client (e.g., pg or postgres)
  • Create schema migration for tables (runs, evals, results, scores, traces)
  • Support connection config (url, pool settings, etc.)
  • Export createPostgresAdapter(opts) helper
  • Add tests using multi-adapter test suite
  • Document usage examples

Configuration

interface PostgresAdapterOpts {
  connectionString?: string;
  host?: string;
  port?: number;
  database?: string;
  user?: string;
  password?: string;
  ssl?: boolean;
  maxConnections?: number;
}

Related

Part of adapter API refinement (#218)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions