mirror of https://gitee.com/bigwinds/arangodb
Fixed some small errors in @startDocuBlock
This commit is contained in:
parent
1a78807a67
commit
19e750b35f
|
@ -7,63 +7,5 @@ of a documents.
|
|||
|
||||
!SUBSECTION Accessing BitArray Indexes from the Shell
|
||||
|
||||
`collection.ensureBitarray( field1, value1, ..., fieldn, valuen)`
|
||||
|
||||
Creates a bitarray index on documents using attributes as paths to the fields ( field1,..., fieldn). A value ( value1,..., valuen) consists of an array of possible values that the field can take. At least one field and one set of possible values must be given.
|
||||
|
||||
All documents, which do not have all of the attribute paths are ignored (that is, are not part of the bitarray index, they are however stored within the collection). A document which contains all of the attribute paths yet has one or more values which are not part of the defined range of values will be rejected and the document will not inserted within the collection. Note that, if a bitarray index is created subsequent to any documents inserted in the given collection, then the creation of the index will fail if one or more documents are rejected (due to attribute values being outside the designated range).
|
||||
|
||||
In case that the index was successfully created, the index identifier is returned.
|
||||
|
||||
In the example below we create a bitarray index with one field and that field can have the values of either 0 or 1. Any document which has the attribute x defined and does not have a value of 0 or 1 will be rejected and therefore not inserted within the collection. Documents without the attribute x defined will not take part in the index.
|
||||
|
||||
arango> arangod> db.example.ensureBitarray("x", [0,1]);
|
||||
{
|
||||
"id" : "2755894/3607862",
|
||||
"unique" : false,
|
||||
"type" : "bitarray",
|
||||
"fields" : [["x", [0, 1]]],
|
||||
"undefined" : false,
|
||||
"isNewlyCreated" : true
|
||||
}
|
||||
|
||||
In the example below we create a bitarray index with one field and that field can have the values of either 0, 1 or other (indicated by []). Any document which has the attribute x defined will take part in the index. Documents without the attribute x defined will not take part in the index.
|
||||
|
||||
arangod> db.example.ensureBitarray("x", [0,1,[]]);
|
||||
{
|
||||
"id" : "2755894/4263222",
|
||||
"unique" : false,
|
||||
"type" : "bitarray",
|
||||
"fields" : [["x", [0, 1, [ ]]]],
|
||||
"undefined" : false,
|
||||
"isNewlyCreated" : true
|
||||
}
|
||||
|
||||
In the example below we create a bitarray index with two fields. Field x can have the values of either 0 or 1; while field y can have the values of 2 or "a". A document which does not have both attributes x and y will not take part within the index. A document which does have both attributes x and y defined must have the values 0 or 1 for attribute x and 2 or a for attribute y, otherwise the document will not be inserted within the collection.
|
||||
|
||||
arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a"]);
|
||||
{
|
||||
"id" : "2755894/5246262",
|
||||
"unique" : false,
|
||||
"type" : "bitarray",
|
||||
"fields" : [["x", [0, 1]], ["y", [0, 1]]],
|
||||
"undefined" : false,
|
||||
"isNewlyCreated" : false
|
||||
}
|
||||
|
||||
In the example below we create a bitarray index with two fields. Field x can have the values of either 0 or 1; while field y can have the values of 2, "a" or other . A document which does not have both attributes x and y will not take part within the index. A document which does have both attributes x and y defined must have the values 0 or 1 for attribute x and any value for attribute y will be acceptable, otherwise the document will not be inserted within the collection.
|
||||
|
||||
arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a",[]]);
|
||||
{
|
||||
"id" : "2755894/5770550",
|
||||
"unique" : false,
|
||||
"type" : "bitarray",
|
||||
"fields" : [["x", [0, 1]], ["y", [2, "a", [ ]]]],
|
||||
"undefined" : false,
|
||||
"isNewlyCreated" : true
|
||||
}
|
||||
|
||||
<!--
|
||||
@anchor IndexBitArrayShellEnsureBitarray
|
||||
@copydetails JSF_ArangoCollection_prototype_ensureBitarray
|
||||
-->
|
||||
<!-- js/server/modules/org/arangodb/arango-collection.js -->
|
||||
@startDocuBlock collectionEnsureBitArray
|
|
@ -3,25 +3,54 @@
|
|||
The action module provides the infrastructure for defining HTTP actions.
|
||||
|
||||
!SECTION Basics
|
||||
!SUBSECTION Error Message
|
||||
!SUBSECTION Error message
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsGetErrorMessage
|
||||
|
||||
!SECTION Standard HTTP Result Generators
|
||||
|
||||
!SUBSECTION Result Ok
|
||||
!SUBSECTION Result ok
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultOk
|
||||
|
||||
!SUBSECTION Result Bad
|
||||
!SUBSECTION Result bad
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultBad
|
||||
`actions.resultNotFound(req, res, code, msg, headers)`
|
||||
|
||||
!SUBSECTION Result Unsupported
|
||||
!SUBSECTION Result not found
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultNotFound
|
||||
|
||||
!SUBSECTION Result unsupported
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultUnsupported
|
||||
|
||||
!SUBSECTION Result Error
|
||||
!SUBSECTION Result error
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultError
|
||||
@startDocuBlock actionsResultError
|
||||
|
||||
!SUBSECTION Result not Implemented
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultNotImplemented
|
||||
|
||||
!SUBSECTION Result permanent redirect
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultPermanentRedirect
|
||||
|
||||
!SUBSECTION Result temporary redirect
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultTemporaryRedirect
|
||||
|
||||
!SECTION ArangoDB Result Generators
|
||||
|
||||
!SUBSECTION Collection not found
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsCollectionNotFound
|
||||
|
||||
!SUBSECTION Index not found
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsIndexNotFound
|
||||
|
||||
!SUBSECTION Result exception
|
||||
<!-- js/server/modules/org/arangodb/actions.js -->
|
||||
@startDocuBlock actionsResultException
|
|
@ -369,7 +369,7 @@ Edge.prototype.getInVertex = function () {
|
|||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude graph-edge-get-out-vertex
|
||||
/// @startDocuBlock
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Edge.prototype.getOutVertex = function () {
|
||||
|
|
|
@ -933,7 +933,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// rejected and therefore not inserted within the collection. Documents without
|
||||
/// the attribute *x* defined will not take part in the index.
|
||||
///
|
||||
/// @code
|
||||
/// ```js
|
||||
/// arango> arangod> db.example.ensureBitarray("x", [0,1]);
|
||||
/// {
|
||||
/// "id" : "2755894/3607862",
|
||||
|
@ -943,7 +943,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// "undefined" : false,
|
||||
/// "isNewlyCreated" : true
|
||||
/// }
|
||||
/// @endcode
|
||||
/// ```
|
||||
///
|
||||
/// In the example below we create a bitarray index with one field and that
|
||||
/// field can have the values of either *0*, *1* or *other* (indicated by
|
||||
|
@ -951,7 +951,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// the index. Documents without the attribute *x* defined will not take part in
|
||||
/// the index.
|
||||
///
|
||||
/// @code
|
||||
/// ```js
|
||||
/// arangod> db.example.ensureBitarray("x", [0,1,[]]);
|
||||
/// {
|
||||
/// "id" : "2755894/4263222",
|
||||
|
@ -961,7 +961,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// "undefined" : false,
|
||||
/// "isNewlyCreated" : true
|
||||
/// }
|
||||
/// @endcode
|
||||
/// ```
|
||||
///
|
||||
/// In the example below we create a bitarray index with two fields. Field *x*
|
||||
/// can have the values of either *0* or *1*; while field *y* can have the values
|
||||
|
@ -971,7 +971,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// *2* or *1* for attribute *y*, otherwise the document will not be inserted
|
||||
/// within the collection.
|
||||
///
|
||||
/// @code
|
||||
/// ```js
|
||||
/// arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a"]);
|
||||
/// {
|
||||
/// "id" : "2755894/5246262",
|
||||
|
@ -981,7 +981,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// "undefined" : false,
|
||||
/// "isNewlyCreated" : false
|
||||
/// }
|
||||
/// @endcode
|
||||
/// ```
|
||||
///
|
||||
/// In the example below we create a bitarray index with two fields. Field *x*
|
||||
/// can have the values of either *0* or *1*; while field *y* can have the
|
||||
|
@ -991,7 +991,7 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// or *1* for attribute *x* and any value for attribute *y* will be acceptable,
|
||||
/// otherwise the document will not be inserted within the collection.
|
||||
///
|
||||
/// @code
|
||||
/// ```js
|
||||
/// arangod> db.example.ensureBitarray("x", [0,1], "y", [2,"a",[]]);
|
||||
/// {
|
||||
/// "id" : "2755894/5770550",
|
||||
|
@ -1001,7 +1001,8 @@ ArangoCollection.prototype.updateByExample = function (example,
|
|||
/// "undefined" : false,
|
||||
/// "isNewlyCreated" : true
|
||||
/// }
|
||||
/// @endcode
|
||||
/// ```
|
||||
///
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -1218,7 +1218,7 @@ Kickstarter.prototype.isHealthy = function() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_Kickstarter_prototype_upgrade
|
||||
///
|
||||
/// `Kickstarter.upgrade()
|
||||
/// `Kickstarter.upgrade()`
|
||||
///
|
||||
/// This performs an upgrade procedure on a cluster as described in
|
||||
/// the plan which was given to the constructor. To this end, other
|
||||
|
|
|
@ -145,7 +145,6 @@ extend(Controller.prototype, {
|
|||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_foxx_controller_handleRequest
|
||||
///
|
||||
/// The *handleRequest* method is the raw way to create a new route. You
|
||||
/// probably wont call it directly, but it is used in the other request methods:
|
||||
|
@ -153,7 +152,6 @@ extend(Controller.prototype, {
|
|||
/// When defining a route you can also define a so called 'parameterized' route
|
||||
/// like */goose/:barn*. In this case you can later get the value the user
|
||||
/// provided for *barn* via the *params* function (see the Request object).
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
handleRequest: function (method, route, callback) {
|
||||
|
|
Loading…
Reference in New Issue