Set a value to a key
The key to set the value to
The value to set
Optional
The options to use
A promise if the driver is async, otherwise a boolean
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.set('key', 'value'); Copy
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.set('key', 'value');
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.set('key', 'value'); Copy
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.set('key', 'value');
Set a value to a key