blinkdb icon indicating copy to clipboard operation
blinkdb copied to clipboard

Docs: how to save and load the database?

Open jlarmstrongiv opened this issue 2 years ago • 1 comments

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

jlarmstrongiv avatar Apr 14 '23 14:04 jlarmstrongiv

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.

maradotwebp avatar Apr 15 '23 14:04 maradotwebp