Skip to main content

Crate demesne_postgres

Crate demesne_postgres 

Source
Expand description

Live-database support for demesne: introspection into a Schema, the drift diff reports, the schema traps, the global-assignment audit and the RLS role check.

Structs§

Drift
Every difference between the live database and the spec’s SQL, and how many objects match.
Error
Why a live database could not be reached or read.
Finding
One difference between the live database and the spec’s SQL.
Grantees
The roles a deployment grants the manifest’s grantable functions to, which drift accepts as holding them.
IntrospectMeta
Trap
One trap in the live schema around the tables a spec governs.

Enums§

DriftKind
How a live object differs from the spec’s.
Severity
How serious a schema trap is.

Functions§

connect
Connects to Postgres from a URL or keyword/value string, the way libpq and pgx do.
count_global_assignments
Counts the rows query returns.
drift
Compares the live database with sql, the spec’s whole SQL, in both directions.
introspect
Reads the public schema’s tables, columns, keys and foreign keys.
query_error
role_bypasses_rls
Returns whether role exists and, if it does, whether it bypasses row-level security.
schema_traps
Finds the schema traps that bypass or weaken the policies on the governed tables.