Module: Sqlite
- Defined in:
- lib/fresco/runtime/db_sqlite.rb
Overview
Fresco SQLite adapter. Copied verbatim to generated/db_adapter.rb by ‘fresco build` when config/database.rb declares `Fresco.database :sqlite`. Always loaded between runtime.rb and config/app.rb — boot order in lib/fresco/runtime/boot.rb.
Contains everything an action needs to talk to SQLite under both CRuby (dev) and Spinel (release): the FFI module pointing at generated/runtime/sqlite.c, the Ruby wrapper, and the ‘Fresco::Db::Active` alias that the M3+ codegen will target.
The ‘Sqlite` module’s ffi_cflags/ffi_lib pull generated/runtime/sqlite.c into Spinel’s cc invocation and ‘-lsqlite3` into the link line. Under CRuby the same declarations are no-ops (`fresco dev` stubs them on Module) and dev installs singleton-method stand-ins that route through the `sqlite3` gem.