pub struct PgxSql {
Show 18 fields pub source_mappings: HashMap<String, RustSourceOnlySqlMapping>, pub control: ControlFile, pub graph: StableGraph<SqlGraphEntity, SqlGraphRelationship>, pub graph_root: NodeIndex, pub graph_bootstrap: Option<NodeIndex>, pub graph_finalize: Option<NodeIndex>, pub schemas: HashMap<SchemaEntity, NodeIndex>, pub extension_sqls: HashMap<ExtensionSqlEntity, NodeIndex>, pub externs: HashMap<PgExternEntity, NodeIndex>, pub types: HashMap<PostgresTypeEntity, NodeIndex>, pub builtin_types: HashMap<String, NodeIndex>, pub enums: HashMap<PostgresEnumEntity, NodeIndex>, pub ords: HashMap<PostgresOrdEntity, NodeIndex>, pub hashes: HashMap<PostgresHashEntity, NodeIndex>, pub aggregates: HashMap<PgAggregateEntity, NodeIndex>, pub triggers: HashMap<PgTriggerEntity, NodeIndex>, pub extension_name: String, pub versioned_so: bool,
}
Expand description

A generator for SQL.

Consumes a base mapping of types (typically pgx::DEFAULT_TYPEID_SQL_MAPPING), a ControlFile, and collections of each SQL entity.

During construction, a Directed Acyclic Graph is formed out the dependencies. For example, an item detect_dog(x: &[u8]) -> animals::Dog would have have a relationship with animals::Dog.

Typically, PgxSql types are constructed in a pgx::pg_binary_magic!() call in a binary out of entities collected during a pgx::pg_module_magic!() call in a library.

Fields§

§source_mappings: HashMap<String, RustSourceOnlySqlMapping>§control: ControlFile§graph: StableGraph<SqlGraphEntity, SqlGraphRelationship>§graph_root: NodeIndex§graph_bootstrap: Option<NodeIndex>§graph_finalize: Option<NodeIndex>§schemas: HashMap<SchemaEntity, NodeIndex>§extension_sqls: HashMap<ExtensionSqlEntity, NodeIndex>§externs: HashMap<PgExternEntity, NodeIndex>§types: HashMap<PostgresTypeEntity, NodeIndex>§builtin_types: HashMap<String, NodeIndex>§enums: HashMap<PostgresEnumEntity, NodeIndex>§ords: HashMap<PostgresOrdEntity, NodeIndex>§hashes: HashMap<PostgresHashEntity, NodeIndex>§aggregates: HashMap<PgAggregateEntity, NodeIndex>§triggers: HashMap<PgTriggerEntity, NodeIndex>§extension_name: String§versioned_so: bool

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more