blinkdb-js/blinkdb

Docs: how to save and load the database?

jlarmstrongiv opened this issue · 1 comments

What is the recommended way to save and load a database with blinkdb?

For now, you can simply use many/insertMany with

// save
const items = await many(table);
saveDataSomewhere(items);

// load
const items = loadDataFromSomewhere();
await insertMany(table, items);

I will implement a faster way in the future, but that will depend heavily on the underlying db structure and therefore will take some time to implement.