Skip to main content

Crate quarb_postgres

Crate quarb_postgres 

Source
Expand description

PostgreSQL adapter for the Quarb query engine.

A thin catalog driver over the shared relational model (quarb-relational): it connects with tokio-postgres (on an internal current-thread runtime, so the public surface stays synchronous), introspects the public schema through the system catalogs (tables, columns, primary keys, foreign keys), streams every table, and hands the result to RelationalModel.

Type mapping: booleans, the integer family, and the float family arrive natively; text arrives as itself; every other type (numeric, dates, timestamps, uuid, json, arrays, …) is selected with a ::text cast, where Quarb’s numeric reading and comparisons take over — the same posture as the CSV adapter. NULL is null.

The arbor mapping and the foreign-key reference machinery (~> chains, ->/<- crosslinks, <~ reverse resolution, the table-naming hint) are documented on the shared model. The database is materialized eagerly at connect and opened read-only in spirit (the adapter only ever issues SELECTs).

Structs§

PostgresAdapter
A PostgreSQL database, materialized as an arbor.

Enums§

PostgresError
An error connecting to or loading a database.

Functions§

raw_query
Execute pushed-down SQL directly: the column names and rows, ordered by order_table’s key when one is given (the pushdown contract: row order must match the adapter’s document order).