gflare/cli/db/types

Types

pub type DbBackend {
  D1
  Turso
  Both
}

Constructors

  • D1
  • Turso
  • Both
pub type GleamType {
  GInt
  GFloat
  GString
  GBool
  GBitArray
  GOption(GleamType)
  GDate
  GTime
  GTimestamp
  GUuid
  GJson
}

Constructors

  • GInt
  • GFloat
  • GString
  • GBool
  • GBitArray
  • GOption(GleamType)
  • GDate
  • GTime
  • GTimestamp
  • GUuid
  • GJson
pub type ParsedQuery {
  ParsedQuery(
    name: String,
    params: List(QueryParam),
    returns: List(ResultSet),
    sql: String,
    backends: List(DbBackend),
    returns_many: Bool,
  )
}

Constructors

  • ParsedQuery(
      name: String,
      params: List(QueryParam),
      returns: List(ResultSet),
      sql: String,
      backends: List(DbBackend),
      returns_many: Bool,
    )
pub type QueryParam {
  QueryParam(name: String, gleam_type: GleamType)
}

Constructors

  • QueryParam(name: String, gleam_type: GleamType)
pub type ResultSet {
  ResultSet(name: String, gleam_type: GleamType)
}

Constructors

  • ResultSet(name: String, gleam_type: GleamType)

Values

pub fn gleam_type_to_d1_bind(t: GleamType) -> String
pub fn gleam_type_to_decoder(t: GleamType) -> String
pub fn gleam_type_to_string(t: GleamType) -> String
pub fn gleam_type_to_turso_extractor(t: GleamType) -> String
pub fn gleam_type_to_turso_value(t: GleamType) -> String
pub fn parse_gleam_type(s: String) -> Result(GleamType, String)
Search Document