mirror of https://gitee.com/bigwinds/arangodb
201 lines
7.1 KiB
Plaintext
201 lines
7.1 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief installation guide
|
|
///
|
|
/// @file
|
|
///
|
|
/// DISCLAIMER
|
|
///
|
|
/// Copyright 2012 triAGENS GmbH, Cologne, Germany
|
|
///
|
|
/// 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.
|
|
///
|
|
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
|
///
|
|
/// @author Dr. Frank Celler
|
|
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page SimpleQueriesTOC
|
|
///
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueriesQueries
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueryDocument "collection.document(document-reference)"</li>
|
|
/// <li>@ref SimpleQueryAll "collection.all()"</li>
|
|
/// <li>@ref SimpleQueryByExample "collection.byExample(example)"</li>
|
|
/// <li>@ref SimpleQueryFirstExample "collection.firstExample(example)"</li>
|
|
/// <li>@ref SimpleQueryCollectionCount "collection.count()"</li>
|
|
/// <li>@ref SimpleQueryToArray "collection.toArray()"</li>
|
|
/// </ol>
|
|
/// </li>
|
|
/// <li>@ref SimpleQueriesGeoQueries
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueryNear "collection.near(latitude, longitude)"</li>
|
|
/// <li>@ref SimpleQueryWithin "collection.within(latitude, longitude)"</li>
|
|
/// <li>@ref SimpleQueryGeo "collection.geo(location)"</li>
|
|
/// </ol>
|
|
/// </li>
|
|
/// <li>@ref SimpleQueriesEdgesQueries
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueryEdges "edges-collection.edges(vertex)"</li>
|
|
/// <li>@ref SimpleQueryInEdges "edges-collection.inEdges(vertex)"</li>
|
|
/// <li>@ref SimpleQueryOutEdges "edges-collection.outEdges(vertex)"</li>
|
|
/// </ol>
|
|
/// </li>
|
|
/// <li>@ref SimpleQueriesPagination
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueryLimit "query.limit(limit)"</li>
|
|
/// <li>@ref SimpleQuerySkip "query.skip(skip)"</li>
|
|
/// </ol>
|
|
/// </li>
|
|
/// <li>@ref SimpleQueriesSequentialAccess
|
|
/// <ol>
|
|
/// <li>@ref SimpleQueryHasNext "query.hasNext()"</li>
|
|
/// <li>@ref SimpleQueryNext "query.next()"</li>
|
|
/// <li>@ref SimpleQueryCount "query.count()"</li>
|
|
/// </ol>
|
|
/// </li>
|
|
/// </ol>
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @page SimpleQueries Simple Queries
|
|
///
|
|
/// Simple queries can be used if the query condition is straight forward
|
|
/// simple, i. e., a document reference, all documents, a query-by-example, or a
|
|
/// simple geo query. In a simple query you can specify exactly one collection
|
|
/// and one condition.
|
|
///
|
|
/// <hr>
|
|
/// @copydoc SimpleQueriesTOC
|
|
/// <hr>
|
|
///
|
|
/// If a query returns a cursor, then you can use @FN{hasNext} and @FN{next} to
|
|
/// iterate over the result set or @FN{toArray} to convert it to an array.
|
|
///
|
|
/// @section SimpleQueriesQueries Queries
|
|
/////////////////////////////////////////
|
|
///
|
|
/// @anchor SimpleQueryDocument
|
|
/// @copydetails JS_DocumentVocbaseCol
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryAll
|
|
/// @copydetails JSF_AvocadoCollection_prototype_all
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryByExample
|
|
/// @copydetails JSF_AvocadoCollection_prototype_byExample
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryFirstExample
|
|
/// @copydetails JSF_AvocadoCollection_prototype_firstExample
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryCollectionCount
|
|
/// @copydetails JS_CountVocbaseCol
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryToArray
|
|
/// @copydetails JSF_AvocadoCollection_prototype_toArray
|
|
///
|
|
/// @section SimpleQueriesGeoQueries Geo Queries
|
|
////////////////////////////////////////////////
|
|
///
|
|
/// The AvocadoDB allows to selects documents based on geographic
|
|
/// coordinates. In order for this to work, a geo-spatial index must be defined.
|
|
/// This index will use a very elaborate algorithm to lookup neighbours that is
|
|
/// a magnitude faster than a simple R* index.
|
|
///
|
|
/// In general a geo coordinate is a pair of latitude and longitude. This can
|
|
/// either be an list with two elements like @CODE{[ -10\, +30 ]} (latitude
|
|
/// first, followed by longitude) or an object like @CODE{{ lon: -10\, lat: +30
|
|
/// }}. In order to find all documents within a given radius around a
|
|
/// coordinate use the @FN{within} operator. In order to find all
|
|
/// documents near a given document use the @FN{near} operator.
|
|
///
|
|
/// It is possible to define more than one geo-spatial index per collection. In
|
|
/// this case you must give a hint using the @FN{geo} operator which of indexes
|
|
/// should be used in a query.
|
|
///
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryNear
|
|
/// @copydetails JSF_AvocadoCollection_prototype_near
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryWithin
|
|
/// @copydetails JSF_AvocadoCollection_prototype_within
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryGeo
|
|
/// @copydetails JSF_AvocadoCollection_prototype_geo
|
|
///
|
|
/// @section SimpleQueriesEdgesQueries Edges Queries
|
|
////////////////////////////////////////////////////
|
|
///
|
|
/// @anchor SimpleQueryEdges
|
|
/// @copydetails JS_EdgesQuery
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryInEdges
|
|
/// @copydetails JS_InEdgesQuery
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryOutEdges
|
|
/// @copydetails JS_OutEdgesQuery
|
|
///
|
|
/// @section SimpleQueriesPagination Pagination
|
|
///////////////////////////////////////////////
|
|
///
|
|
/// If, for example, you display the result of a user search, then you are in
|
|
/// general not interested in the completed result set, but only the first 10 or
|
|
/// so documents. Or maybe the next 10 documents for the second page. In this
|
|
/// case, you can the @FN{skip} and @FN{limit} operators. These operators work
|
|
/// like LIMIT in MySQL.
|
|
///
|
|
/// @FN{skip} used together with @FN{limit} can be used to implement pagination.
|
|
/// The @FN{skip} operator skips over the first n documents. So, in order to
|
|
/// create result pages with 10 result documents per page, you can use
|
|
/// @CODE{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.
|
|
///
|
|
/// @anchor SimpleQueryLimit
|
|
/// @copydetails JSF_SimpleQuery_prototype_limit
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQuerySkip
|
|
/// @copydetails JSF_SimpleQuery_prototype_skip
|
|
///
|
|
/// @section SimpleQueriesSequentialAccess Sequential Access
|
|
////////////////////////////////////////////////////////////
|
|
///
|
|
/// @anchor SimpleQueryHasNext
|
|
/// @copydetails JSF_SimpleQuery_prototype_hasNext
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryNext
|
|
/// @copydetails JSF_SimpleQuery_prototype_next
|
|
/// <hr>
|
|
///
|
|
/// @anchor SimpleQueryCount
|
|
/// @copydetails JSF_SimpleQuery_prototype_count
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Local Variables:
|
|
// mode: outline-minor
|
|
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
|
// End:
|