glimr_postgres/db/gen
Value constructors for generated repository code.
Provides type-safe parameter value construction and conversion to native pog values. Used internally by code generated from database schemas.
Values
pub fn blob(v: BitArray) -> pool_connection.Value
Creates a blob parameter value for use in queries. Wraps the binary data in the generic Value type for parameter binding in prepared statements.
pub fn bool(v: Bool) -> pool_connection.Value
Creates a boolean parameter value for use in queries. Wraps the value in the generic Value type for parameter binding in prepared statements.
pub fn float(v: Float) -> pool_connection.Value
Creates a float parameter value for use in queries. Wraps the value in the generic Value type for parameter binding in prepared statements.
pub fn int(v: Int) -> pool_connection.Value
Creates an integer parameter value for use in queries. Wraps the value in the generic Value type for parameter binding in prepared statements.
pub fn null() -> pool_connection.Value
Creates a NULL parameter value for use in queries. Use this when you need to explicitly pass NULL as a parameter value in prepared statements.
pub fn nullable(
inner: fn(a) -> pool_connection.Value,
v: option.Option(a),
) -> pool_connection.Value
Creates an optional parameter value for use in queries. Converts Some values using the inner function and None to NULL for parameter binding in prepared statements.
pub fn string(v: String) -> pool_connection.Value
Creates a string parameter value for use in queries. Wraps the value in the generic Value type for parameter binding in prepared statements.