GoodDB
    Preparing search index...
    • Math operation on a key

      Parameters

      • this: GoodDB
      • key: string

        The key to do the math operation on

      • mathSign: MathSigns

        The math sign to use

      • value: number

        The value to use in the math operation

      • Optionaloptions: methodOptions

        The options to use

      Returns number | Promise<number>

      A promise if the driver is async, otherwise a number

      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);