Sha256: fd7a8ec454b4ba1db025eae7293ca34228423406972249d60e8833de2df4ba6e

Contents?: true

Size: 1.82 KB

Versions: 127

Compression:

Stored size: 1.82 KB

Contents

/*
  Copyright 2009 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

/**
 * @fileoverview A Gears implementation of dbwrapperapi ResultSet.
 */

/**
 * Creates a Gears ResultSet object.
 * @see google.wspl.ResultSet#ResultSet
 *
 * @constructor
 * @extends google.wspl.ResultSet
 * @param {!Array.<Object>} resultArray An array of hash objects where the
 *     column names in the query are used as members of the objects.
 */
google.wspl.gears.ResultSet = function(resultArray) {
  google.wspl.ResultSet.call(this);

  /**
   * The result set as an array of hash objects.
   * @type {!Array.<Object>}
   * @private
   */
  this.resultArray_ = resultArray;
};
google.inherits(google.wspl.gears.ResultSet, google.wspl.ResultSet);

/**
 * The current record in the result set.
 * @type {number}
 * @private
 */
google.wspl.gears.ResultSet.prototype.current_ = 0;

/**
 * @see google.wspl.ResultSet#isValidRow
 * @inheritDoc
 */
google.wspl.gears.ResultSet.prototype.isValidRow = function() {
  return this.current_ < this.resultArray_.length;
};

/**
 * @see google.wspl.ResultSet#next
 * @inheritDoc
 */
google.wspl.gears.ResultSet.prototype.next = function() {
  this.current_++;
};

/**
 * @see google.wspl.ResultSet#getRow
 * @inheritDoc
 */
google.wspl.gears.ResultSet.prototype.getRow = function() {
  return this.resultArray_[this.current_];
};

Version data entries

127 entries across 127 versions & 5 rubygems

Version Path
middleman-core-3.4.1 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.4.0 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.12 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.11 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.10 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.9 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.8 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.7 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.6 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.5 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-cj-3.3.6 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-cj-3.3.5 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-cj-3.3.4 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.4 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.3 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.2 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.1 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.3.0 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.2.2 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js
middleman-core-3.2.1 lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js