pgapi-is-sql-native-multi-tenant

IN derived (depth 1)

PgApi operates as a SQL-native multi-tenant implementation: all operations execute directly against PostgreSQL with no in-memory Network object constructed, composite primary keys on all tables provide project-level isolation, and each public method is a single committed transaction.

Summary

PgApi talks directly to PostgreSQL for everything rather than building a graph in memory first, which means multiple writers can safely work at the same time. Every table is keyed by project, so different tenants are isolated at the row level, and each method call is its own atomic transaction that either fully commits or fully rolls back.

Justifications

SL — Three architectural properties (no in-memory object, composite keys, per-method transactions) characterize PgApi as a distinct SQL-native implementation pattern

Antecedents (all must be IN):

  • pgapi-no-in-memory-network — `PgApi` executes all operations as direct SQL against PostgreSQL — no in-memory `Network` object is ever constructed, enabling concurrent writers
  • pgapi-multi-tenant-composite-keys — All PgApi tables use composite primary keys `(id, project_id)` for multi-tenancy, with JSONB columns (not TEXT) for antecedents, outlist, and metadata
  • pgapi-one-transaction-per-method — Each PgApi public method is a single PostgreSQL transaction that commits or rolls back at the end; __exit__ rolls back on exception

Dependents

These beliefs depend on this one:

Details