cake/param

A Param is a value that can be used in a query.

Types

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

  • BoolParam(Bool)
  • FloatParam(Float)
  • IntParam(Int)
  • StringParam(String)
  • NullParam

Functions

pub fn bool(value vl: Bool) -> Param

Create a new Param with a Bool value.

pub fn float(value vl: Float) -> Param

Create a new Param with a Float value.

pub fn int(value vl: 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 vl: String) -> Param

Create a new Param with a String value.

Search Document