GoodDB
    Preparing search index...
    • Get multiple values by their keys at once

      Parameters

      • this: GoodDB
      • keys: string[]

        An array of keys to get

      • Optionaloptions: methodOptions

        The options to use

      Returns Record<string, any> | Promise<Record<string, any>>

      A promise if the driver is async, otherwise an object with key-value pairs

      const db = new GoodDB(new JSONDriver({
      path: './database.json'
      }));
      db.getMany(['key1', 'key2']);
      // Returns: { key1: 'value1', key2: 'value2' }
      const db = new GoodDB(new MongoDBDriver({
      uri: "..."
      }));
      await db.connect();
      await db.getMany(['key1', 'key2']);