kreator

Types

pub type Blueprint {
  Blueprint(
    method: Method,
    table: String,
    columns: List(String),
    order_by: List(Order),
    where_clauses: List(Where),
    data: List(#(String, Value)),
  )
}

Constructors

  • Blueprint(
      method: Method,
      table: String,
      columns: List(String),
      order_by: List(Order),
      where_clauses: List(Where),
      data: List(#(String, Value)),
    )
pub type Method {
  Select
  Insert
  Update
  Delete
}

Constructors

  • Select
  • Insert
  • Update
  • Delete

Functions

pub fn and_where(
  blueprint: Blueprint,
  fun: fn(List(Where)) -> List(Where),
) -> Blueprint
pub fn delete(blueprint: Blueprint) -> Blueprint
pub fn delete_builder(
  blueprint: Blueprint,
  dialect: Dialect,
) -> Query
pub fn insert(
  blueprint: Blueprint,
  data: List(#(String, Value)),
) -> Blueprint
pub fn insert_builder(
  blueprint: Blueprint,
  dialect: Dialect,
) -> Query
pub fn or_where(
  blueprint: Blueprint,
  fun: fn(List(Where)) -> List(Where),
) -> Blueprint
pub fn or_where_equals(
  blueprint: Blueprint,
  column: String,
  value: Value,
) -> Blueprint
pub fn order_by(
  blueprint: Blueprint,
  column column: String,
  direction direction: Direction,
) -> Blueprint
pub fn select(
  blueprint: Blueprint,
  select: List(String),
) -> Blueprint
pub fn select_builder(
  blueprint: Blueprint,
  dialect: Dialect,
) -> Query
pub fn table(table: String) -> Blueprint
pub fn to_postgres(blueprint: Blueprint) -> Query
pub fn to_query(
  from blueprint: Blueprint,
  for dialect: Dialect,
) -> Query
pub fn to_sqlite(blueprint: Blueprint) -> Query
pub fn update(
  blueprint: Blueprint,
  data: List(#(String, Value)),
) -> Blueprint
pub fn update_builder(
  blueprint: Blueprint,
  dialect: Dialect,
) -> Query
pub fn where_equals(
  blueprint: Blueprint,
  column: String,
  value: Value,
) -> Blueprint
pub fn where_equals_string(
  blueprint: Blueprint,
  column: String,
  value: String,
) -> Blueprint
Search Document