gloo/value
Adapter-agnostic parameter value type.
Use these constructors in sql and query modules — they are encoded
to DB-specific wire types by the adapter at execution time.
Types
pub type GlooValue {
GString(String)
GInt(Int)
GFloat(Float)
GBool(Bool)
GBitArray(BitArray)
GTimestamp(timestamp.Timestamp)
GNull
GArray(List(GlooValue))
}
Constructors
-
GString(String) -
GInt(Int) -
GFloat(Float) -
GBool(Bool) -
GBitArray(BitArray) -
GTimestamp(timestamp.Timestamp) -
GNull -
GArray(List(GlooValue))Postgres-only: used for UNNEST / array parameters. SQLite adapter will return DbError if this is encountered.
Values
pub fn nullable(
encoder: fn(a) -> GlooValue,
v: option.Option(a),
) -> GlooValue