pub struct Param {
pub name: String,
pub ty: Type,
pub nullable: bool,
pub optional: bool,
pub comment: Option<String>,
pub schema: Option<Value>,
pub cast: Option<String>,
pub delimiter: Option<String>,
pub members: Vec<Member>,
}Expand description
A statement’s parameter: the format’s (types::Param) and what Reylo’s run time reads
beside it.
Fields§
§name: String§ty: Type§nullable: boolWhether the caller may pass null: the statement tests the parameter for null or coalesces it, or it is the whole value written to a nullable column.
optional: boolWhether the caller may leave the parameter out: a typed JSON parameter whose schema has a
default.
comment: Option<String>The comment the database keeps on the column the parameter is written to (or, on MySQL, compared with), for the parameter’s doc comment.
schema: Option<Value>A typed JSON parameter’s JSON Schema as its cast writes it (:p::jsonb('…')), which the
run time checks a value against; its type is the schema as the engine reads it.
cast: Option<String>A ::type written on MySQL or SQLite as the dialect’s own cast, which turns a value it
cannot read into 0, so the run time checks the parameter’s value against its type.
delimiter: Option<String>What separates the elements of an array parameter’s text, where the element type’s
typdelim is not a comma (: for PostGIS’s geometry, ; for box): the run time
writes the array’s text with it.
members: Vec<Member>A structured parameter’s members as its column list writes them, in the order of its
record’s fields (crate::structured), which the run time checks each value against.