Math operation on a key
The key to do the math operation on
The math sign to use
The value to use in the math operation
Optional
The options to use
A promise if the driver is async, otherwise a number
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.math('key', '+', 1); Copy
const db = new GoodDB(new JSONDriver({path: './database.json'}));db.math('key', '+', 1);
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.math('key', '+', 1); Copy
const db = new GoodDB(new MongoDBDriver({uri: "..."}));await db.connect();await db.math('key', '+', 1);
Math operation on a key