1
0
Fork 0

Fix markdown, slightly re-organize simple query docs.

This commit is contained in:
CoDEmanX 2015-09-04 22:40:51 +02:00
parent 21d023b502
commit e37920a1fa
4 changed files with 24 additions and 24 deletions

View File

@ -44,11 +44,11 @@
* [Database Methods](Documents/DatabaseMethods.md)
* [Working with Edges](Edges/README.md)
* [Simple Queries](SimpleQueries/README.md)
* [Sequential Access](SimpleQueries/Access.md)
* [Pagination](SimpleQueries/Pagination.md)
* [Modification Queries](SimpleQueries/ModificationQueries.md)
* [Geo Queries](SimpleQueries/GeoQueries.md)
* [Fulltext Queries](SimpleQueries/FulltextQueries.md)
* [Pagination](SimpleQueries/Pagination.md)
* [Sequential Access](SimpleQueries/Access.md)
* [Modification Queries](SimpleQueries/ModificationQueries.md)
* [Transactions](Transactions/README.md)
* [Transaction invocation](Transactions/TransactionInvocation.md)
* [Passing parameters](Transactions/Passing.md)

View File

@ -1,5 +1,23 @@
!CHAPTER Sequential Access and Cursors
If a query returns a cursor, then you can use *hasNext* and *next* to
iterate over the result set or *toArray* to convert it to an array.
If the number of query results is expected to be big, it is possible to
limit the amount of documents transferred between the server and the client
to a specific value. This value is called *batchSize*. The *batchSize*
can optionally be set before or when a simple query is executed.
If the server has more documents than should be returned in a single batch,
the server will set the *hasMore* attribute in the result. It will also
return the id of the server-side cursor in the *id* attribute in the result.
This id can be used with the cursor API to fetch any outstanding results from
the server and dispose the server-side cursor afterwards.
The initial *batchSize* value can be set using the *setBatchSize*
method that is available for each type of simple query, or when the simple
query is executed using its *execute* method. If no *batchSize* value
is specified, the server will pick a reasonable default value.
!SUBSECTION Has Next
<!-- js/common/modules/org/arangodb/simple-query-common.js -->
@startDocuBlock cursorHasNext

View File

@ -8,9 +8,9 @@ MySQL.
*skip* used together with *limit* can be used to implement pagination.
The *skip* operator skips over the first n documents. So, in order to create
result pages with 10 result documents per page, you can use *skip(n \*
10).limit(10)* to access the 10 documents on the n.th page. This result should
be sorted, so that the pagination works in a predicable way.
result pages with 10 result documents per page, you can use <i>skip(n *
10).limit(10)</i> to access the 10 documents on the *n*th page. This result
should be sorted, so that the pagination works in a predicable way.
!SUBSECTION Limit
<!-- js/common/modules/org/arangodb/simple-query-common.js -->

View File

@ -8,22 +8,4 @@ queries, which you can use within the ArangoDB shell and within actions and
transactions. For other languages see the corresponding language API
documentation.
If a query returns a cursor, then you can use *hasNext* and *next* to
iterate over the result set or *toArray* to convert it to an array.
If the number of query results is expected to be big, it is possible to
limit the amount of documents transferred between the server and the client
to a specific value. This value is called *batchSize*. The *batchSize*
can optionally be set before or when a simple query is executed.
If the server has more documents than should be returned in a single batch,
the server will set the *hasMore* attribute in the result. It will also
return the id of the server-side cursor in the *id* attribute in the result.
This id can be used with the cursor API to fetch any outstanding results from
the server and dispose the server-side cursor afterwards.
The initial *batchSize* value can be set using the *setBatchSize*
method that is available for each type of simple query, or when the simple
query is executed using its *execute* method. If no *batchSize* value
is specified, the server will pick a reasonable default value.
You can find a list of queries at [Collection Methods](../Documents/DocumentMethods.md).