Closed sigmaSd closed 1 year ago
You can just get the underlying data using DB.serialize
, and then write it using the Deno file system API.
thanks @dyedgreen , one question
import { DB } from "https://deno.land/x/sqlite@v3.7.2/mod.ts";
const db = new DB(":memory:", { memory: true });
db.serialize("temp") // Failed to serialize database 'temp'
db.serialize() // works
from the docs I thought that if I use the in memory database I have to use temp
schema but that doesn't seem to be the case, I needed to use the main schema to serialize it
I'm using deno-sqlite, to open an in memory db that I populate with data, this works really well
But today it happened that I wanted to export this to sqlite file, is it possible to add an api to do that
DB.writeToFile("mydb.sql")
?