|
|
|
@ -6,8 +6,8 @@ Functions and Classes for handle sqlite in [Bun](https://bun.sh/).
|
|
|
|
|
|
|
|
|
|
### getOrCreateSqlite(options = {})
|
|
|
|
|
|
|
|
|
|
Options are using default Parameters from [Bun](https://bun.sh/docs/api/sqlite). There
|
|
|
|
|
path can be set by .env
|
|
|
|
|
Options are using default Parameters from [Bun](https://bun.sh/docs/api/sqlite). Path
|
|
|
|
|
to sqlite can set in .env
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
NANO_SQLITE_PATH="./../storage/db.sqlite"
|
|
|
|
@ -16,7 +16,8 @@ NANO_SQLITE_PATH="./../storage/db.sqlite"
|
|
|
|
|
or by parameter,
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
const db = getOrCreateSqlite({ path: './../storage/db.sqlite' })
|
|
|
|
|
const db = getOrCreateSqlite({ uri: './../storage/db.sqlite' })
|
|
|
|
|
const db = getOrCreateSqlite({ uri: ':memory:' })
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Per Default WAL mode is enabled. To disable add parameter "wal",
|
|
|
|
|