Current section
Files
Jump to
Current section
Files
README.md
# Sqliter
[](https://hex.pm/packages/sqliter)
[](https://sqliter.hexdocs.pm/)
[](https://github.com/peregrinefinch/sqliter/actions/workflows/test.yml)
Sqliter brings SQLite to Pooka. Bind values, decode rows, and run transactions
against a database in a file or in memory.
## Installation
```sh
pooka add sqliter
```
## Usage
```pooka
module main
import sqliter
import sqliter/row
import sqliter/value
main() {
let assert Ok(42) = sqliter.with_connection(
sqliter.Memory(),
sqliter.defaults(),
fn(db) {
let result = sqliter.query_one(db, "SELECT 42", value.none())?
row.integer(result, 0)
}
)
}
```
See [using Sqliter](docs/usage.md) and [platform support](docs/native.md).
## Licence
Licensed under the [Apache License, Version 2.0](https://github.com/peregrinefinch/sqliter/blob/main/LICENSE).