mirror of https://gitee.com/bigwinds/arangodb
Work on formatting and grammer
This commit is contained in:
parent
9090c83fe1
commit
ac2acabd5d
|
@ -521,7 +521,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Executes a query and extract the result in a single go:
|
||||
/// Execute a query and extract the result in a single go
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorCreateCursorForLimitReturnSingle}
|
||||
/// var cn = "products";
|
||||
|
@ -546,7 +546,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Executes a query and extracts part of the result:
|
||||
/// Execute a query and extract a part of the result
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorCreateCursorForLimitReturn}
|
||||
/// var cn = "products";
|
||||
|
@ -574,7 +574,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using query option "fullCount":
|
||||
/// Using the query option "fullCount"
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorCreateCursorOption}
|
||||
/// var url = "/_api/cursor";
|
||||
|
@ -593,7 +593,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Enabling and disabling optimizer rules:
|
||||
/// Enabling and disabling optimizer rules
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorOptimizerRules}
|
||||
/// var url = "/_api/cursor";
|
||||
|
@ -615,8 +615,8 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Executes a data-modification query and retrieves the number of
|
||||
/// modified documents:
|
||||
/// Execute a data-modification query and retrieve the number of
|
||||
/// modified documents
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorDeleteQuery}
|
||||
/// var cn = "products";
|
||||
|
@ -641,7 +641,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Executes a data-modification query with option *ignoreErrors*:
|
||||
/// Execute a data-modification query with option *ignoreErrors*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorDeleteIgnore}
|
||||
/// var cn = "products";
|
||||
|
@ -665,9 +665,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Bad queries:
|
||||
///
|
||||
/// Missing body:
|
||||
/// Bad query - Missing body
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorCreateCursorMissingBody}
|
||||
/// var url = "/_api/cursor";
|
||||
|
@ -679,7 +677,7 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Unknown collection:
|
||||
/// Bad query - Unknown collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorCreateCursorUnknownCollection}
|
||||
/// var url = "/_api/cursor";
|
||||
|
@ -696,8 +694,8 @@ triagens::basics::Json RestCursorHandler::buildExtra (triagens::aql::QueryResult
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Executes a data-modification query that attempts to remove a non-existing
|
||||
/// document:
|
||||
/// Bad query - Execute a data-modification query that attempts to remove a non-existing
|
||||
/// document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorDeleteQueryFail}
|
||||
/// var cn = "products";
|
||||
|
@ -799,7 +797,7 @@ void RestCursorHandler::createCursor () {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Valid request for next batch:
|
||||
/// Valid request for next batch
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCursorForLimitReturnCont}
|
||||
/// var url = "/_api/cursor";
|
||||
|
|
|
@ -170,7 +170,7 @@ HttpHandler::status_t RestDocumentHandler::execute () {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Create a document given a collection named *products*. Note that the
|
||||
/// Create a document in a collection named *products*. Note that the
|
||||
/// revision identifier might or might not by equal to the auto-generated
|
||||
/// key.
|
||||
///
|
||||
|
@ -245,7 +245,7 @@ HttpHandler::status_t RestDocumentHandler::execute () {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Unknown collection name:
|
||||
/// Unknown collection name
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerPostUnknownCollection1}
|
||||
/// var cn = "products";
|
||||
|
@ -261,7 +261,7 @@ HttpHandler::status_t RestDocumentHandler::execute () {
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Illegal document:
|
||||
/// Illegal document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerPostBadJson1}
|
||||
/// var cn = "products";
|
||||
|
@ -709,7 +709,7 @@ bool RestDocumentHandler::getDocumentCoordinator (
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Returns all document paths
|
||||
/// Return all document paths
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerReadDocumentAllPath}
|
||||
/// var cn = "products";
|
||||
|
@ -729,7 +729,7 @@ bool RestDocumentHandler::getDocumentCoordinator (
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Returns all document keys
|
||||
/// Return all document keys
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerReadDocumentAllKey}
|
||||
/// var cn = "products";
|
||||
|
@ -749,7 +749,7 @@ bool RestDocumentHandler::getDocumentCoordinator (
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Collection does not exist.
|
||||
/// Collection does not exist
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerReadDocumentAllCollectionDoesNotExist}
|
||||
/// var cn = "doesnotexist";
|
||||
|
@ -1000,6 +1000,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// these attributes will be ignored. Only the URI and the "ETag" header are
|
||||
/// relevant in order to avoid confusion when using proxies.
|
||||
///
|
||||
///
|
||||
/// Optionally, the URL parameter *waitForSync* can be used to force
|
||||
/// synchronization of the document replacement operation to disk even in case
|
||||
/// that the *waitForSync* flag had been disabled for the entire collection.
|
||||
|
@ -1011,6 +1012,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// synchronization for collections that have a default *waitForSync* value
|
||||
/// of *true*.
|
||||
///
|
||||
///
|
||||
/// The body of the response contains a JSON object with the information about
|
||||
/// the handle and the revision. The attribute *_id* contains the known
|
||||
/// *document-handle* of the updated document, *_key* contains the key which
|
||||
|
@ -1027,6 +1029,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// - specifying the target revision in the *rev* URL query parameter
|
||||
/// - specifying the target revision in the *if-match* HTTP header
|
||||
///
|
||||
///
|
||||
/// Specifying a target revision is optional, however, if done, only one of the
|
||||
/// described mechanisms must be used (either the *rev* URL parameter or the
|
||||
/// *if-match* HTTP header).
|
||||
|
@ -1037,8 +1040,10 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// For example, to conditionally replace a document based on a specific revision
|
||||
/// id, you can use the following request:
|
||||
///
|
||||
///
|
||||
/// `PUT /_api/document/document-handle?rev=etag`
|
||||
///
|
||||
///
|
||||
/// If a target revision id is provided in the request (e.g. via the *etag* value
|
||||
/// in the *rev* URL query parameter above), ArangoDB will check that
|
||||
/// the revision id of the document found in the database is equal to the target
|
||||
|
@ -1046,10 +1051,13 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// id, then by default a *HTTP 412* conflict is returned and no replacement is
|
||||
/// performed.
|
||||
///
|
||||
///
|
||||
/// The conditional update behavior can be overridden with the *policy* URL query parameter:
|
||||
///
|
||||
///
|
||||
/// `PUT /_api/document/document-handle?policy=policy`
|
||||
///
|
||||
///
|
||||
/// If *policy* is set to *error*, then the behavior is as before: replacements
|
||||
/// will fail if the revision id found in the database does not match the target
|
||||
/// revision id specified in the request.
|
||||
|
@ -1083,7 +1091,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Using document handle:
|
||||
/// Using a document handle
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerUpdateDocument}
|
||||
/// var cn = "products";
|
||||
|
@ -1101,7 +1109,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Unknown document handle:
|
||||
/// Unknown document handle
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerUpdateDocumentUnknownHandle}
|
||||
/// var cn = "products";
|
||||
|
@ -1120,7 +1128,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Produce a revision conflict:
|
||||
/// Produce a revision conflict
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerUpdateDocumentIfMatchOther}
|
||||
/// var cn = "products";
|
||||
|
@ -1140,7 +1148,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Last write wins:
|
||||
/// Last write wins
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerUpdateDocumentIfMatchOtherLastWriteWins}
|
||||
/// var cn = "products";
|
||||
|
@ -1159,7 +1167,7 @@ bool RestDocumentHandler::checkDocument () {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Alternative to header field:
|
||||
/// Alternative to header fields
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestDocumentHandlerUpdateDocumentRevOther}
|
||||
/// var cn = "products";
|
||||
|
|
|
@ -360,7 +360,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief imports documents from JSON
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/import,imports documents from JSON}
|
||||
/// @RESTHEADER{POST /_api/import#json,imports documents from JSON}
|
||||
///
|
||||
/// @RESTALLBODYPARAM{documents,string,required}
|
||||
/// The body must either be a JSON-encoded array of objects or a string with
|
||||
|
@ -426,6 +426,9 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// with details about documents that could not be imported.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates documents in the collection identified by `collection-name`.
|
||||
/// The JSON representations of the documents must be passed as the body of the
|
||||
/// POST request. The request body can either consist of multiple lines, with
|
||||
|
@ -481,7 +484,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Importing documents with heterogenous attributes from a JSON array:
|
||||
/// Importing documents with heterogenous attributes from a JSON array
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonList}
|
||||
/// db._flushCache();
|
||||
|
@ -508,7 +511,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing documents from individual JSON lines:
|
||||
/// Importing documents from individual JSON lines
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonLines}
|
||||
/// db._flushCache();
|
||||
|
@ -530,7 +533,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using the auto type detection:
|
||||
/// Using the auto type detection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonType}
|
||||
/// db._flushCache();
|
||||
|
@ -557,7 +560,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing documents into a new collection from a JSON array:
|
||||
/// Importing documents into a new collection from a JSON array
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonCreate}
|
||||
/// db._flushCache();
|
||||
|
@ -584,7 +587,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing into an edge collection, with attributes `_from`, `_to` and `name`:
|
||||
/// Importing into an edge collection, with attributes `_from`, `_to` and `name`
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonEdge}
|
||||
/// db._flushCache();
|
||||
|
@ -610,7 +613,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop("products");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing into an edge collection, omitting `_from` or `_to`:
|
||||
/// Importing into an edge collection, omitting `_from` or `_to`
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonEdgeInvalid}
|
||||
/// db._flushCache();
|
||||
|
@ -633,7 +636,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Violating a unique constraint, but allow partial imports:
|
||||
/// Violating a unique constraint, but allow partial imports
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonUniqueContinue}
|
||||
/// var cn = "products";
|
||||
|
@ -655,7 +658,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Violating a unique constraint, not allowing partial imports:
|
||||
/// Violating a unique constraint, not allowing partial imports
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonUniqueFail}
|
||||
/// var cn = "products";
|
||||
|
@ -673,7 +676,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using a non-existing collection:
|
||||
/// Using a non-existing collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonInvalidCollection}
|
||||
/// var cn = "products";
|
||||
|
@ -688,7 +691,7 @@ int RestImportHandler::handleSingleDocument (RestImportTransaction& trx,
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using a malformed body:
|
||||
/// Using a malformed body
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportJsonInvalidBody}
|
||||
/// var cn = "products";
|
||||
|
@ -924,7 +927,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief imports documents from JSON-encoded lists
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/import,imports document values}
|
||||
/// @RESTHEADER{POST /_api/import#document,imports document values}
|
||||
///
|
||||
/// @RESTALLBODYPARAM{documents,string,required}
|
||||
/// The body must consist of JSON-encoded arrays of attribute values, with one
|
||||
|
@ -981,6 +984,9 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// with details about documents that could not be imported.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates documents in the collection identified by `collection-name`.
|
||||
/// The first line of the request body must contain a JSON-encoded array of
|
||||
/// attribute names. All following lines in the request body must contain
|
||||
|
@ -1038,7 +1044,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// @EXAMPLES
|
||||
///
|
||||
/// Importing two documents, with attributes `_key`, `value1` and `value2` each. One
|
||||
/// line in the import data is empty:
|
||||
/// line in the import data is empty
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvExample}
|
||||
/// var cn = "products";
|
||||
|
@ -1059,7 +1065,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing two documents into a new collection:
|
||||
/// Importing two documents into a new collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvCreate}
|
||||
/// var cn = "products";
|
||||
|
@ -1080,7 +1086,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing into an edge collection, with attributes `_from`, `_to` and `name`:
|
||||
/// Importing into an edge collection, with attributes `_from`, `_to` and `name`
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvEdge}
|
||||
/// var cn = "links";
|
||||
|
@ -1104,7 +1110,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop("products");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Importing into an edge collection, omitting `_from` or `_to`:
|
||||
/// Importing into an edge collection, omitting `_from` or `_to`
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvEdgeInvalid}
|
||||
/// var cn = "links";
|
||||
|
@ -1125,7 +1131,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Violating a unique constraint, but allow partial imports:
|
||||
/// Violating a unique constraint, but allow partial imports
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvUniqueContinue}
|
||||
/// var cn = "products";
|
||||
|
@ -1146,7 +1152,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Violating a unique constraint, not allowing partial imports:
|
||||
/// Violating a unique constraint, not allowing partial imports
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvUniqueFail}
|
||||
/// var cn = "products";
|
||||
|
@ -1163,7 +1169,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using a non-existing collection:
|
||||
/// Using a non-existing collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvInvalidCollection}
|
||||
/// var cn = "products";
|
||||
|
@ -1178,7 +1184,7 @@ bool RestImportHandler::createFromJson (string const& type) {
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using a malformed body:
|
||||
/// Using a malformed body
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestImportCsvInvalidBody}
|
||||
/// var cn = "products";
|
||||
|
|
|
@ -114,6 +114,7 @@ HttpHandler::status_t RestQueryHandler::execute () {
|
|||
///
|
||||
/// @RESTHEADER{GET /_api/query/properties, Returns the properties for the AQL query tracking}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Returns the current query tracking configuration. The configuration is a
|
||||
/// JSON object with the following properties:
|
||||
///
|
||||
|
@ -188,6 +189,7 @@ bool RestQueryHandler::readQueryProperties () {
|
|||
///
|
||||
/// @RESTHEADER{GET /_api/query/current, Returns the currently running AQL queries}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Returns an array containing the AQL queries currently running in the selected
|
||||
/// database. Each query is a JSON object with the following attributes:
|
||||
///
|
||||
|
@ -217,6 +219,7 @@ bool RestQueryHandler::readQueryProperties () {
|
|||
///
|
||||
/// @RESTHEADER{GET /_api/query/slow, Returns the list of slow AQL queries}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Returns an array containing the last AQL queries that exceeded the slow
|
||||
/// query threshold in the selected database.
|
||||
/// The maximum amount of queries in the list can be controlled by setting
|
||||
|
@ -322,6 +325,9 @@ bool RestQueryHandler::readQuery () {
|
|||
///
|
||||
/// @RESTHEADER{DELETE /_api/query/slow, Clears the list of slow AQL queries}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Clears the list of slow AQL queries
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
|
@ -360,6 +366,7 @@ bool RestQueryHandler::deleteQuerySlow () {
|
|||
/// @RESTURLPARAM{query-id,string,required}
|
||||
/// The id of the query.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Kills a running query. The query will be terminated at the next cancelation
|
||||
/// point.
|
||||
///
|
||||
|
@ -458,6 +465,7 @@ bool RestQueryHandler::deleteQuery () {
|
|||
/// can be used to save memory in case very long query strings are used. The
|
||||
/// value is specified in bytes.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// The properties need to be passed in the attribute *properties* in the body
|
||||
/// of the HTTP request. *properties* needs to be a JSON object.
|
||||
///
|
||||
|
@ -577,7 +585,7 @@ bool RestQueryHandler::replaceProperties () {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Valid query:
|
||||
/// a Valid query
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestQueryValid}
|
||||
/// var url = "/_api/query";
|
||||
|
@ -590,7 +598,7 @@ bool RestQueryHandler::replaceProperties () {
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Invalid query:
|
||||
/// an Invalid query
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestQueryInvalid}
|
||||
/// var url = "/_api/query";
|
||||
|
|
|
@ -1163,7 +1163,7 @@ void RestReplicationHandler::handleTrampolineCoordinator () {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// No log events available:
|
||||
/// No log events available
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestReplicationLoggerFollowEmpty}
|
||||
/// var re = require("org/arangodb/replication");
|
||||
|
@ -1177,7 +1177,7 @@ void RestReplicationHandler::handleTrampolineCoordinator () {
|
|||
/// logRawResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// A few log events:
|
||||
/// A few log events
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestReplicationLoggerFollowSome}
|
||||
/// var re = require("org/arangodb/replication");
|
||||
|
@ -1201,7 +1201,7 @@ void RestReplicationHandler::handleTrampolineCoordinator () {
|
|||
/// logRawResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// More events than would fit into the response:
|
||||
/// More events than would fit into the response
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestReplicationLoggerFollowBufferLimit}
|
||||
/// var re = require("org/arangodb/replication");
|
||||
|
@ -1647,7 +1647,7 @@ void RestReplicationHandler::handleCommandInventory () {
|
|||
///
|
||||
/// The response will be an array of JSON objects, one for each collection.
|
||||
/// Each collection containscontains exactly two keys "parameters" and "indexes". This
|
||||
/// information comes from Plan/Collections/<DB-Name>/* in the agency,
|
||||
/// information comes from Plan/Collections/{DB-Name}/* in the agency,
|
||||
/// just that the *indexes* attribute there is relocated to adjust it to
|
||||
/// the data format of arangodump.
|
||||
///
|
||||
|
|
|
@ -104,7 +104,7 @@ bool RestVersionHandler::isDirect () const {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Returns the version information.
|
||||
/// Return the version information
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestVersion}
|
||||
/// var response = logCurlRequest('GET', '/_api/version');
|
||||
|
@ -114,7 +114,7 @@ bool RestVersionHandler::isDirect () const {
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Returns the version information with details.
|
||||
/// Return the version information with details
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestVersionDetails}
|
||||
/// var response = logCurlRequest('GET', '/_api/version?details=true');
|
||||
|
|
|
@ -174,7 +174,8 @@ function parseBodyForCreateCollection (req, res) {
|
|||
///
|
||||
/// @RESTHEADER{POST /_api/collection, Create collection}
|
||||
///
|
||||
/// @RESTBODYPARAM{name,string,required,string} The name of the collection.
|
||||
/// @RESTBODYPARAM{name,string,required,string}
|
||||
/// The name of the collection.
|
||||
///
|
||||
/// @RESTBODYPARAM{waitForSync,boolean,optional,}
|
||||
/// If *true* then the data is synchronized to disk before returning from a
|
||||
|
@ -232,8 +233,8 @@ function parseBodyForCreateCollection (req, res) {
|
|||
/// (The default is *2*): the type of the collection to create.
|
||||
/// The following values for *type* are valid:
|
||||
///
|
||||
/// - *2*: document collection
|
||||
/// - *3*: edges collection
|
||||
/// - *2*: document collection
|
||||
/// - *3*: edges collection
|
||||
///
|
||||
/// @RESTBODYPARAM{indexBuckets,integer,optional,int64}
|
||||
/// The: number of buckets into which indexes using a hash
|
||||
|
@ -1484,7 +1485,7 @@ function put_api_collection_rename (req, res, collection) {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Rotating a journal:
|
||||
/// Rotating the journal:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionRotate}
|
||||
/// var cn = "products";
|
||||
|
@ -1503,7 +1504,7 @@ function put_api_collection_rename (req, res, collection) {
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Rotating without a journal:
|
||||
/// Rotating if no journal exists:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionRotateNoJournal}
|
||||
/// var cn = "products";
|
||||
|
|
|
@ -130,7 +130,7 @@ var ERRORS = require("internal").errors;
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Valid query:
|
||||
/// Valid query
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainValid}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -150,7 +150,7 @@ var ERRORS = require("internal").errors;
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// A plan with some optimizer rules applied:
|
||||
/// A plan with some optimizer rules applied
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainOptimizerRules}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -171,7 +171,7 @@ var ERRORS = require("internal").errors;
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using some options:
|
||||
/// Using some options
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainOptions}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -199,7 +199,7 @@ var ERRORS = require("internal").errors;
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Returning all plans:
|
||||
/// Returning all plans
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainAllPlans}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -222,7 +222,7 @@ var ERRORS = require("internal").errors;
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// A query that produces a warning:
|
||||
/// A query that produces a warning
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainWarning}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -237,7 +237,7 @@ var ERRORS = require("internal").errors;
|
|||
/// logJsonResponse(response);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Invalid query (missing bind parameter):
|
||||
/// Invalid query (missing bind parameter)
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainInvalid}
|
||||
/// var url = "/_api/explain";
|
||||
|
@ -262,7 +262,7 @@ var ERRORS = require("internal").errors;
|
|||
/// the result might also contain less elements than there were top-level
|
||||
/// statements in the AQL query.
|
||||
/// The following example shows a query with a non-sensible filter condition that
|
||||
/// the optimizer has removed so that there are less top-level statements:
|
||||
/// the optimizer has removed so that there are less top-level statements.
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestExplainEmpty}
|
||||
/// var url = "/_api/explain";
|
||||
|
|
|
@ -62,7 +62,7 @@ var API = "_api/index";
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Return information about all indexes:
|
||||
/// Return information about all indexes
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexAllIndexes}
|
||||
/// var cn = "products";
|
||||
|
@ -207,7 +207,7 @@ function get_api_index (req, res) {
|
|||
/// @startDocuBlock JSF_post_api_index_cap
|
||||
/// @brief creates a cap constraint
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/index, Create cap constraint}
|
||||
/// @RESTHEADER{POST /_api/index#CapConstraints, Create cap constraint}
|
||||
///
|
||||
/// @RESTQUERYPARAMETERS
|
||||
///
|
||||
|
@ -227,6 +227,9 @@ function get_api_index (req, res) {
|
|||
///
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
///
|
||||
/// Creates a cap constraint for the collection *collection-name*,
|
||||
/// if it does not already exist. Expects an object containing the index details.
|
||||
|
@ -286,7 +289,7 @@ function get_api_index (req, res) {
|
|||
/// @startDocuBlock JSF_post_api_index_geo
|
||||
/// @brief creates a geo index
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/index, Create geo-spatial index}
|
||||
/// @RESTHEADER{POST /_api/index#geo, Create geo-spatial index}
|
||||
///
|
||||
/// @RESTQUERYPARAMETERS
|
||||
///
|
||||
|
@ -321,6 +324,8 @@ function get_api_index (req, res) {
|
|||
/// http://geojson.org/geojson-spec.html#positions
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates a geo-spatial index in the collection *collection-name*, if
|
||||
/// it does not already exist. Expects an object containing the index details.
|
||||
|
@ -343,7 +348,7 @@ function get_api_index (req, res) {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Creating a geo index with a location attribute:
|
||||
/// Creating a geo index with a location attribute
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateGeoLocation}
|
||||
/// var cn = "products";
|
||||
|
@ -364,7 +369,7 @@ function get_api_index (req, res) {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Creating a geo index with latitude and longitude attributes:
|
||||
/// Creating a geo index with latitude and longitude attributes
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateGeoLatitudeLongitude}
|
||||
/// var cn = "products";
|
||||
|
@ -391,7 +396,7 @@ function get_api_index (req, res) {
|
|||
/// @startDocuBlock JSF_post_api_index_hash
|
||||
/// @brief creates a hash index
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/index, Create hash index}
|
||||
/// @RESTHEADER{POST /_api/index#hash, Create hash index}
|
||||
///
|
||||
/// @RESTQUERYPARAMETERS
|
||||
///
|
||||
|
@ -411,6 +416,8 @@ function get_api_index (req, res) {
|
|||
/// if *true*, then create a sparse index.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates a hash index for the collection *collection-name* if it
|
||||
/// does not already exist. The call expects an object containing the index
|
||||
|
@ -447,7 +454,7 @@ function get_api_index (req, res) {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Creating an unique constraint:
|
||||
/// Creating an unique constraint
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewUniqueConstraint}
|
||||
/// var cn = "products";
|
||||
|
@ -469,7 +476,7 @@ function get_api_index (req, res) {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Creating a non-unique hash index:
|
||||
/// Creating a non-unique hash index
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewHashIndex}
|
||||
/// var cn = "products";
|
||||
|
@ -491,7 +498,7 @@ function get_api_index (req, res) {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Creating a sparse index:
|
||||
/// Creating a sparse index
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseHashIndex}
|
||||
/// var cn = "products";
|
||||
|
@ -578,7 +585,7 @@ function get_api_index (req, res) {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Creating a skiplist index:
|
||||
/// Creating a skiplist index
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewSkiplist}
|
||||
/// var cn = "products";
|
||||
|
@ -600,7 +607,7 @@ function get_api_index (req, res) {
|
|||
/// ~ db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Creating a sparse skiplist index:
|
||||
/// Creating a sparse skiplist index
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseSkiplist}
|
||||
/// var cn = "products";
|
||||
|
@ -629,7 +636,7 @@ function get_api_index (req, res) {
|
|||
/// @startDocuBlock JSF_post_api_index_fulltext
|
||||
/// @brief creates a fulltext index
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/index, Create fulltext index}
|
||||
/// @RESTHEADER{POST /_api/index#fulltext, Create fulltext index}
|
||||
///
|
||||
/// @RESTQUERYPARAMETERS
|
||||
///
|
||||
|
@ -649,6 +656,8 @@ function get_api_index (req, res) {
|
|||
/// this value explicitly when creating the index.
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates a fulltext index for the collection *collection-name*, if
|
||||
/// it does not already exist. The call expects an object containing the index
|
||||
|
@ -669,7 +678,7 @@ function get_api_index (req, res) {
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Creating a fulltext index:
|
||||
/// Creating a fulltext index
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewFulltext}
|
||||
/// var cn = "products";
|
||||
|
@ -696,16 +705,18 @@ function get_api_index (req, res) {
|
|||
/// @startDocuBlock JSF_post_api_index
|
||||
/// @brief creates an index
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/index, Create index}
|
||||
/// @RESTHEADER{POST /_api/index#general, Create index}
|
||||
///
|
||||
/// @RESTQUERYPARAMETERS
|
||||
///
|
||||
/// @RESTQUERYPARAM{collection,string,required}
|
||||
/// The collection name.
|
||||
///
|
||||
/// @RESTLBODYPARAM{index-details,json,required}
|
||||
/// @RESTALLBODYPARAM{index-details,json,required}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// **NOTE** Swagger examples won't work due to the anchor.
|
||||
///
|
||||
///
|
||||
/// Creates a new index in the collection *collection*. Expects
|
||||
/// an object containing the index details.
|
||||
|
|
|
@ -423,6 +423,7 @@ actions.defineHttp({
|
|||
/// way for retrieving documents from a collection using the near operator is
|
||||
/// to issue an [AQL query](../Aql/GeoFunctions.md) using the *NEAR* function as follows:
|
||||
///
|
||||
///
|
||||
/// FOR doc IN NEAR(@@collection, @latitude, @longitude, @limit)
|
||||
/// RETURN doc`
|
||||
///
|
||||
|
@ -441,7 +442,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Without distance:
|
||||
/// Without distance
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleNear}
|
||||
/// var cn = "products";
|
||||
|
@ -469,7 +470,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// With distance:
|
||||
/// With distance
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleNearDistance}
|
||||
/// var cn = "products";
|
||||
|
@ -616,6 +617,7 @@ actions.defineHttp({
|
|||
/// way for retrieving documents from a collection using the near operator is
|
||||
/// to issue an [AQL query](../Aql/GeoFunctions.md) using the *WITHIN* function as follows:
|
||||
///
|
||||
///
|
||||
/// FOR doc IN WITHIN(@@collection, @latitude, @longitude, @radius, @distanceAttributeName)
|
||||
/// RETURN doc
|
||||
///
|
||||
|
@ -634,7 +636,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Without distance:
|
||||
/// Without distance
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleWithin}
|
||||
/// var cn = "products";
|
||||
|
@ -663,7 +665,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// With distance:
|
||||
/// With distance
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleWithinDistance}
|
||||
/// var cn = "products";
|
||||
|
@ -952,6 +954,7 @@ actions.defineHttp({
|
|||
/// to issue an AQL query using the *FULLTEXT* [AQL function](../Aql/FulltextFunctions.md)
|
||||
/// as follows:
|
||||
///
|
||||
///
|
||||
/// FOR doc IN FULLTEXT(@@collection, @attributeName, @queryString, @limit)
|
||||
/// RETURN doc
|
||||
///
|
||||
|
@ -1084,7 +1087,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Matching an attribute:
|
||||
/// Matching an attribute
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleByExample}
|
||||
/// var cn = "products";
|
||||
|
@ -1105,7 +1108,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Matching an attribute which is a sub-document:
|
||||
/// Matching an attribute which is a sub-document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleByExample2}
|
||||
/// var cn = "products";
|
||||
|
@ -1126,7 +1129,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Matching an attribute within a sub-document:
|
||||
/// Matching an attribute within a sub-document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleByExample3}
|
||||
/// var cn = "products";
|
||||
|
@ -1235,7 +1238,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// If a matching document was found:
|
||||
/// If a matching document was found
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleFirstExample}
|
||||
/// var cn = "products";
|
||||
|
@ -1256,7 +1259,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// If no document was found:
|
||||
/// If no document was found
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleFirstExampleNotFound}
|
||||
/// var cn = "products";
|
||||
|
@ -1362,7 +1365,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Retrieving the first n documents:
|
||||
/// Retrieving the first n documents
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleFirst}
|
||||
/// var cn = "products";
|
||||
|
@ -1383,7 +1386,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Retrieving the first document:
|
||||
/// Retrieving the first document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleFirstSingle}
|
||||
/// var cn = "products";
|
||||
|
@ -1479,7 +1482,7 @@ actions.defineHttp({
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Retrieving the last n documents:
|
||||
/// Retrieving the last n documents
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleLast}
|
||||
/// var cn = "products";
|
||||
|
@ -1500,7 +1503,7 @@ actions.defineHttp({
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Retrieving the first document:
|
||||
/// Retrieving the first document
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleLastSingle}
|
||||
/// var cn = "products";
|
||||
|
@ -1596,6 +1599,7 @@ actions.defineHttp({
|
|||
/// way for retrieving documents from a collection within a specific range
|
||||
/// is to use an AQL query as follows:
|
||||
///
|
||||
///
|
||||
/// FOR doc IN @@collection
|
||||
/// FILTER doc.value >= @left && doc.value < @right
|
||||
/// LIMIT @skip, @limit
|
||||
|
@ -1763,7 +1767,9 @@ actions.defineHttp({
|
|||
/// logJsonResponse(response);
|
||||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using Parameter: waitForSync and limit
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleRemoveByExample_1}
|
||||
/// var cn = "products";
|
||||
/// db._drop(cn);
|
||||
|
@ -1783,7 +1789,9 @@ actions.defineHttp({
|
|||
/// logJsonResponse(response);
|
||||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using Parameter: waitForSync and limit with new signature
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleRemoveByExample_2}
|
||||
/// var cn = "products";
|
||||
/// db._drop(cn);
|
||||
|
@ -1934,7 +1942,9 @@ actions.defineHttp({
|
|||
/// logJsonResponse(response);
|
||||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using new Signature for attributes WaitForSync and limit
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleReplaceByExampleWaitForSync}
|
||||
/// var cn = "products";
|
||||
/// db._drop(cn);
|
||||
|
@ -2073,7 +2083,9 @@ actions.defineHttp({
|
|||
/// response body contains an error document in this case.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// using old syntax for options
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleUpdateByExample}
|
||||
/// var cn = "products";
|
||||
/// db._drop(cn);
|
||||
|
@ -2097,7 +2109,9 @@ actions.defineHttp({
|
|||
/// logJsonResponse(response);
|
||||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// using new signature for options
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleUpdateByExample_1}
|
||||
/// var cn = "products";
|
||||
/// db._drop(cn);
|
||||
|
|
|
@ -50,7 +50,7 @@ var API = "_api/tasks";
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Getting a single task by id:
|
||||
/// Fetching a single task by its id
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTasksListOne}
|
||||
/// var url = "/_api/tasks/statistics-average-collector";
|
||||
///
|
||||
|
@ -61,7 +61,7 @@ var API = "_api/tasks";
|
|||
///
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Fetching a non-existing task:
|
||||
/// trying to fetch a non-existing task
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTasksListNonExisting}
|
||||
/// var url = "/_api/tasks/non-existing-task";
|
||||
///
|
||||
|
@ -88,7 +88,7 @@ var API = "_api/tasks";
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Getting all tasks:
|
||||
/// Fetching all tasks
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTasksListAll}
|
||||
/// var url = "/_api/tasks";
|
||||
///
|
||||
|
|
|
@ -131,7 +131,7 @@ var actions = require("org/arangodb/actions");
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// Executing a transaction on a single collection:
|
||||
/// Executing a transaction on a single collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTransactionSingle}
|
||||
/// var cn = "products";
|
||||
|
@ -152,7 +152,7 @@ var actions = require("org/arangodb/actions");
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Executing a transaction using multiple collections:
|
||||
/// Executing a transaction using multiple collections
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTransactionMulti}
|
||||
/// var cn1 = "materials";
|
||||
|
@ -186,7 +186,7 @@ var actions = require("org/arangodb/actions");
|
|||
/// db._drop(cn2);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Aborting a transaction due to an internal error:
|
||||
/// Aborting a transaction due to an internal error
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTransactionAbortInternal}
|
||||
/// var cn = "products";
|
||||
|
@ -213,7 +213,7 @@ var actions = require("org/arangodb/actions");
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Aborting a transaction by explicitly throwing an exception:
|
||||
/// Aborting a transaction by explicitly throwing an exception
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTransactionAbort}
|
||||
/// var cn = "products";
|
||||
|
@ -235,7 +235,7 @@ var actions = require("org/arangodb/actions");
|
|||
/// db._drop(cn);
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Referring to a non-existing collection:
|
||||
/// Referring to a non-existing collection
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTransactionNonExisting}
|
||||
/// var cn = "products";
|
||||
|
|
|
@ -157,6 +157,7 @@ function notFound (req, res, code, message) {
|
|||
/// @RESTBODYPARAM{uniqueness,string,optional,string}
|
||||
/// specifies uniqueness for vertices and edges visited
|
||||
/// if set, must be an object like this:
|
||||
///
|
||||
/// *"uniqueness": {"vertices": "none"|"global"|"path", "edges": "none"|"global"|"path"}*
|
||||
///
|
||||
/// @RESTBODYPARAM{maxIterations,string,optional,string}
|
||||
|
@ -225,7 +226,7 @@ function notFound (req, res, code, message) {
|
|||
///
|
||||
/// The starting vertex will always be Alice.
|
||||
///
|
||||
/// Follow only outbound edges:
|
||||
/// Follow only outbound edges
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalOutbound}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -243,7 +244,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Follow only inbound edges:
|
||||
/// Follow only inbound edges
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalInbound}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -261,7 +262,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Follow any direction of edges:
|
||||
/// Follow any direction of edges
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalAny}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -285,7 +286,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Excluding *Charlie* and *Bob*:
|
||||
/// Excluding *Charlie* and *Bob*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalFilterExclude}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -308,7 +309,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Do not follow edges from *Bob*:
|
||||
/// Do not follow edges from *Bob*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalFilterPrune}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -330,7 +331,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Visit only nodes in a depth of at least 2:
|
||||
/// Visit only nodes in a depth of at least 2
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalMinDepth}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -349,7 +350,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Visit only nodes in a depth of at most 1:
|
||||
/// Visit only nodes in a depth of at most 1
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalMaxDepth}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -368,7 +369,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using a visitor function to return vertex ids only:
|
||||
/// Using a visitor function to return vertex ids only
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalVisitorFunc}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -387,7 +388,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Count all visited nodes and return a list of nodes only:
|
||||
/// Count all visited nodes and return a list of nodes only
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalVisitorCountAndList}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -407,7 +408,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Expand only inbound edges of *Alice* and outbound edges of *Eve*:
|
||||
/// Expand only inbound edges of *Alice* and outbound edges of *Eve*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalVisitorExpander}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -444,7 +445,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Follow the *depthfirst* strategy:
|
||||
/// Follow the *depthfirst* strategy
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalDepthFirst}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -465,7 +466,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Using *postorder* ordering:
|
||||
/// Using *postorder* ordering
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalPostorder}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -508,7 +509,7 @@ function notFound (req, res, code, message) {
|
|||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// Edges should only be included once globally,
|
||||
/// but nodes are included every time they are visited:
|
||||
/// but nodes are included every time they are visited
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{RestTraversalEdgeUniqueness}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
|
@ -532,7 +533,7 @@ function notFound (req, res, code, message) {
|
|||
/// examples.dropGraph("knows_graph");
|
||||
/// @END_EXAMPLE_ARANGOSH_RUN
|
||||
///
|
||||
/// If the underlying graph is cyclic, *maxIterations* should be set:
|
||||
/// If the underlying graph is cyclic, *maxIterations* should be set
|
||||
///
|
||||
/// The underlying graph has two vertices *Alice* and *Bob*.
|
||||
/// With the directed edges:
|
||||
|
|
Loading…
Reference in New Issue