development
HerrHase 4 months ago
parent a9eea03134
commit 61f9379639

@ -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",

@ -1,7 +1,7 @@
{ {
"name": "@nano/sqlite", "name": "@nano/sqlite",
"version": "0.1.0", "version": "0.2.0",
"description": "Function for using Sqlite in Bun", "description": "Functions and Classes for handle sqlite in Bun",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@git.node001.net:nano/sqlite.git" "url": "git@git.node001.net:nano/sqlite.git"

Loading…
Cancel
Save