Save function takes no arguments?
disarticulate opened this issue · 4 comments
README:
.save([dest: string]) -> DB | ArrayBuffer
Export the current database. This is using SQLite's backup API. If dest is undefined or empty an ArrayBuffer is returned.
compiled save code:
this.save = ()=>(q.push({
id: f,
fn: "db.save",
args: []
}),
In node it will take a path but - obviously - in the browser not. I think I should make it clearer in the documentation and there might be an error in the typescript interface for the browser as well.
Thank you
Jan
OK.
There are apparently emscriptem compatible file systems, eg: https://github.com/jlongster/absurd-sql/tree/master/src/indexeddb
I'll see if I can update the rEADME
Yes, I looked into that solution a while ago. It is certainly interesting but a bit too experimental. Also I am not eager to work with indexdb. I hope there will be a solution for browser native filesystem access in some not too distant future. For now all db files in the browser will remain just the memory.
No problem, i've already got a pipe line using the simple https://github.com/isomorphic-git/idb-keyval to store and retrieve blobs, works well enough.