sqlode/type_mapping

Values

pub fn enum_default_fn(name: String) -> String

Name of the helper that returns the enum’s first variant as a zero-style fallback. Used by generated adapter / queries decoders where decode.failure(zero, msg) needs a concrete value of the target type.

pub fn enum_from_string_fn(name: String) -> String
pub fn enum_to_string_fn(name: String) -> String
pub fn enum_type_name(name: String) -> String
pub fn enum_value_name(value: String) -> String
pub fn is_rich_type(scalar_type: model.ScalarType) -> Bool
pub fn scalar_type_to_db_name(
  scalar_type: model.ScalarType,
) -> String
pub fn scalar_type_to_decoder(
  engine: model.Engine,
  scalar_type: model.ScalarType,
) -> String
pub fn scalar_type_to_gleam_type(
  scalar_type: model.ScalarType,
  type_mapping: model.TypeMapping,
) -> String
pub fn scalar_type_to_runtime_function(
  scalar_type: model.ScalarType,
) -> String
pub fn scalar_type_to_value_function(
  engine: model.Engine,
  scalar_type: model.ScalarType,
) -> String
pub fn set_from_string_fn(name: String) -> String
pub fn set_to_string_fn(name: String) -> String
pub fn set_value_type_name(name: String) -> String

Gleam type name for a single value of a MySQL SET column. The generated value type ends in Value to disambiguate it from the containing list — SET('red','green') on a column called tags surfaces as List(TagsValue) so callers can pattern-match on each chosen flag without colliding with the SET column name.

pub fn strong_type_unwrap_fn(
  scalar_type: model.ScalarType,
) -> option.Option(String)
Search Document