gloo/sqlite

SQLite column types for use with gloo/migration.

Build columns with sqlite.column(name, type) then pass them to the migration DSL. Autoincrement is achieved by applying primary_key to an Integer column — SQLite’s rowid mechanism handles the rest.

Passing a SqColumnType to gloo/pg.column (or vice versa) is a compile error because the types are distinct.

Types

pub type SqColumnType {
  Integer
  Text
  Real
  Blob
}

Constructors

  • Integer
  • Text
  • Real
  • Blob

Values

pub fn column(name: String, t: SqColumnType) -> migration.Column

Create a SQLite-typed column. Compile error if you pass a gloo/pg.PgColumnType — they are different types.

pub fn default(
  col: migration.Column,
  expr: String,
) -> migration.Column
pub fn type_sql(t: SqColumnType) -> String

Render a SQLite column type to its DDL SQL string.

Search Document