feather

Types

pub type Config {
  Config(
    file: String,
    journal_mode: JournalMode,
    synchronous: SyncMode,
    temp_store: TempStore,
    mmap_size: Option(Int),
    page_size: Option(Int),
  )
}

Constructors

  • Config(
      file: String,
      journal_mode: JournalMode,
      synchronous: SyncMode,
      temp_store: TempStore,
      mmap_size: Option(Int),
      page_size: Option(Int),
    )
pub type JournalMode {
  JournalDelete
  JournalTruncate
  JournalPersist
  JournalMemory
  JournalWal
  JournalOff
}

Constructors

  • JournalDelete
  • JournalTruncate
  • JournalPersist
  • JournalMemory
  • JournalWal
  • JournalOff
pub type SyncMode {
  SyncExtra
  SyncFull
  SyncNormal
  SyncOff
}

Constructors

  • SyncExtra
  • SyncFull
  • SyncNormal
  • SyncOff
pub type TempStore {
  TempStoreDefault
  TempStoreFile
  TempStoreMemory
}

Constructors

  • TempStoreDefault
  • TempStoreFile
  • TempStoreMemory

Functions

pub fn connect(config: Config) -> Result(Connection, Error)
pub fn default_config() -> Config
pub fn disconnect(connection: Connection) -> Result(Nil, Error)

runs “PRAGMA optimize;” before closing the connection. If the connections are long-lived, then consider running this periodically anyways.

pub fn main() -> Nil

Runs the feather cli to generate new migrations and dump the schema you probably don’t wanna run this yourself… run gleam run -m feather to find out more

pub fn optimize(connection: Connection) -> Result(Nil, Error)
Search Document