galchemy/schema/model

Types

pub type ColumnSchema {
  ColumnSchema(
    name: String,
    data_type: ColumnType,
    nullable: Bool,
    default: option.Option(String),
    ordinal_position: Int,
  )
}

Constructors

  • ColumnSchema(
      name: String,
      data_type: ColumnType,
      nullable: Bool,
      default: option.Option(String),
      ordinal_position: Int,
    )
pub type ColumnType {
  SmallIntType
  IntegerType
  BigIntType
  BooleanType
  TextType
  VarCharType(length: option.Option(Int))
  TimestampType(with_time_zone: Bool)
  TimeType(with_time_zone: Bool)
  DateType
  RealType
  DoublePrecisionType
  NumericType(
    precision: option.Option(Int),
    scale: option.Option(Int),
  )
  JsonType
  JsonbType
  UuidType
  ByteaType
  ArrayType(item_type: ColumnType)
  CustomType(name: String)
}

Constructors

  • SmallIntType
  • IntegerType
  • BigIntType
  • BooleanType
  • TextType
  • VarCharType(length: option.Option(Int))
  • TimestampType(with_time_zone: Bool)
  • TimeType(with_time_zone: Bool)
  • DateType
  • RealType
  • DoublePrecisionType
  • NumericType(
      precision: option.Option(Int),
      scale: option.Option(Int),
    )
  • JsonType
  • JsonbType
  • UuidType
  • ByteaType
  • ArrayType(item_type: ColumnType)
  • CustomType(name: String)
pub type ForeignKey {
  ForeignKey(
    name: String,
    columns: List(String),
    referenced_schema: String,
    referenced_table: String,
    referenced_columns: List(String),
  )
}

Constructors

  • ForeignKey(
      name: String,
      columns: List(String),
      referenced_schema: String,
      referenced_table: String,
      referenced_columns: List(String),
    )
pub type IndexSchema {
  IndexSchema(name: String, unique: Bool, definition: String)
}

Constructors

  • IndexSchema(name: String, unique: Bool, definition: String)
pub type PrimaryKey {
  PrimaryKey(name: String, columns: List(String))
}

Constructors

  • PrimaryKey(name: String, columns: List(String))
pub type SchemaSnapshot {
  SchemaSnapshot(tables: List(TableSchema))
}

Constructors

pub type TableSchema {
  TableSchema(
    schema: String,
    name: String,
    columns: List(ColumnSchema),
    primary_key: option.Option(PrimaryKey),
    unique_constraints: List(UniqueConstraint),
    foreign_keys: List(ForeignKey),
    indexes: List(IndexSchema),
  )
}

Constructors

pub type UniqueConstraint {
  UniqueConstraint(name: String, columns: List(String))
}

Constructors

  • UniqueConstraint(name: String, columns: List(String))
Search Document