1
0
Fork 0

forgot to commit

This commit is contained in:
Jan Steemann 2012-08-31 18:20:22 +02:00
parent f70cdc8fcb
commit 2c62d52c88
1 changed files with 23 additions and 2 deletions

View File

@ -268,6 +268,27 @@ SimpleQuery.prototype.clone = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief executes a query
///
/// @FUN{@FA{query}.execute(@FA{batchSize})}
///
/// Executes a simple query. If the optional @FA{batchSize} value is specified,
/// the server will return at most @FN{batchSize} values in one roundtrip.
/// The @FA{batchSize} cannot be adjusted after the query is first executed.
///
/// Note that there is no need to explicitly call the execute method if another
/// means of fetching the query results is chosen. The following two approaches
/// lead to the same result:
/// @code
/// result = db.users.all().toArray();
/// q = db.users.all(); q.execute(); result = [ ]; while (q.hasNext()) { result.push(q.next()); }
/// @endcode
///
/// The following two alternatives both use a @FA{batchSize} and return the same
/// result:
/// @code
/// q = db.users.all(); q.setBatchSize(20); q.execute(); while (q.hasNext()) { print(q.next()); }
/// q = db.users.all(); q.execute(20); while (q.hasNext()) { print(q.next()); }
/// @endcode
////////////////////////////////////////////////////////////////////////////////
SimpleQuery.prototype.execute = function () {
@ -395,7 +416,7 @@ SimpleQuery.prototype.toArray = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief returns the batch size
///
/// @FUN{@FA{query}.getBatchSize()}
/// @FUN{@FA{cursor}.getBatchSize()}
///
/// Returns the batch size for queries. If the returned value is undefined, the
/// server will determine a sensible batch size for any following requests.
@ -408,7 +429,7 @@ SimpleQuery.prototype.getBatchSize = function () {
////////////////////////////////////////////////////////////////////////////////
/// @brief sets the batch size for any following requests
///
/// @FUN{@FA{query}.setBatchSize(@FA{number})}
/// @FUN{@FA{cursor}.setBatchSize(@FA{number})}
///
/// Sets the batch size for queries. The batch size determines how many results
/// are at most transferred from the server to the client in one chunk.