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