http/db_routes.ts

API route specs for database administration.

Generic PostgreSQL table browser using information_schema. Provides: list tables, view columns/rows (paginated), delete rows by PK, health check.

Declarations
#

8 declarations

view source

ColumnInfo
#

http/db_routes.ts view source

ColumnInfo

Column metadata from information_schema.

column_name

type string

data_type

type string

is_nullable

type string

create_db_route_specs
#

DB_TABLE_ROWS_DEFAULT_LIMIT
#

DB_TABLE_ROWS_LIMIT_MAX
#

DbRouteOptions
#

http/db_routes.ts view source

DbRouteOptions

Per-factory configuration for db routes.

db_type

type DbType

db_name

type string

extra_stats

Optional callback to provide app-specific stats in the health response.

type (db: Db) => Promise<Record<string, unknown>>

log

Optional logger for server-side diagnostics (e.g. FK violation details).

type Logger

PrimaryKeyInfo
#

TableInfo
#

TableWithCount
#

Depends on
#