Skip to content

src/dazzle_back/runtime/pg_backend.py

Generated: 2026-03-30T04:38:47.746770+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

PostgreSQL database backend for DNR Backend.

Provides the PostgreSQL database backend — the sole runtime backend.

Requires: psycopg[binary]>=3.2

Key Exports

  • PgConnectionWrapper
  • PostgresBackend
  • execute
  • open_pool
  • close_pool
  • connection
  • get_persistent_connection
  • close
  • backend_type
  • placeholder
  • create_table
  • create_all_tables
  • table_exists
  • get_table_columns
  • get_column_info
  • get_table_indexes

Dependencies

Imports

  • logging
  • collections.abc.Iterator
  • contextlib.contextmanager
  • typing.Any
  • psycopg.sql
  • dazzle_back.runtime.query_builder.quote_identifier
  • dazzle_back.specs.entity.EntitySpec
  • dazzle_back.specs.entity.FieldSpec
  • dazzle_back.specs.entity.FieldType
  • dazzle_back.specs.entity.ScalarType
  • json
  • datetime.date
  • datetime.datetime
  • decimal.Decimal
  • uuid.UUID
  • psycopg.rows.dict_row
  • psycopg_pool.ConnectionPool
  • dazzle_back.runtime.tenant_isolation.get_current_tenant_schema
  • psycopg
  • psycopg.rows.dict_row

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py
  • tests/unit/test_runtime_mcp_tools.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.