An object with key-value pairs to set
Optionaloptions: methodOptionsThe options to use
A promise if the driver is async, otherwise a boolean
const db = new GoodDB(new JSONDriver({
path: './database.json'
}));
db.setMany({ key1: 'value1', key2: 'value2' });
const db = new GoodDB(new MongoDBDriver({
uri: "..."
}));
await db.connect();
await db.setMany({ key1: 'value1', key2: 'value2' });
Set multiple key-value pairs at once