A Param
is a value that can be used in a query.
Params (e.g. parameters) are wrapped (boxed) literal values, that can be
used in SQL queries.
pub type Param {
BoolParam(Bool)
FloatParam(Float)
IntParam(Int)
StringParam(String)
NullParam
}
Constructors
pub fn bool(value: Bool) -> Param
Create a new Param
with a Bool
value.
pub fn float(value: Float) -> Param
Create a new Param
with a Float
value.
pub fn int(value: Int) -> Param
Create a new Param
with an Int
value.
pub fn null() -> Param
Create a new Param
with an SQL NULL
value.
pub fn string(value: String) -> Param
Create a new Param
with a String
value.