[GH-ISSUE #12] Sqlite3 not working #12

Closed
opened 2026-05-23 08:25:21 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @paradis-A on GitHub (Feb 26, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/12

Originally assigned to: @appy-one on GitHub.

sqlite3 not creating .sqlite3 file, only .acebase with data.db in it.

//index.js
const {AceBase,SQLiteStorageSettings} = require("acebase")
const db = new AceBase("mydb", new SQLiteStorageSettings({ path: "." }))
db.ready().then(()=>{
    console.log("ready")
})

{ "name": "acesqlite3", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "acebase": "^1.0.8", "sqlite3": "^5.0.2" } }

Originally created by @paradis-A on GitHub (Feb 26, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/12 Originally assigned to: @appy-one on GitHub. sqlite3 not creating .sqlite3 file, only <dbname>.acebase with data.db in it. ```javascript //index.js const {AceBase,SQLiteStorageSettings} = require("acebase") const db = new AceBase("mydb", new SQLiteStorageSettings({ path: "." })) db.ready().then(()=>{ console.log("ready") }) ``` ` { "name": "acesqlite3", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "acebase": "^1.0.8", "sqlite3": "^5.0.2" } } `
Author
Owner

@paradis-A commented on GitHub (Feb 26, 2021):

console
___ ______ / _ \ | ___ \ / /_\ \ ___ ___| |_/ / __ _ ___ ___ | _ |/ __/ _ \ ___ \/ _ / |/ _
| | | | (| __/ |/ / (| _ \ /
_| |_/_
_
_/ _,|/_|
realtime database

[mydb] Database "mydb" details:
[mydb] - Type: AceBase binary
[mydb] - Record size: 128
[mydb] - Page size: 1024
[mydb] - Max inline value size: 50
[mydb] - Root record address: 0, 0
[mydb] KIT read, 0 keys indexed
[mydb] FST read, 0 pages allocated, 0 free ranges
[mydb] Node "/" is being created
[mydb] Node "/" saved at address 0,0 - 1 addresses, 4 bytes written in 1 chunk(s)
ready
`

<!-- gh-comment-id:786362142 --> @paradis-A commented on GitHub (Feb 26, 2021): console ` ___ ______ / _ \ | ___ \ / /_\ \ ___ ___| |_/ / __ _ ___ ___ | _ |/ __/ _ \ ___ \/ _` / __|/ _ \ | | | | (_| __/ |_/ / (_| \__ \ __/ \_| |_/\___\___\____/ \__,_|___/\___| realtime database [mydb] Database "mydb" details: [mydb] - Type: AceBase binary [mydb] - Record size: 128 [mydb] - Page size: 1024 [mydb] - Max inline value size: 50 [mydb] - Root record address: 0, 0 [mydb] KIT read, 0 keys indexed [mydb] FST read, 0 pages allocated, 0 free ranges [mydb] Node "/" is being created [mydb] Node "/" saved at address 0,0 - 1 addresses, 4 bytes written in 1 chunk(s) ready `
Author
Owner

@appy-one commented on GitHub (Feb 26, 2021):

You should add the SQLiteStorageSettings to the storage property of the settings you are passing to the AceBase constructor.

The correct syntax is:

const db = new AceBase("mydb", { storage: new SQLiteStorageSettings({ path: "." }) });
<!-- gh-comment-id:786527884 --> @appy-one commented on GitHub (Feb 26, 2021): You should add the ```SQLiteStorageSettings``` to the ```storage``` property of the settings you are passing to the ```AceBase``` constructor. The correct syntax is: ```js const db = new AceBase("mydb", { storage: new SQLiteStorageSettings({ path: "." }) }); ```
Author
Owner

@paradis-A commented on GitHub (Feb 26, 2021):

Thanks for the quick response. now it's working.

<!-- gh-comment-id:786581180 --> @paradis-A commented on GitHub (Feb 26, 2021): Thanks for the quick response. now it's working.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#12
No description provided.