function Collection()

in public/dexie.js [3935:3973]


    function Collection(whereClause, keyRangeGenerator) {
      /// <summary>
      ///
      /// </summary>
      /// <param name="whereClause" type="WhereClause">Where clause instance</param>
      /// <param name="keyRangeGenerator" value="function(){ return IDBKeyRange.bound(0,1);}" optional="true"></param>
      var keyRange = null,
        error = null;
      if (keyRangeGenerator)
        try {
          keyRange = keyRangeGenerator();
        } catch (ex) {
          error = ex;
        }
      var whereCtx = whereClause._ctx,
        table = whereCtx.table;
      this._ctx = {
        table: table,
        index: whereCtx.index,
        isPrimKey:
          !whereCtx.index ||
          (table.schema.primKey.keyPath &&
            whereCtx.index === table.schema.primKey.name),
        range: keyRange,
        keysOnly: false,
        dir: "next",
        unique: "",
        algorithm: null,
        filter: null,
        replayFilter: null,
        justLimit: true,
        isMatch: null,
        offset: 0,
        limit: Infinity,
        error: error,
        or: whereCtx.or,
        valueMapper: table.hook.reading.fire,
      };
    }