Crate cornucopia

Source

Modules§

conn
Helpers to establish connections to database instances.
container
High-level interfaces to work with Cornucopia’s container manager.

Structs§

CodegenSettings
Struct containing the settings for code generation.

Enums§

Error
Enumeration of all the errors reported by Cornucopia.

Functions§

generate_live
Generates Rust queries from PostgreSQL queries located at queries_path, using a live database managed by you. If some destination is given, the generated code will be written at that path. Code generation settings are set using the settings parameter.
generate_managed
Generates Rust queries from PostgreSQL queries located at queries_path, using a container managed by cornucopia. The database schema is created using schema_files. If some destination is given, the generated code will be written at that path. Code generation settings are set using the settings parameter.
load_schema
Loads PostgreSQL schemas into a database.