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 {
  StringParam(value: String)
  IntParam(value: Int)
  FloatParam(value: Float)
  NullParam
  BoolParam(value: Bool)
  DateParam(value: calendar.Date)
}

Constructors

  • StringParam(value: String)
  • IntParam(value: Int)
  • FloatParam(value: Float)
  • NullParam
  • BoolParam(value: Bool)
  • DateParam(value: calendar.Date)

Values

pub fn bool(value: Bool) -> Param

Create a new Param with a Bool value.

pub fn date(value: calendar.Date) -> Param

Create a new Param with a calendar.Date 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.

Search Document