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
#

6 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
#

http/db_routes.ts view source

(options: DbRouteOptions): RouteSpec[]

Create the db API route specs.

options

route configuration (db_type, db_name, extra_stats)

returns

RouteSpec[]

route specs for database administration

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
#