1
0
Fork 0

Fixed merge conflict for generated files

This commit is contained in:
Michael Hackstein 2014-06-04 18:00:58 +02:00
commit fa38738ea5
78 changed files with 2263 additions and 2247 deletions

View File

@ -73,13 +73,13 @@ Note: some other collection properties, such as type, isVolatile, or keyOptions
Read all properties
arango> db.examples.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
arango> db.examples.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
Change a property
arango> db.examples.properties({ waitForSync : false })
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
arango> db.examples.properties({ waitForSync : false })
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
<!--@copydetails JS_PropertiesVocbaseCol-->

View File

@ -11,11 +11,11 @@ explicitly mark their start and end points:
FOR u IN users
LET recommendations = (
FOR r IN recommendations
FILTER u.id == r.userId
SORT u.rank DESC
LIMIT 10
RETURN r
FOR r IN recommendations
FILTER u.id == r.userId
SORT u.rank DESC
LIMIT 10
RETURN r
)
RETURN { "user" : u, "recommendations" : recommendations }
@ -23,8 +23,8 @@ explicitly mark their start and end points:
FOR u IN users
COLLECT city = u.city INTO g
RETURN { "city" : city, "numUsers" : LENGTH(g), "maxRating": MAX(
FOR r IN g
RETURN r.user.rating
FOR r IN g
RETURN r.user.rating
) }
Subqueries might also include other subqueries themselves.

View File

@ -22,12 +22,12 @@ AQL supports two types of comments:
lines as necessary.
/* this is a comment */ RETURN 1
/* these */ RETURN /* are */ 1 /* multiple */ + /* comments */ 1
/* this is
a multi line
comment */
// a single line comment
/* this is a comment */ RETURN 1
/* these */ RETURN /* are */ 1 /* multiple */ + /* comments */ 1
/* this is
a multi line
comment */
// a single line comment
!SUBSECTION Keywords
@ -125,8 +125,8 @@ attribute naming conventions.
FOR u IN users
FOR f IN friends
FILTER u.active == true && f.active == true && u.id == f.userId
RETURN u.name
FILTER u.active == true && f.active == true && u.id == f.userId
RETURN u.name
In the above example, the attribute names `active`, `name`, `id`, and `userId`
are qualified using the collection names they belong to (`u` and `f`
@ -316,7 +316,7 @@ when using the bind parameter in a query, two `@` symbols must be used).
FOR u IN @@collection
FILTER u.active == true
RETURN u
RETURN u
!SUBSECTION Type and value order

View File

@ -39,7 +39,7 @@ statements will be created.
FOR u IN users
FOR l IN locations
RETURN { "user" : u, "location" : l }
RETURN { "user" : u, "location" : l }
In this example, there are two list iterations: an outer iteration over the list
`users` plus an inner iteration over the list `locations`. The inner list is
@ -170,14 +170,14 @@ making the whole query more readable.
FOR u IN users
LET friends = (
FOR f IN friends
FILTER u.id == f.userId
RETURN f
FOR f IN friends
FILTER u.id == f.userId
RETURN f
)
LET memberships = (
FOR m IN memberships
FILTER u.id == m.userId
RETURN m
FOR m IN memberships
FILTER u.id == m.userId
RETURN m
)
RETURN { "user" : u, "friends" : friends, "numFriends" : LENGTH(friends), "memberShips" : memberships }

View File

@ -662,7 +662,7 @@ AQL supports the following functions to operate on document values:
[
{ "user1" : { "name" : "J" },
"user2" : { "name" : "T" } }
"user2" : { "name" : "T" } }
]
When merging documents with identical attribute names, the attribute values of the

View File

@ -18,10 +18,10 @@ The isDeterministic attribute can be used to specify whether the function result
!SUBSUBSECTION Examples
arangosh> require("org/arangodb/aql/functions").register("myfunctions::temperature::celsiustofahrenheit",
function (celsius) {
return celsius * 1.8 + 32;
});
arangosh> require("org/arangodb/aql/functions").register("myfunctions::temperature::celsiustofahrenheit",
function (celsius) {
return celsius * 1.8 + 32;
});
It is possible to unregister a single user function, or a whole group of user functions (identified by their namespace) in one go:
@ -33,8 +33,8 @@ Trying to unregister a function that does not exist will result in an exception.
!SUBSUBSECTION Examples
arangosh> require("org/arangodb/aql/functions").unregister("myfunctions::temperature::celsiustofahrenheit");
aqlfunctions.unregisterGroup(prefix)
arangosh> require("org/arangodb/aql/functions").unregister("myfunctions::temperature::celsiustofahrenheit");
aqlfunctions.unregisterGroup(prefix)
Unregisters a group of AQL user function, identified by a common function group prefix.
@ -42,8 +42,8 @@ This will return the number of functions unregistered.
!SUBSUBSECTION Examples
arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions::temperature");
arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions");
arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions::temperature");
arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions");
To get an overview of which functions are currently registered, the toArray function can be used:
@ -59,15 +59,15 @@ The result may optionally be restricted to a specified group of functions by spe
To list all available user functions:
arangosh> require("org/arangodb/aql/functions").toArray();
arangosh> require("org/arangodb/aql/functions").toArray();
To list all available user functions in the myfunctions namespace:
arangosh> require("org/arangodb/aql/functions").toArray("myfunctions");
arangosh> require("org/arangodb/aql/functions").toArray("myfunctions");
To list all available user functions in the myfunctions::temperature namespace:
arangosh> require("org/arangodb/aql/functions").toArray("myfunctions::temperature");
arangosh> require("org/arangodb/aql/functions").toArray("myfunctions::temperature");

View File

@ -210,7 +210,7 @@ It is possible to use more then one constraint for the same URL part.
{
url: {
match: "/hello/:name|:id/world",
constraint: {
constraint: {
name: "/[a-z]+/", id: "/[0-9]+/"
}
}
@ -297,10 +297,10 @@ to test the above examples.
{
routes: [
{ url: { match: "/hello/world" }, content: "route 1" },
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "route 2" },
{ url: { match: "/:something/world" }, content: "route 3" },
{ url: { match: "/hello/*" }, content: "route 4" },
{ url: { match: "/hello/world" }, content: "route 1" },
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "route 2" },
{ url: { match: "/:something/world" }, content: "route 3" },
{ url: { match: "/hello/*" }, content: "route 4" },
]
}
@ -342,8 +342,8 @@ You can specify a body and a content-type.
{
content: {
contentType: "text/html",
body: "<html><body>Hello World</body></html>"
contentType: "text/html",
body: "<html><body>Hello World</body></html>"
}
}

View File

@ -12,15 +12,15 @@ fashion. The collection `_users` contains all users and a salted SHA256 hash
of their passwords. A user can be active or inactive. A typical document of this
collection is
{
"_id" : "_users/1172449",
"_rev" : "1172449",
"_key" : "1172449",
"active" : true,
"changePassword" : false,
"user" : "root",
"password" : "$1$bd5458a8$8b23e2e1a762f75001ab182235b8ab1b8665bc572b0734a042a501b3c34e567a"
}
{
"_id" : "_users/1172449",
"_rev" : "1172449",
"_key" : "1172449",
"active" : true,
"changePassword" : false,
"user" : "root",
"password" : "$1$bd5458a8$8b23e2e1a762f75001ab182235b8ab1b8665bc572b0734a042a501b3c34e567a"
}
<!--

View File

@ -6,14 +6,14 @@ Returns the identifier of the edge.
*Examples*
arango> v = g.addVertex("v");
Vertex("v")
arango> e = g.addEdge(v, v, 1, "self");
Edge(1)
arango> e.getId();
1
arango> v = g.addVertex("v");
Vertex("v")
arango> e = g.addEdge(v, v, 1, "self");
Edge(1)
arango> e.getId();
1
`edge.getInVertex()`
@ -21,14 +21,14 @@ Returns the vertex at the head of the edge.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getInVertex();
Vertex(1)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getInVertex();
Vertex(1)
`edge.getLabel()`
@ -36,14 +36,14 @@ Returns the label of the edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.getLabel();
knows
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.getLabel();
knows
`edge.getOutVertex()`
@ -51,14 +51,14 @@ Returns the vertex at the tail of the edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getOutVertex();
Vertex(1)
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getOutVertex();
Vertex(1)
`edge.getPeerVertex( vertex)`
@ -66,14 +66,14 @@ Returns the peer vertex of the edge and the vertex.
*Examples*
arango> v1 = g.addVertex("1");
Vertex("1")
arango> v2 = g.addVertex("2");
Vertex("2")
arango> e = g.addEdge(v1, v2, "1->2", "knows");
Edge("1->2")
arango> e.getPeerVertex(v1);
Vertex(2)
arango> v1 = g.addVertex("1");
Vertex("1")
arango> v2 = g.addVertex("2");
Vertex("2")
arango> e = g.addEdge(v1, v2, "1->2", "knows");
Edge("1->2")
arango> e.getPeerVertex(v1);
Vertex(2)
`edge.getProperty( name)`
@ -81,14 +81,14 @@ Returns the property name an edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { "weight" : 10 });
Edge(2)
arango> e.getProperty("weight");
10
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { "weight" : 10 });
Edge(2)
arango> e.getProperty("weight");
10
`edge.getPropertyKeys()`
@ -96,20 +96,20 @@ Returns all propety names an edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropertyKeys()
[ "weight" ]
arango> e.setProperty("name", "Hugo");
Hugo
arango> e.getPropertyKeys()
[ "weight", "name" ]
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropertyKeys()
[ "weight" ]
arango> e.setProperty("name", "Hugo");
Hugo
arango> e.getPropertyKeys()
[ "weight", "name" ]
`edge.properties()`
@ -117,14 +117,14 @@ Returns all properties and their values of an edge
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.properties();
{ "weight" : 10 }
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.properties();
{ "weight" : 10 }
`edge.setProperty( name, value)`
@ -132,20 +132,20 @@ Changes or sets the property name an edges to value.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropert("weight")
10
arango> e.setProperty("weight", 20);
20
arango> e.getPropert("weight")
20
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropert("weight")
10
arango> e.setProperty("weight", 20);
20
arango> e.getPropert("weight")
20
<!--

View File

@ -4,10 +4,10 @@
The graph module provides basic functions dealing with graph structures. The
examples assume
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g = new Graph("graph", "vertices", "edges");
Graph("graph")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g = new Graph("graph", "vertices", "edges");
Graph("graph")
`Graph(name, vertices, edges)`
@ -19,13 +19,13 @@ Returns a known graph.
!SUBSUBSECTION Examples
arango> var Graph = require("org/arangodb/graph").Graph;
arango> new Graph("graph", db.vertices, db.edges);
Graph("graph")
arango> new Graph("graph", "vertices", "edges");
Graph("graph")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> new Graph("graph", db.vertices, db.edges);
Graph("graph")
arango> new Graph("graph", "vertices", "edges");
Graph("graph")
`graph.addEdge( out, in, id)`
@ -45,17 +45,17 @@ Creates a new edge and returns the edge object. The edge has the label label and
!SUBSUBSECTION Examples
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> e = g.addEdge(v1, v2, 4, "1->2", { name : "Emil");
Edge(4)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> e = g.addEdge(v1, v2, 4, "1->2", { name : "Emil");
Edge(4)
`graph.addVertex( id)`
@ -69,16 +69,16 @@ Creates a new vertex and returns the vertex object. The vertex contains the prop
Without any properties:
arango> v = g.addVertex("hugo");
Vertex("hugo")
arango> v = g.addVertex("hugo");
Vertex("hugo")
With given properties:
arango> v = g.addVertex("Emil", { age : 123 });
Vertex("Emil")
arango> v.getProperty("age");
123
arango> v = g.addVertex("Emil", { age : 123 });
Vertex("Emil")
arango> v.getProperty("age");
123
`graph.getEdges()`
@ -86,14 +86,14 @@ Returns an iterator for all edges of the graph. The iterator supports the method
!SUBSUBSECTION Examples
arango> f = g.getEdges();
[edge iterator]
arango> f.hasNext();
true
arango> e = f.next();
Edge("4636053")
arango> f = g.getEdges();
[edge iterator]
arango> f.hasNext();
true
arango> e = f.next();
Edge("4636053")
`graph.getVertex( id)`
@ -101,11 +101,11 @@ Returns the vertex identified by id or null.
!SUBSUBSECTION Examples
arango> g.addVertex(1);
Vertex(1)
arango> g.addVertex(1);
Vertex(1)
arango> g.getVertex(1)
Vertex(1)
arango> g.getVertex(1)
Vertex(1)
`graph.getVertices()`
@ -113,14 +113,14 @@ Returns an iterator for all vertices of the graph. The iterator supports the met
!SUBSUBSECTION Examples
arango> f = g.getVertices();
[vertex iterator]
arango> f.hasNext();
true
arango> v = f.next();
Vertex(18364)
arango> f = g.getVertices();
[vertex iterator]
arango> f.hasNext();
true
arango> v = f.next();
Vertex(18364)
`graph.removeVertex( vertex, waitForSync)`
@ -128,19 +128,19 @@ Deletes the vertex and all its edges.
!SUBSUBSECTION Examples
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeVertex(v1);
arango> v2.edges();
[ ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeVertex(v1);
arango> v2.edges();
[ ]
`graph.removeEdge( vertex, waitForSync)`
@ -148,19 +148,19 @@ Deletes the edge. Note that the in and out vertices are left untouched.
!SUBSUBSECTION Examples
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeEdge(e);
arango> v2.edges();
[ ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeEdge(e);
arango> v2.edges();
[ ]
`graph.drop( waitForSync)`

View File

@ -6,10 +6,10 @@ forming the edges. Together both collections form a graph. Assume that the
vertex collection is called `vertices` and the edges collection `edges`, then
you can build a graph using the Graph constructor.
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g1 = new Graph("graph", "vertices", "edges");
Graph("vertices", "edges")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g1 = new Graph("graph", "vertices", "edges");
Graph("vertices", "edges")
<!--
@verbinclude graph25
@ -18,10 +18,10 @@ you can build a graph using the Graph constructor.
It is possible to use different edges with the same vertices. For instance, to
build a new graph with a different edge collection use
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g2 = new Graph("graph", "vertices", "alternativeEdges");
Graph("vertices", "alternativeEdges")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g2 = new Graph("graph", "vertices", "alternativeEdges");
Graph("vertices", "alternativeEdges")
<!--
@verbinclude graph26

View File

@ -14,22 +14,22 @@ Creates a new edge from peer to vertex with given label and properties defined i
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addInEdge(v2, "2 -> 1");
Edge("2 -> 1")
arango> v1.getInEdges();
[ Edge("2 -> 1") ]
arango> v1.addInEdge(v2, "D", "knows", { data : 1 });
Edge("D")
arango> v1.getInEdges();
[ Edge("K"), Edge("2 -> 1"), Edges("D") ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addInEdge(v2, "2 -> 1");
Edge("2 -> 1")
arango> v1.getInEdges();
[ Edge("2 -> 1") ]
arango> v1.addInEdge(v2, "D", "knows", { data : 1 });
Edge("D")
arango> v1.getInEdges();
[ Edge("K"), Edge("2 -> 1"), Edges("D") ]
`vertex.addOutEdge( peer)`
@ -45,21 +45,21 @@ Creates a new edge from vertex to peer with given label and properties defined i
Examples
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addOutEdge(v2, "1->2");
Edge("1->2")
arango> v1.getOutEdges();
[ Edge(1->2") ]
arango> v1.addOutEdge(v2, 3, "knows");
Edge(3)
arango> v1.addOutEdge(v2, 4, "knows", { data : 1 });
Edge(4)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addOutEdge(v2, "1->2");
Edge("1->2")
arango> v1.getOutEdges();
[ Edge(1->2") ]
arango> v1.addOutEdge(v2, 3, "knows");
Edge(3)
arango> v1.addOutEdge(v2, 4, "knows", { data : 1 });
Edge(4)
`vertex.edges()`
@ -67,20 +67,20 @@ Returns a list of in- or outbound edges of the vertex.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex();
Vertex(2)
arango> e = g.addEdge(v1, v2, "1->2");
Edge("1->2")
arango> v1.edges();
[ Edge("1->2") ]
arango> v2.edges();
[ Edge("1->2") ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex();
Vertex(2)
arango> e = g.addEdge(v1, v2, "1->2");
Edge("1->2")
arango> v1.edges();
[ Edge("1->2") ]
arango> v2.edges();
[ Edge("1->2") ]
`vertex.getId()`
@ -88,11 +88,11 @@ Returns the identifier of the vertex. If the vertex was deleted, then undefined
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getId();
"1"
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getId();
"1"
`vertex.getInEdges( label, ...)`
@ -100,29 +100,29 @@ Returns a list of inbound edges of the vertex with given label(s).
*Examples*
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v2.getInEdges();
[ Edge(3), Edge(4) ]
arango> v2.getInEdges("knows");
[ Edge(3) ]
arango> v2.getInEdges("hates");
[ Edge(4) ]
arango> v2.getInEdges("knows", "hates");
[ Edge(3), Edge(4) ]
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v2.getInEdges();
[ Edge(3), Edge(4) ]
arango> v2.getInEdges("knows");
[ Edge(3) ]
arango> v2.getInEdges("hates");
[ Edge(4) ]
arango> v2.getInEdges("knows", "hates");
[ Edge(3), Edge(4) ]
`vertex.getOutEdges( label, ...)`
@ -130,29 +130,29 @@ Returns a list of outbound edges of the vertex with given label(s).
*Examples*
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v1.getOutEdges();
[ Edge(3), Edge(4) ]
arango> v1.getOutEdges("knows");
[ Edge(3) ]
arango> v1.getOutEdges("hates");
[ Edge(4) ]
arango> v1.getOutEdges("knows", "hates");
[ Edge(3), Edge(4) ]
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v1.getOutEdges();
[ Edge(3), Edge(4) ]
arango> v1.getOutEdges("knows");
[ Edge(3) ]
arango> v1.getOutEdges("hates");
[ Edge(4) ]
arango> v1.getOutEdges("knows", "hates");
[ Edge(3), Edge(4) ]
`vertex.getEdges( label, ...)`
@ -164,28 +164,28 @@ Returns the property name a vertex.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
Hugo
vertex.getPropertyKeys()
Returns all propety names a vertex.
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
Hugo
vertex.getPropertyKeys()
Returns all propety names a vertex.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getPropertyKeys();
[ "name" ]
arango> v.setProperty("email", "hugo@hugo.de");
"hugo@hugo.de"
arango> v.getPropertyKeys();
[ "name", "email" ]
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getPropertyKeys();
[ "name" ]
arango> v.setProperty("email", "hugo@hugo.de");
"hugo@hugo.de"
arango> v.getPropertyKeys();
[ "name", "email" ]
`vertex.properties()`
@ -193,11 +193,11 @@ Returns all properties and their values of a vertex
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.properties();
{ name : "Hugo" }
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.properties();
{ name : "Hugo" }
`vertex.setProperty( name, value)`
@ -205,17 +205,17 @@ Changes or sets the property name a vertex to value.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
"Hugo"
arango> v.setProperty("name", "Emil");
"Emil"
arango> v.getProperty("name");
"Emil"
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
"Hugo"
arango> v.setProperty("name", "Emil");
"Emil"
arango> v.getProperty("name");
"Emil"
`vertex.commonNeighborsWith( target_vertex, options)`

View File

@ -4,7 +4,7 @@ All collections in ArangoDB have an unique identifier and an unique
name. ArangoDB internally uses the collection's unique identifier to look up
collections. This identifier, however, is managed by ArangoDB and the user has
no control over it. In order to allow users to use their own names, each collection
also has an unique name which is specified by the user. To access a collection
also has an unique name which is specified by the user. To access a collection
from the user perspective, the collection name should be used, i.e.:
*db._collection(collection-name)*

View File

@ -7,11 +7,11 @@ Drops a collection and all its indexes.
Drops a collection:
arango> col = db.examples;
[ArangoCollection 109757, "examples" (status unloaded)]
arango> col.drop()
arango> col;
[ArangoCollection 109757, "examples" (status deleted)]
arango> col = db.examples;
[ArangoCollection 109757, "examples" (status unloaded)]
arango> col.drop()
arango> col;
[ArangoCollection 109757, "examples" (status deleted)]
`collection.truncate()`
@ -58,13 +58,13 @@ Note: some other collection properties, such as type, isVolatile, or keyOptions
Read all properties
arango> db.examples.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
arango> db.examples.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
Change a property
arango> db.examples.properties({ waitForSync : false })
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
arango> db.examples.properties({ waitForSync : false })
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
`collection.figures()`
@ -89,8 +89,8 @@ Returns an object containing all collection figures.
*Examples*
arango> db.demo.figures()
{ "alive" : { "count" : 1000, "size" : 45000 }, "dead" : { "count" : 0, "size" : 0, "deletion" : 0 }, "datafiles" : { "count" : 0, "fileSize" : 0 }, "journals" : { "count" : 1, "fileSize" : 33554432 }, "shapes" : { "count" : 7 } }
arango> db.demo.figures()
{ "alive" : { "count" : 1000, "size" : 45000 }, "dead" : { "count" : 0, "size" : 0, "deletion" : 0 }, "datafiles" : { "count" : 0, "fileSize" : 0 }, "journals" : { "count" : 1, "fileSize" : 33554432 }, "shapes" : { "count" : 7 } }
`collection.load()`
@ -98,11 +98,11 @@ Loads a collection into memory.
*Examples*
arango> col = db.example;
[ArangoCollection 164208316, "example" (status unloading)]
arango> col.load();
arango> col;
[ArangoCollection 164208316, "example" (status loaded)]
arango> col = db.example;
[ArangoCollection 164208316, "example" (status unloading)]
arango> col.load();
arango> col;
[ArangoCollection 164208316, "example" (status loaded)]
`collection.reserve( number)`
@ -136,11 +136,11 @@ Starts unloading a collection from memory. Note that unloading is deferred until
*Examples*
arango> col = db.example;
[ArangoCollection 164208316, "example" (status loaded)]
arango> col.unload();
arango> col;
[ArangoCollection 164208316, "example" (status unloaded)]
arango> col = db.example;
[ArangoCollection 164208316, "example" (status loaded)]
arango> col.unload();
arango> col;
[ArangoCollection 164208316, "example" (status unloaded)]
`collection.rename( new-name)`
@ -150,11 +150,11 @@ If renaming fails for any reason, an error is thrown.
*Examples*
arango> c = db.example;
[ArangoCollection 68519, "example" (status new born)]
arango> c.rename("better-example");
arango> c;
[ArangoCollection 68519, "better-example" (status new born)]
arango> c = db.example;
[ArangoCollection 68519, "example" (status new born)]
arango> c.rename("better-example");
arango> c;
[ArangoCollection 68519, "better-example" (status new born)]
`collection.rotate()`

View File

@ -11,18 +11,18 @@ Returns the collection with the given identifier or null if no such collection e
Get a collection by name:
arango> db._collection("demo");
[ArangoCollection 145387, "demo" (status loaded)]
arango> db._collection("demo");
[ArangoCollection 145387, "demo" (status loaded)]
Get a collection by id:
arango> db._collection(145387);
[ArangoCollection 145387, "demo" (status loaded)]
arango> db._collection(145387);
[ArangoCollection 145387, "demo" (status loaded)]
Unknown collection:
arango> db._collection("unknown")
null
arango> db._collection("unknown")
null
`db._create(collection-name)`
@ -46,43 +46,43 @@ Properties must be an object with the following attributes:
With defaults:
arango> c = db._create("cars");
[ArangoCollection 111137, "cars" (status loaded)]
arango> c.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
arango> c = db._create("cars");
[ArangoCollection 111137, "cars" (status loaded)]
arango> c.properties()
{ "waitForSync" : false, "journalSize" : 33554432, "isVolatile" : false }
With properties:
arango> c = db._create("cars", { waitForSync : true, journalSize : 1024 * 1204 });
[ArangoCollection 96384, "cars" (status loaded)]
arango> c.properties()
{ "waitForSync" : true, "journalSize" : 1232896, "isVolatile" : false }
arango> c = db._create("cars", { waitForSync : true, journalSize : 1024 * 1204 });
[ArangoCollection 96384, "cars" (status loaded)]
arango> c.properties()
{ "waitForSync" : true, "journalSize" : 1232896, "isVolatile" : false }
With a key generator:
arango> db._create("users", { keyOptions: { type: "autoincrement", offset: 10, increment: 5 } });
[ArangoCollection 1533103587969, "users" (type document, status loaded)]
arango> db._create("users", { keyOptions: { type: "autoincrement", offset: 10, increment: 5 } });
[ArangoCollection 1533103587969, "users" (type document, status loaded)]
arango> db.users.save({ name: "user 1" });
{ "_id" : "users/10", "_rev" : "1533104964225", "_key" : "10" }
arango> db.users.save({ name: "user 2" });
{ "_id" : "users/15", "_rev" : "1533105095297", "_key" : "15" }
arango> db.users.save({ name: "user 3" });
{ "_id" : "users/20", "_rev" : "1533105226369", "_key" : "20" }
arango> db.users.save({ name: "user 1" });
{ "_id" : "users/10", "_rev" : "1533104964225", "_key" : "10" }
arango> db.users.save({ name: "user 2" });
{ "_id" : "users/15", "_rev" : "1533105095297", "_key" : "15" }
arango> db.users.save({ name: "user 3" });
{ "_id" : "users/20", "_rev" : "1533105226369", "_key" : "20" }
With a special key option:
arangod> db._create("users", { keyOptions: { allowUserKeys: false } });
[ArangoCollection 1533105490832, "users" (type document, status loaded)]
arangod> db._create("users", { keyOptions: { allowUserKeys: false } });
[ArangoCollection 1533105490832, "users" (type document, status loaded)]
arangod> db.users.save({ name: "user 1" });
{ "_id" : "users/1533106867088", "_rev" : "1533106867088", "_key" : "1533106867088" }
arangod> db.users.save({ name: "user 1" });
{ "_id" : "users/1533106867088", "_rev" : "1533106867088", "_key" : "1533106867088" }
arangod> db.users.save({ name: "user 2", _key: "myuser" });
JavaScript exception in file '(arango)' at 1,10: [ArangoError 1222: cannot save document: unexpected document key]
!db.users.save({ name: "user 2", _key: "myuser" });
! ^
stacktrace: Error: cannot save document: unexpected document key
arangod> db.users.save({ name: "user 2", _key: "myuser" });
JavaScript exception in file '(arango)' at 1,10: [ArangoError 1222: cannot save document: unexpected document key]
!db.users.save({ name: "user 2", _key: "myuser" });
! ^
stacktrace: Error: cannot save document: unexpected document key
at (arango):1:10
`db._collections()`
@ -91,10 +91,10 @@ Returns all collections of the given database.
*Examples*
arango> db.examples.load();
arango> var d = db.demo;
arango> db._collections();
[[ArangoCollection 96393, "examples" (status loaded)], [ArangoCollection 1407113, "demo" (status new born)]]
arango> db.examples.load();
arango> var d = db.demo;
arango> db._collections();
[[ArangoCollection 96393, "examples" (status loaded)], [ArangoCollection 1407113, "demo" (status new born)]]
`db.collection-name`
@ -102,8 +102,8 @@ Returns the collection with the given collection-name. If no such collection exi
*Examples*
arango> db.examples;
[ArangoCollection 110371, "examples" (status new born)]
arango> db.examples;
[ArangoCollection 110371, "examples" (status new born)]
`db._drop(collection)`
@ -121,19 +121,19 @@ Drops a collection named collection-name and all its indexes. No error is thrown
Drops a collection:
arango> col = db.examples;
[ArangoCollection 109757, "examples" (status unloaded)]
arango> db._drop(col)
arango> col;
[ArangoCollection 109757, "examples" (status deleted)]
arango> col = db.examples;
[ArangoCollection 109757, "examples" (status unloaded)]
arango> db._drop(col)
arango> col;
[ArangoCollection 109757, "examples" (status deleted)]
Drops a collection identified by name:
arango> col = db.examples;
[ArangoCollection 85198, "examples" (status new born)]
arango> db._drop("examples");
arango> col;
[ArangoCollection 85198, "examples" (status deleted)]
arango> col = db.examples;
[ArangoCollection 85198, "examples" (status new born)]
arango> db._drop("examples");
arango> col;
[ArangoCollection 85198, "examples" (status deleted)]
`db._truncate(collection)`
@ -151,27 +151,27 @@ Truncates a collection named collection-name. No error is thrown if there is no
Truncates a collection:
arango> col = db.examples;
[ArangoCollection 91022, "examples" (status unloaded)]
arango> col.save({ "Hello" : "World" });
{ "_id" : "examples/1532814", "_key" : "1532814", "_rev" : "1532814" }
arango> col.count();
1
arango> db._truncate(col);
arango> col.count();
0
arango> col = db.examples;
[ArangoCollection 91022, "examples" (status unloaded)]
arango> col.save({ "Hello" : "World" });
{ "_id" : "examples/1532814", "_key" : "1532814", "_rev" : "1532814" }
arango> col.count();
1
arango> db._truncate(col);
arango> col.count();
0
Truncates a collection identified by name:
arango> col = db.examples;
[ArangoCollection 91022, "examples" (status unloaded)]
arango> col.save({ "Hello" : "World" });
{ "_id" : "examples/1532814", "_key" : "1532814", "_rev" : "1532814" }
arango> col.count();
1
arango> db._truncate("examples");
arango> col.count();
0
arango> col = db.examples;
[ArangoCollection 91022, "examples" (status unloaded)]
arango> col.save({ "Hello" : "World" });
{ "_id" : "examples/1532814", "_key" : "1532814", "_rev" : "1532814" }
arango> col.count();
1
arango> db._truncate("examples");
arango> col.count();
0
<!--
@anchor HandlingCollectionsRead

View File

@ -13,14 +13,14 @@ Specifies an endpoint for HTTP requests by clients. Endpoints have the following
*Examples*
unix> ./arangod --server.endpoint tcp://127.0.0.1:8529
--server.endpoint ssl://127.0.0.1:8530
--server.keyfile server.pem /tmp/vocbase
2012-07-26T07:07:47Z [8161] INFO using SSL protocol version 'TLSv1'
2012-07-26T07:07:48Z [8161] INFO using endpoint 'ssl://127.0.0.1:8530' for http ssl requests
2012-07-26T07:07:48Z [8161] INFO using endpoint 'tcp://127.0.0.1:8529' for http tcp requests
2012-07-26T07:07:49Z [8161] INFO ArangoDB (version 1.1.alpha) is ready for business
2012-07-26T07:07:49Z [8161] INFO Have Fun!
unix> ./arangod --server.endpoint tcp://127.0.0.1:8529
--server.endpoint ssl://127.0.0.1:8530
--server.keyfile server.pem /tmp/vocbase
2012-07-26T07:07:47Z [8161] INFO using SSL protocol version 'TLSv1'
2012-07-26T07:07:48Z [8161] INFO using endpoint 'ssl://127.0.0.1:8530' for http ssl requests
2012-07-26T07:07:48Z [8161] INFO using endpoint 'tcp://127.0.0.1:8529' for http tcp requests
2012-07-26T07:07:49Z [8161] INFO ArangoDB (version 1.1.alpha) is ready for business
2012-07-26T07:07:49Z [8161] INFO Have Fun!
Note that if you are using SSL-encrypted endpoints, you must also supply the path to a server certificate using the `--server.keyfile` option.
@ -117,36 +117,36 @@ If SSL encryption is used, this option must be used to specify the filename of t
The file specified by filename should have the following structure:
-----BEGIN CERTIFICATE-----
(base64 encoded certificate)
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
(base64 encoded private key)
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
(base64 encoded certificate)
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
(base64 encoded private key)
-----END RSA PRIVATE KEY-----
You may use certificates issued by a Certificate Authority or self-signed certificates. Self-signed certificates can be created by a tool of your choice. When using OpenSSL for creating the self-signed certificate, the following commands should create a valid keyfile:
# create private key in file "server.key"
openssl genrsa -des3 -out server.key 1024
# create certificate signing request (csr) in file "server.csr"
openssl req -new -key server.key -out server.csr
# copy away original private key to "server.key.org"
cp server.key server.key.org
# remove passphrase from the private key
openssl rsa -in server.key.org -out server.key
# sign the csr with the key, creates certificate PEM file "server.crt"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# combine certificate and key into single PEM file "server.pem"
cat server.crt server.key > server.pem
# create private key in file "server.key"
openssl genrsa -des3 -out server.key 1024
# create certificate signing request (csr) in file "server.csr"
openssl req -new -key server.key -out server.csr
# copy away original private key to "server.key.org"
cp server.key server.key.org
# remove passphrase from the private key
openssl rsa -in server.key.org -out server.key
# sign the csr with the key, creates certificate PEM file "server.crt"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# combine certificate and key into single PEM file "server.pem"
cat server.crt server.key > server.pem
For further information please check the manuals of the tools you use to create the certificate.
Note: the `--server.keyfile` option must be set if the server is started with at least one SSL endpoint.
@ -165,10 +165,10 @@ Note: this option is only relevant if at least one SSL endpoint is used.
Use this option to specify the default encryption protocol to be used. The following variants are available:
1: SSLv2
2: SSLv23
3: SSLv3
4: TLSv1
1: SSLv2
2: SSLv23
3: SSLv3
4: TLSv1
The default value is 4 (i.e. TLSv1).
Note: this option is only relevant if at least one SSL endpoint is used.
@ -188,15 +188,15 @@ This option can be used to set various SSL-related options. Individual option va
Which options are available on your platform is determined by the OpenSSL version you use. The list of options available on your platform might be retrieved by the following shell command:
> grep "#define SSL_OP_.*" /usr/include/openssl/ssl.h
#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L
#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L
#define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L
#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L
#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L
#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L
...
> grep "#define SSL_OP_.*" /usr/include/openssl/ssl.h
#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L
#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L
#define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L
#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L
#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L
#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L
...
A description of the options can be found online in the OpenSSL documentation at: http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html
@ -211,14 +211,14 @@ The format of cipher-list is documented in the OpenSSL documentation.
To check which ciphers are available on your platform, you may use the following shell command:
> openssl ciphers -v
ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1
ECDHE-ECDSA-AES256-SHA SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-SHA SSLv3 Kx=DH Au=DSS Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1
...
> openssl ciphers -v
ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1
ECDHE-ECDSA-AES256-SHA SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-SHA SSLv3 Kx=DH Au=DSS Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1
...
The default value for cipher-list is "ALL".
@ -322,7 +322,7 @@ When using the command line version, you can simply supply the database director
*Examples*
> ./arangod --server.endpoint tcp://127.0.0.1:8529 --database.directory /tmp/vocbase
> ./arangod --server.endpoint tcp://127.0.0.1:8529 --database.directory /tmp/vocbase
`--database.maximal-journal-size size`

View File

@ -4,16 +4,16 @@
An agency endpoint the server can connect to. The option can be specified multiple times so the server can use a cluster of agency servers. Endpoints have the following pattern:
tcp://ipv4-address:port - TCP/IP endpoint, using IPv4
tcp://[ipv6-address]:port - TCP/IP endpoint, using IPv6
ssl://ipv4-address:port - TCP/IP endpoint, using IPv4, SSL encryption
ssl://[ipv6-address]:port - TCP/IP endpoint, using IPv6, SSL encryption
tcp://ipv4-address:port - TCP/IP endpoint, using IPv4
tcp://[ipv6-address]:port - TCP/IP endpoint, using IPv6
ssl://ipv4-address:port - TCP/IP endpoint, using IPv4, SSL encryption
ssl://[ipv6-address]:port - TCP/IP endpoint, using IPv6, SSL encryption
At least one endpoint must be specified or ArangoDB will refuse to start. It is recommended to specify at least two endpoints so ArangoDB has an alternative endpoint if one of them becomes unavailable.
`Examples`
--cluster.agency-endpoint tcp://192.168.1.1:4001 --cluster.agency-endpoint tcp://192.168.1.2:4002
--cluster.agency-endpoint tcp://192.168.1.1:4001 --cluster.agency-endpoint tcp://192.168.1.2:4002
`--cluster.agency-prefix prefix`
@ -36,16 +36,16 @@ id must be a string consisting of the letters a-z, A-Z or the digits 0-9 only.
The server's endpoint for cluster-internal communication. If specified, it must have the following pattern:
tcp://ipv4-address:port - TCP/IP endpoint, using IPv4
tcp://[ipv6-address]:port - TCP/IP endpoint, using IPv6
ssl://ipv4-address:port - TCP/IP endpoint, using IPv4, SSL encryption
ssl://[ipv6-address]:port - TCP/IP endpoint, using IPv6, SSL encryption
tcp://ipv4-address:port - TCP/IP endpoint, using IPv4
tcp://[ipv6-address]:port - TCP/IP endpoint, using IPv6
ssl://ipv4-address:port - TCP/IP endpoint, using IPv4, SSL encryption
ssl://[ipv6-address]:port - TCP/IP endpoint, using IPv6, SSL encryption
If no endpoint is specified, the server will look up its internal endpoint address in the agency. If no endpoint can be found in the agency for the server's id, ArangoDB will refuse to start.
*Examples*
--cluster.my-address tcp://192.168.1.1:8530
--cluster.my-address tcp://192.168.1.1:8530
`--cluster.username username`

View File

@ -37,25 +37,25 @@ Only command line options with a value should be set within the configuration fi
Whitespace in the configuration file is ignored. Each option is specified on a separate line in the form
key = value
key = value
Alternatively, a header section can be specified and options pertaining to that section can be specified in a shorter form
[log]
level = trace
[log]
level = trace
rather than specifying
log.level = trace
log.level = trace
Comments can be placed in the configuration file, only if the line begins with one or more hash symbols (#).
There may be occasions where a configuration file exists and the user wishes to override configuration settings stored in a configuration file. Any settings specified on the command line will overwrite the same setting when it appears in a configuration file. If the user wishes to completely ignore configuration files without necessarily deleting the file (or files), then add the command line option
-c none
-c none
or
--configuration none
--configuration none
when starting up the server. Note that, the word none is case-insensitive.
@ -159,7 +159,7 @@ No requests can be made to the server in this mode, and the only way to work wit
@anchor CommandLineConsole
@CMDOPT{\--console}
-->
Runs the server in an exclusive emergency console mode. When
starting the server with this option, the server is started with
an interactive JavaScript emergency console, with all networking

View File

@ -70,18 +70,18 @@ Allows the user to choose the level of information which is logged by the server
Fatal errors generally indicate some inconsistency with the manner in which the server has been coded. Fatal errors may also indicate a problem with the platform on which the server is running. Fatal errors always cause the server to terminate. For example,
2010-09-20T07:32:12Z [4742] FATAL a http server has already been created
2010-09-20T07:32:12Z [4742] FATAL a http server has already been created
* error: Logs errors which the server has encountered.
These errors may not necessarily result in the termination of the server. For example,
2010-09-17T13:10:22Z [13967] ERROR strange log level 'errors', going to 'warning'
2010-09-17T13:10:22Z [13967] ERROR strange log level 'errors', going to 'warning'
* warning: Provides information on errors encountered by the server, which are not necessarily detrimental to it's continued operation.
For example,
2010-09-20T08:15:26Z [5533] WARNING got corrupted HTTP request 'POS?'
2010-09-20T08:15:26Z [5533] WARNING got corrupted HTTP request 'POS?'
Note that, setting the log level to warning will also result in all errors to be logged as well.
@ -89,7 +89,7 @@ Note that, setting the log level to warning will also result in all errors to be
For example,
2010-09-20T07:40:38Z [4998] INFO SimpleVOC ready for business
2010-09-20T07:40:38Z [4998] INFO SimpleVOC ready for business
Note that, setting the log level to info will also result in all errors and warnings to be logged as well.
@ -97,7 +97,7 @@ Note that, setting the log level to info will also result in all errors and warn
Debug log information is generally useful to find out the state of the server in the case of an error. For example,
2010-09-17T13:02:53Z [13783] DEBUG opened port 7000 for any
2010-09-17T13:02:53Z [13783] DEBUG opened port 7000 for any
Note that, setting the log level to debug will also result in all errors, warnings and server status information to be logged as well.
@ -105,7 +105,7 @@ Note that, setting the log level to debug will also result in all errors, warnin
For example,
2010-09-20T08:23:12Z [5687] TRACE trying to open port 8000
2010-09-20T08:23:12Z [5687] TRACE trying to open port 8000
Note that, setting the log level to trace will also result in all errors, warnings, status information, and debug information to be logged as well.
@ -124,11 +124,11 @@ This option is used specify an prefix to logged text.
Whenever log output is generated, the process ID is written as part of the log information. Setting this option appends the thread id of the calling thread to the process id. For example,
2010-09-20T13:04:01Z [19355] INFO ready for business
2010-09-20T13:04:01Z [19355] INFO ready for business
when no thread is logged and
2010-09-20T13:04:17Z [19371-18446744072487317056] ready for business
2010-09-20T13:04:17Z [19371-18446744072487317056] ready for business
when this command line option is set.

View File

@ -16,7 +16,7 @@ the program
in order to check the consistency of the datafiles and journals. This brings up
___ _ __ _ _ ___ ___ ___
___ _ __ _ _ ___ ___ ___
/ \__ _| |_ __ _ / _(_) | ___ / \/ __\ / _ \
/ /\ / _` | __/ _` | |_| | |/ _ \ / /\ /__\// / /_\/
/ /_// (_| | || (_| | _| | | __/ / /_// \/ \/ /_\\

View File

@ -14,8 +14,8 @@ As before. Instead of document a document-handle can be passed as first argument
Returns the document:
arango> db._document("example/3053939");
{ "_id" : "example/3053939", "_key" : "3053939", "_rev" : "3053939", "Hello" : "World" }
arango> db._document("example/3053939");
{ "_id" : "example/3053939", "_key" : "3053939", "_rev" : "3053939", "Hello" : "World" }
`db._exists( document)`
@ -47,16 +47,16 @@ As before. Instead of document a document-handle can be passed as first argument
Create and replace a document:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1717678" }
arango> a2 = db._replace(a1, { a : 2 });
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1783214", "_oldRev" : "1717678" }
arango> a3 = db._replace(a1, { a : 3 });
JavaScript exception in file '(arango)' at 1,9: [ArangoError 1200: conflict: cannot replace document]
!a3 = db._replace(a1, { a : 3 });
! ^
arango> a4 = db.example.replace(a1, { a : 4 }, true);
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1848750", "_oldRev" : "1783214" }
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1717678" }
arango> a2 = db._replace(a1, { a : 2 });
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1783214", "_oldRev" : "1717678" }
arango> a3 = db._replace(a1, { a : 3 });
JavaScript exception in file '(arango)' at 1,9: [ArangoError 1200: conflict: cannot replace document]
!a3 = db._replace(a1, { a : 3 });
! ^
arango> a4 = db.example.replace(a1, { a : 4 }, true);
{ "_id" : "example/1717678", "_key" : "1717678", "_rev" : "1848750", "_oldRev" : "1783214" }
`db._update( document, data, overwrite, keepNull, waitForSync)`
@ -80,16 +80,16 @@ As before. Instead of document a document-handle can be passed as first argument
Create and update a document:
arango> a1 = db.example.save({ a : 1 });
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19660691" }
arango> a2 = db._update(a1, { b : 2 });
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19791763" }
arango> a3 = db._update(a1, { c : 3 });
JavaScript exception in file 'client/client.js' at 2364,13: [ArangoError 1200: precondition failed]
! throw new ArangoError(requestResult);
! ^
arango> a4 = db.example.update(a1, { c : 3 }, true);
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19857299" }
arango> a1 = db.example.save({ a : 1 });
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19660691" }
arango> a2 = db._update(a1, { b : 2 });
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19791763" }
arango> a3 = db._update(a1, { c : 3 });
JavaScript exception in file 'client/client.js' at 2364,13: [ArangoError 1200: precondition failed]
! throw new ArangoError(requestResult);
! ^
arango> a4 = db.example.update(a1, { c : 3 }, true);
{ "error" : false, "_id" : "example/19660691", "_key" : "19660691", "_rev" : "19857299" }
`db._remove( document)`
@ -111,33 +111,33 @@ As before. Instead of document a document-handle can be passed as first argument
Remove a document:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/4214943", "_rev" : "4214943" }
arango> db._remove(a1);
true
arango> db._remove(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1202: document not found: cannot remove document]
!db._remove(a1);
! ^
arango> db._remove(a1, true);
false
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/4214943", "_rev" : "4214943" }
arango> db._remove(a1);
true
arango> db._remove(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1202: document not found: cannot remove document]
!db._remove(a1);
! ^
arango> db._remove(a1, true);
false
Remove a document with a conflict:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/4042634", "_rev" : "4042634" }
arango> a2 = db._replace(a1, { a : 2 });
{ "_id" : "116308/4042634", "_rev" : "4108170", "_oldRev" : 4042634 }
arango> db._delete(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1200: conflict: cannot delete document]
!db._delete(a1);
! ^
arango> db._delete(a1, true);
true
arango> db._document(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1202: document not found: document not found]
!db._document(a1);
! ^
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/4042634", "_rev" : "4042634" }
arango> a2 = db._replace(a1, { a : 2 });
{ "_id" : "116308/4042634", "_rev" : "4108170", "_oldRev" : 4042634 }
arango> db._delete(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1200: conflict: cannot delete document]
!db._delete(a1);
! ^
arango> db._delete(a1, true);
true
arango> db._document(a1);
JavaScript exception in file '(arango)' at 1,4: [ArangoError 1202: document not found: document not found]
!db._document(a1);
! ^
<!--
@anchor HandlingDocumentsDbRead

View File

@ -16,24 +16,24 @@ As before. Instead of document a document-handle can be passed as first argument
Returns the document for a document-handle:
arango> db.example.document("1432124/2873916");
{ "_id" : "1432124/2873916", "_rev" : "2873916", "Hello" : "World" }
arango> db.example.document("1432124/2873916");
{ "_id" : "1432124/2873916", "_rev" : "2873916", "Hello" : "World" }
An error is raised if the document is unknown:
arango> db.example.document("1432124/123456");
JavaScript exception in file '(arango)' at 1,12:
[ArangoError 1202: document not found: document not found]
!db.example.document("1432124/123456");
! ^
arango> db.example.document("1432124/123456");
JavaScript exception in file '(arango)' at 1,12:
[ArangoError 1202: document not found: document not found]
!db.example.document("1432124/123456");
! ^
An error is raised if the handle is invalid:
arango> db.example.document("12345");
JavaScript exception in file '(arango)' at 1,12:
[ArangoError 10: bad parameter: <document-identifier> must be a document identifier]
!db.example.document("12345");
! ^
arango> db.example.document("12345");
JavaScript exception in file '(arango)' at 1,12:
[ArangoError 10: bad parameter: <document-identifier> must be a document identifier]
!db.example.document("12345");
! ^
`collection.exists( document)`
@ -54,8 +54,8 @@ The any method returns a random document from the collection. It returns null if
*Examples*
arangod> db.example.any()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
arangod> db.example.any()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
`collection.save( data)`
@ -69,11 +69,11 @@ Creates a new document in the collection from the given data as above. The optio
*Examples*
arango> db.example.save({ Hello : "World" })
{ "_id" : "example/3175486", "_key" : "3175486", "_rev" : "3175486" }
arango> db.example.save({ Hello : "World" })
{ "_id" : "example/3175486", "_key" : "3175486", "_rev" : "3175486" }
arango> db.example.save({ Hello : "World" }, true)
{ "_id" : "example/3179437", "_key" : "3179437", "_rev" : "3179437" }
arango> db.example.save({ Hello : "World" }, true)
{ "_id" : "example/3179437", "_key" : "3179437", "_rev" : "3179437" }
`collection.replace( document, data)`
@ -99,21 +99,21 @@ As before. Instead of document a document-handle can be passed as first argument
Create and update a document:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "3903044" }
arango> a2 = db.example.replace(a1, { a : 2 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "3968580", "_oldRev" : "3903044" }
arango> a3 = db.example.replace(a1, { a : 3 });
JavaScript exception in file '(arango)' at 1,17: [ArangoError 1200: conflict: cannot replace document]
!a3 = db.example.replace(a1, { a : 3 })
! ^
arango> a4 = db.example.replace(a1, { a : 4 }, true);
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "4034116", "_oldRev" : "3968580" }
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "3903044" }
arango> a2 = db.example.replace(a1, { a : 2 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "3968580", "_oldRev" : "3903044" }
arango> a3 = db.example.replace(a1, { a : 3 });
JavaScript exception in file '(arango)' at 1,17: [ArangoError 1200: conflict: cannot replace document]
!a3 = db.example.replace(a1, { a : 3 })
! ^
arango> a4 = db.example.replace(a1, { a : 4 }, true);
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "4034116", "_oldRev" : "3968580" }
Use a document handle:
arango> a5 = db.example.replace("1432124/3903044", { a : 5 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "4099652", "_oldRev" : "4034116" }
arango> a5 = db.example.replace("1432124/3903044", { a : 5 });
{ "_id" : "example/3903044", "_key" : "3903044", "_rev" : "4099652", "_oldRev" : "4034116" }
`collection.update( document, data, overwrite, keepNull, waitForSync)`
@ -137,60 +137,60 @@ As before. Instead of document a document-handle can be passed as first argument
Create and update a document:
arango> a1 = db.example.save({"a" : 1});
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "18612115" }
arango> a2 = db.example.update(a1, {"b" : 2, "c" : 3});
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "18874259" }
arango> a3 = db.example.update(a1, {"d" : 4});
JavaScript exception in file 'client/client.js' at 1876,7: [ArangoError 1200: precondition failed]
! throw new ArangoError(requestResult);
! ^
arango> a4 = db.example.update(a2, {"e" : 5, "f" : 6 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19267475" }
arango> db.example.document(a4);
{ "a" : 1, "b" : 2, "c" : 3, "e" : 5, "f" : 6, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19267475" }
arango> a5 = db.example.update(a4, {"a" : 1, c : 9, e : 42 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19333011" }
arango> db.example.document(a5);
{ "a" : 1, "b" : 2, "c" : 9, "e" : 42, "f" : 6, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19333011" }
arango> a1 = db.example.save({"a" : 1});
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "18612115" }
arango> a2 = db.example.update(a1, {"b" : 2, "c" : 3});
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "18874259" }
arango> a3 = db.example.update(a1, {"d" : 4});
JavaScript exception in file 'client/client.js' at 1876,7: [ArangoError 1200: precondition failed]
! throw new ArangoError(requestResult);
! ^
arango> a4 = db.example.update(a2, {"e" : 5, "f" : 6 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19267475" }
arango> db.example.document(a4);
{ "a" : 1, "b" : 2, "c" : 3, "e" : 5, "f" : 6, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19267475" }
arango> a5 = db.example.update(a4, {"a" : 1, c : 9, e : 42 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19333011" }
arango> db.example.document(a5);
{ "a" : 1, "b" : 2, "c" : 9, "e" : 42, "f" : 6, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19333011" }
Use a document handle:
arango> a6 = db.example.update("example/18612115", { "x" : 1, "y" : 2 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19595155" }
arango> a6 = db.example.update("example/18612115", { "x" : 1, "y" : 2 });
{ "error" : false, "_id" : "example/18612115", "_key" : "18612115", "_rev" : "19595155" }
Use the keepNull parameter to remove attributes with null values:
arango> db.example.save({"a" : 1});
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "19988371" }
arango> db.example.update("example/19988371", { "b" : null, "c" : null, "d" : 3 });
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20119443" }
arango> db.example.document("example/19988371");
{ "b" : null, "c" : null, "a" : 1, "d" : 3, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20119443" }
arango> db.example.save({"a" : 1});
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "19988371" }
arango> db.example.update("example/19988371", { "b" : null, "c" : null, "d" : 3 });
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20119443" }
arango> db.example.document("example/19988371");
{ "b" : null, "c" : null, "a" : 1, "d" : 3, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20119443" }
arango> db.example.update("example/19988371", { "a" : null }, false, false);
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20250515" }
arango> db.example.document("example/19988371");
{ "b" : null, "c" : null, "d" : 3, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20250515" }
arango> db.example.update("example/19988371", { "b" : null, "c": null, "d" : null }, false, false);
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20381587" }
arango> db.example.document("example/19988371");
{ "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20381587" }
arango> db.example.update("example/19988371", { "a" : null }, false, false);
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20250515" }
arango> db.example.document("example/19988371");
{ "b" : null, "c" : null, "d" : 3, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20250515" }
arango> db.example.update("example/19988371", { "b" : null, "c": null, "d" : null }, false, false);
{ "error" : false, "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20381587" }
arango> db.example.document("example/19988371");
{ "_id" : "example/19988371", "_key" : "19988371", "_rev" : "20381587" }
Patching array values:
arango> db.example.save({"a" : { "one" : 1, "two" : 2, "three" : 3 }, "b" : { }});
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "20774803" }
arango> db.example.update("example/20774803", {"a" : { "four" : 4 }, "b" : { "b1" : 1 }});
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21168019" }
arango> db.example.document("example/20774803");
{ "a" : { "one" : 1, "two" : 2, "three" : 3, "four" : 4 }, "b" : { "b1" : 1 }, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21168019" }
arango> db.example.save({"a" : { "one" : 1, "two" : 2, "three" : 3 }, "b" : { }});
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "20774803" }
arango> db.example.update("example/20774803", {"a" : { "four" : 4 }, "b" : { "b1" : 1 }});
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21168019" }
arango> db.example.document("example/20774803");
{ "a" : { "one" : 1, "two" : 2, "three" : 3, "four" : 4 }, "b" : { "b1" : 1 }, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21168019" }
arango> db.example.update("example/20774803", { "a" : { "one" : null }, "b" : null }, false, false);
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21364627" }
arango> db.example.document("example/20774803");
{ "a" : { "two" : 2, "three" : 3, "four" : 4 }, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21364627" }
arango> db.example.update("example/20774803", { "a" : { "one" : null }, "b" : null }, false, false);
{ "error" : false, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21364627" }
arango> db.example.document("example/20774803");
{ "a" : { "two" : 2, "three" : 3, "four" : 4 }, "_id" : "example/20774803", "_key" : "20774803", "_rev" : "21364627" }
`collection.remove( document)`
@ -212,33 +212,33 @@ As before. Instead of document a document-handle can be passed as first argument
Remove a document:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/3449537", "_rev" : "3449537" }
arango> db.example.document(a1);
{ "_id" : "116308/3449537", "_rev" : "3449537", "a" : 1 }
arango> db.example.remove(a1);
true
arango> db.example.document(a1);
JavaScript exception in file '(arango)' at 1,12: [ArangoError 1202: document not found: document not found]
!db.example.document(a1);
! ^
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/3449537", "_rev" : "3449537" }
arango> db.example.document(a1);
{ "_id" : "116308/3449537", "_rev" : "3449537", "a" : 1 }
arango> db.example.remove(a1);
true
arango> db.example.document(a1);
JavaScript exception in file '(arango)' at 1,12: [ArangoError 1202: document not found: document not found]
!db.example.document(a1);
! ^
Remove a document with a conflict:
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/3857139", "_rev" : "3857139" }
arango> a2 = db.example.replace(a1, { a : 2 });
{ "_id" : "116308/3857139", "_rev" : "3922675", "_oldRev" : 3857139 }
arango> db.example.remove(a1);
JavaScript exception in file '(arango)' at 1,18: [ArangoError 1200: conflict: cannot remove document]
!db.example.remove(a1);
! ^
arango> db.example.remove(a1, true);
true
arango> db.example.document(a1);
JavaScript exception in file '(arango)' at 1,12: [ArangoError 1202: document not found: document not found]
!db.example.document(a1);
! ^
arango> a1 = db.example.save({ a : 1 });
{ "_id" : "116308/3857139", "_rev" : "3857139" }
arango> a2 = db.example.replace(a1, { a : 2 });
{ "_id" : "116308/3857139", "_rev" : "3922675", "_oldRev" : 3857139 }
arango> db.example.remove(a1);
JavaScript exception in file '(arango)' at 1,18: [ArangoError 1200: conflict: cannot remove document]
!db.example.remove(a1);
! ^
arango> db.example.remove(a1, true);
true
arango> db.example.document(a1);
JavaScript exception in file '(arango)' at 1,12: [ArangoError 1202: document not found: document not found]
!db.example.document(a1);
! ^
`collection.removeByExample( example)`
@ -254,7 +254,7 @@ The optional limit parameter can be used to restrict the number of removals to t
*Examples*
arangod> db.content.removeByExample({ "domain": "de.celler" })
arangod> db.content.removeByExample({ "domain": "de.celler" })
`collection.replaceByExample( example, newValue)`
@ -270,7 +270,7 @@ The optional limit parameter can be used to restrict the number of replacements
*Examples*
arangod> db.content.replaceByExample({ "domain": "de.celler" }, { "foo": "someValue }, false, 5)
arangod> db.content.replaceByExample({ "domain": "de.celler" }, { "foo": "someValue }, false, 5)
`collection.updateByExample( example, newValue)`
@ -288,7 +288,7 @@ The optional limit parameter can be used to restrict the number of updates to th
*Examples*
arangod> db.content.updateByExample({ "domain": "de.celler" }, { "foo": "someValue, "domain": null }, false)
arangod> db.content.updateByExample({ "domain": "de.celler" }, { "foo": "someValue, "domain": null }, false)
`collection.first( count)`
@ -300,10 +300,10 @@ When called without an argument, the result is the first document from the colle
*Examples*
arangod> db.example.first(1)
[ { "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" } ]
arangod> db.example.first()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
arangod> db.example.first(1)
[ { "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" } ]
arangod> db.example.first()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
`collection.last( count)`
@ -315,10 +315,10 @@ When called without an argument, the result is the last document from the collec
*Examples*
arangod> db.example.last(1)
[ { "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" } ]
arangod> db.example.last()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
arangod> db.example.last(1)
[ { "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" } ]
arangod> db.example.last()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }

View File

@ -10,29 +10,29 @@ and may contain lists. Each document is uniquely identified by its document hand
For example:
{
"firstName" : "Hugo",
"lastName" : "Schlonz",
"address" : {
"city" : "Hier",
"street" : "Strasse 1"
},
"hobbies" : [
"swimming",
"biking",
"programming"
],
"_id" : "demo/schlonz",
"_rev" : "13728680",
"_key" : "schlonz"
}
{
"firstName" : "Hugo",
"lastName" : "Schlonz",
"address" : {
"city" : "Hier",
"street" : "Strasse 1"
},
"hobbies" : [
"swimming",
"biking",
"programming"
],
"_id" : "demo/schlonz",
"_rev" : "13728680",
"_key" : "schlonz"
}
<!--
@EXAMPLE_ARANGOSH_OUTPUT{HandlingDocumentsExample1}
db.demo.document("demo/schlonz")
@END_EXAMPLE_ARANGOSH_OUTPUT
-->
All documents contain special attributes: the document handle in `_id`, the
document's unique key in `_key` and and the ETag aka document revision in
`_rev`. The value of the `_key` attribute can be specified by the user when

View File

@ -25,14 +25,14 @@ The optional waitForSync parameter can be used to force synchronisation of the d
*Examples*
arango> v1 = db.vertex.save({ name : "vertex 1" });
{ "_id" : "vertex/1528086", "_key" : "1528086", "_rev" : "1528086" }
arango> v2 = db.vertex.save({ name : "vertex 2" });
{ "_id" : "vertex/1593622", "_key" : "1593622", "_rev" : "1593622" }
arango> e1 = db.relation.save(v1, v2, { label : "knows" });
{ "_id" : "relation/3100950", "_key" : "3100950", "_rev" : "3100950" }
arango> db._document(e1);
{ "_id" : "relation/3100950", "_key" : "3100950", "_rev" : "3100950", "_from" : "vertex/1528086", "_to" : "vertex/1593622", "label" : "knows" }
arango> v1 = db.vertex.save({ name : "vertex 1" });
{ "_id" : "vertex/1528086", "_key" : "1528086", "_rev" : "1528086" }
arango> v2 = db.vertex.save({ name : "vertex 2" });
{ "_id" : "vertex/1593622", "_key" : "1593622", "_rev" : "1593622" }
arango> e1 = db.relation.save(v1, v2, { label : "knows" });
{ "_id" : "relation/3100950", "_key" : "3100950", "_rev" : "3100950" }
arango> db._document(e1);
{ "_id" : "relation/3100950", "_key" : "3100950", "_rev" : "3100950", "_from" : "vertex/1528086", "_to" : "vertex/1593622", "label" : "knows" }
`edge-collection.edges( vertex)`
@ -43,18 +43,18 @@ The edges operator finds all edges starting from (outbound) or ending in (inboun
The edges operator finds all edges starting from (outbound) or ending in (inbound) a document from vertices, which must a list of documents or document handles.
*Examples*
arango> db.relation.edges("vertex/1593622");
[
{
"_id" : "relation/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
arango> db.relation.edges("vertex/1593622");
[
{
"_id" : "relation/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
`edge-collection.inEdges( vertex)`
@ -66,19 +66,19 @@ The edges operator finds all edges ending in (inbound) a document from vertices,
*Examples*
arango> db.relation.inEdges("vertex/1528086");
[ ]
arango> db.relation.inEdges("vertex/1593622");
[
{
"_id" : "inEdges/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
arango> db.relation.inEdges("vertex/1528086");
[ ]
arango> db.relation.inEdges("vertex/1593622");
[
{
"_id" : "inEdges/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
`edge-collection.outEdges( vertex)`
@ -90,20 +90,20 @@ The edges operator finds all edges starting from (outbound) a document from vert
*Examples*
arango> db.relation.outEdges("vertex/1528086");
[
{
"_id" : "relation/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
arango> db.relation.outEdges("vertex/1593622");
[ ]
arango> db.relation.outEdges("vertex/1528086");
[
{
"_id" : "relation/3100950",
"_key" : "3100950",
"_rev" : "3100950",
"_from" : "vertex/1528086",
"_to" : "vertex/1593622",
"label" : "knows"
}
]
arango> db.relation.outEdges("vertex/1593622");
[ ]
<!--
@anchor HandlingEdgesCreate

View File

@ -7,15 +7,15 @@ The following command starts a emergency console.
*Note:* Never start the emergency console for a database which also has a
server attached to it. In general the ArangoDB shell is what you want.
> ./arangod --console --log error /tmp/vocbase
ArangoDB shell [V8 version 3.9.4, DB version 1.x.y]
arango> 1 + 2;
3
arango> db.geo.count();
703
> ./arangod --console --log error /tmp/vocbase
ArangoDB shell [V8 version 3.9.4, DB version 1.x.y]
arango> 1 + 2;
3
arango> db.geo.count();
703
<!--@EXAMPLE{start-emergency-console,emergency console} -->
The emergency console disables the HTTP interface of the server and

View File

@ -92,15 +92,15 @@ If a TCP/IP endpoint is specified without a port number, then the default port (
!SUBSUBSECTION Examples
unix> ./arangod --server.endpoint tcp://127.0.0.1:8529
--server.endpoint ssl://127.0.0.1:8530
--server.keyfile server.pem /tmp/vocbase
2012-07-26T07:07:47Z [8161] INFO using SSL protocol version 'TLSv1'
2012-07-26T07:07:48Z [8161] INFO using endpoint 'ssl://127.0.0.1:8530' for http ssl requests
2012-07-26T07:07:48Z [8161] INFO using endpoint 'tcp://127.0.0.1:8529' for http tcp requests
2012-07-26T07:07:49Z [8161] INFO ArangoDB (version 1.1.alpha) is ready for business
2012-07-26T07:07:49Z [8161] INFO Have Fun!
Note that if you are using SSL-encrypted endpoints, you must also supply the path to a server certificate using the --server.keyfile option.
unix> ./arangod --server.endpoint tcp://127.0.0.1:8529
--server.endpoint ssl://127.0.0.1:8530
--server.keyfile server.pem /tmp/vocbase
2012-07-26T07:07:47Z [8161] INFO using SSL protocol version 'TLSv1'
2012-07-26T07:07:48Z [8161] INFO using endpoint 'ssl://127.0.0.1:8530' for http ssl requests
2012-07-26T07:07:48Z [8161] INFO using endpoint 'tcp://127.0.0.1:8529' for http tcp requests
2012-07-26T07:07:49Z [8161] INFO ArangoDB (version 1.1.alpha) is ready for business
2012-07-26T07:07:49Z [8161] INFO Have Fun!
Note that if you are using SSL-encrypted endpoints, you must also supply the path to a server certificate using the --server.keyfile option.
Endpoints can also be changed at runtime. Please refer to HTTP Interface for Endpoints for more details.

View File

@ -28,12 +28,12 @@ embedded version in the browser. Using the command-line tool has the
advantage that you can use autocompletion.
unix> arangosh --server.password ""
_
_
__ _ _ __ __ _ _ __ __ _ ___ ___| |__
/ _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
\__,_|_| \__,_|_| |_|\__, |\___/|___/_| |_|
|___/
|___/
Welcome to arangosh 1.x.y. Copyright (c) 2012 triAGENS GmbH.
Using Google V8 3.9.4 JavaScript engine.
@ -189,24 +189,24 @@ Now extract all elements:
arangosh> db.example.all().toArray()
[
{
_id : "example/6308263",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
_rev : "1993214",
age : 31,
name : "Jane Smith"
},
{
_id : "example/6242727",
_id : "example/6242727",
_key : "1774564",
_rev : "1774564",
age : 29,
name : "John Doe"
_rev : "1774564",
age : 29,
name : "John Doe"
},
{
_id : "example/5980583",
_id : "example/5980583",
_key : "1512420",
_rev : "1512420",
Hello : "World"
_rev : "1512420",
Hello : "World"
}
]
@ -217,18 +217,18 @@ The last document was a mistake so let's delete it:
arangosh> db.example.all().toArray()
[
{
_id : "example/6308263",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
_rev : "1993214",
age : 31,
name : "Jane Smith"
},
{
_id : "example/6242727",
_id : "example/6242727",
_key : "1774564",
_rev : "1774564",
age : 29,
name : "John Doe"
_rev : "1774564",
age : 29,
name : "John Doe"
}
]
@ -239,11 +239,11 @@ matching a given example.
arangosh> db.example.byExample({ name: "Jane Smith" }).toArray()
[
{
_id : "example/6308263",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
_rev : "1993214",
age : 31,
name : "Jane Smith"
}
]
@ -255,11 +255,11 @@ query language.
arangosh> db._query('FOR user IN example FILTER user.name == "Jane Smith" RETURN user').toArray()
[
{
_id : "example/6308263",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
_rev : "1993214",
age : 31,
name : "Jane Smith"
}
]
@ -268,11 +268,11 @@ Search for all persons over 30:
arangosh> db._query('FOR user IN example FILTER user.age > 30 RETURN user').toArray()
[
{
_id : "example/6308263",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
_rev : "1993214",
age : 31,
name : "Jane Smith"
}
]

View File

@ -8,15 +8,15 @@ This creates a new Controller. The first argument is the controller context avai
*Examples*
app = new Controller(applicationContext, {
urlPrefix: "/meadow"
});
app = new Controller(applicationContext, {
urlPrefix: "/meadow"
});
<!--
@copydetails JSF_foxx_controller_initializer
-->
!SUBSECTION HTTP Methods
!SUBSUBSECTION Get
@ -29,9 +29,9 @@ When defining a route you can also define a so called 'parameterized' path like
*Examples*
app.get('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
app.get('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
!SUBSUBSECTION Head
@ -47,9 +47,9 @@ This handles requests from the HTTP verb post. See above for the arguments you c
*Examples*
app.post('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
app.post('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
!SUBSUBSECTION Put
@ -59,9 +59,9 @@ This handles requests from the HTTP verb put. See above for the arguments you ca
*Examples*
app.put('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
app.put('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
!SUBSUBSECTION Patch
@ -71,9 +71,9 @@ This handles requests from the HTTP verb patch. See above for the arguments you
*Examples*
app.patch('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
app.patch('/goose/barn', function (req, res) {
// Take this request and deal with it!
});
!SUBSUBSECTION Delete
@ -119,14 +119,14 @@ If you now want to document your route, you can use JSDoc style comments (a
multiline comment block with the first line starting with `/**` instead
of `/*`) above your routes to do that:
/** Get all foxxes
*
* If you want to get all foxxes, please use this
* method to do that.
*/
app.get("/foxxes", function () {
// ...
});
/** Get all foxxes
*
* If you want to get all foxxes, please use this
* method to do that.
*/
app.get("/foxxes", function () {
// ...
});
<!--
@verbinclude foxx-doc-comment
@ -149,16 +149,16 @@ You can also provide a description of this parameter.
*Examples*
app.get("/foxx/:id", function {
// Do something
}).pathParam("id", {
description: "Id of the Foxx",
type: "int"
});
app.get("/foxx/:id", function {
// Do something
}).pathParam("id", {
description: "Id of the Foxx",
type: "int"
});
!SUBSUBSECTION Query Param
FoxxController::queryParam(id, options)
FoxxController::queryParam(id, options)
Describe a query parameter:
@ -170,14 +170,14 @@ You can also provide a description of this parameter, if it is required and if y
*Examples*
app.get("/foxx", function {
// Do something
}).queryParam("id", {
description: "Id of the Foxx",
type: "int",
required: true,
allowMultiple: false
});
app.get("/foxx", function {
// Do something
}).queryParam("id", {
description: "Id of the Foxx",
type: "int",
required: true,
allowMultiple: false
});
!SUBSUBSECTION Body Param
@ -197,23 +197,23 @@ It also adds documentation for this error response to the generated documentatio
*Examples*
/* define our own error type, FoxxyError */
var FoxxyError = function (message) {
this.message = "the following FoxxyError occurred: ' + message;
};
FoxxyError.prototype = new Error();
app.get("/foxx", function {
/* throws a FoxxyError */
throw new FoxxyError();
}).errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!");
app.get("/foxx", function {
throw new FoxxyError("oops!");
}).errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!", function (e) {
return {
code: 123,
desc: e.message
};
});
/* define our own error type, FoxxyError */
var FoxxyError = function (message) {
this.message = "the following FoxxyError occurred: ' + message;
};
FoxxyError.prototype = new Error();
app.get("/foxx", function {
/* throws a FoxxyError */
throw new FoxxyError();
}).errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!");
app.get("/foxx", function {
throw new FoxxyError("oops!");
}).errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!", function (e) {
return {
code: 123,
desc: e.message
};
});
!SUBSUBSECTION onlyIf
@ -223,9 +223,9 @@ Provide it with a function that throws an exception if the normal processing sho
*Examples*
app.get("/foxx", function {
// Do something
}).onlyIf(aFunction).errorResponse(ErrorClass, 303, "This went completely wrong. Sorry!");
app.get("/foxx", function {
// Do something
}).onlyIf(aFunction).errorResponse(ErrorClass, 303, "This went completely wrong. Sorry!");
!SUBSUBSECTION onlyIfAuthenticated
@ -235,9 +235,9 @@ Please activate authentification for this app if you want to use this function.
*Examples*
app.get("/foxx", function {
// Do something
}).onlyIfAuthenticated(401, "You need to be authenticated");
app.get("/foxx", function {
// Do something
}).onlyIfAuthenticated(401, "You need to be authenticated");
<!--
@ -280,11 +280,11 @@ Defines an errorResponse for all routes of this controller. For details on error
*Examples*
app.allroutes.errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!");
app.get("/foxx", function {
// Do something
});
onlyIf
app.allroutes.errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!");
app.get("/foxx", function {
// Do something
});
onlyIf
`RequestContextBuffer::onlyIf(code, reason)`
@ -292,21 +292,21 @@ Defines an onlyIf for all routes of this controller. For details on onlyIf see t
*Examples*
app.allroutes.onlyIf(myPersonalCheck);
app.get("/foxx", function {
// Do something
});
onlyIfAuthenticated
app.allroutes.onlyIf(myPersonalCheck);
app.get("/foxx", function {
// Do something
});
onlyIfAuthenticated
RequestContextBuffer::errorResponse(errorClass, code, description)
Defines an onlyIfAuthenticated for all routes of this controller. For details on onlyIfAuthenticated see the according method on routes.
*Examples*
app.allroutes.onlyIfAuthenticated(401, "You need to be authenticated");
app.get("/foxx", function {
// Do something
});
app.allroutes.onlyIfAuthenticated(401, "You need to be authenticated");
app.get("/foxx", function {
// Do something
});
<!--
@ -337,9 +337,9 @@ The before function takes a path on which it should watch and a function that it
*Examples*
app.before('/high/way', function(req, res) {
//Do some crazy request logging
});
app.before('/high/way', function(req, res) {
//Do some crazy request logging
});
!SUBSUBSECTION After
@ -349,9 +349,9 @@ This works pretty similar to the before function. But it acts after the executio
*Examples*
app.after('/high/way', function(req, res) {
//Do some crazy response logging
});
app.after('/high/way', function(req, res) {
//Do some crazy response logging
});
<!--
### Before
@ -467,7 +467,7 @@ Set the status code of your response.
*Examples*
response.status(404);
response.status(404);
!SUBSUBSECTION Set
@ -477,13 +477,13 @@ Set a header attribute.
*Examples*
response.set("Content-Length", 123);
response.set("Content-Type", "text/plain");
// or alternatively:
response.set({
"Content-Length": "123",
"Content-Type": "text/plain"
});
response.set("Content-Length", 123);
response.set("Content-Type", "text/plain");
// or alternatively:
response.set({
"Content-Length": "123",
"Content-Type": "text/plain"
});
!SUBSUBSECTION JSON
@ -493,7 +493,7 @@ Set the content type to JSON and the body to the JSON encoded object you provide
*Examples*
response.json({'born': 'December 12, 1915'});
response.json({'born': 'December 12, 1915'});
<!--
### Status

View File

@ -61,9 +61,9 @@ If you initialize a model, you can give it initial data as an object.
*Examples*
instance = new Model({
a: 1
});
instance = new Model({
a: 1
});
!SUBSUBSECTION Get
@ -73,10 +73,10 @@ Get the value of an attribute
*Examples*
instance = new Model({
a: 1
});
instance.get("a");
instance = new Model({
a: 1
});
instance.get("a");
!SUBSUBSECTION Set
@ -86,13 +86,13 @@ Set the value of an attribute or multiple attributes at once
*Examples*
instance = new Model({
a: 1
});
instance.set("a", 2);
instance.set({
b: 2
});
instance = new Model({
a: 1
});
instance.set("a", 2);
instance.set({
b: 2
});
!SUBSUBSECTION Has
@ -102,11 +102,11 @@ Returns true if the attribute is set to a non-null or non-undefined value.
*Examples*
instance = new Model({
a: 1
});
instance.has("a"); //=> true
instance.has("b"); //=> false
instance = new Model({
a: 1
});
instance.has("a"); //=> true
instance.has("b"); //=> false
!SUBSUBSECTION Attributes

View File

@ -352,12 +352,12 @@ sessionLifetime: An integer. Lifetime of sessions in seconds.
*Examples*
app.activateAuthentication({
type: "cookie",
cookieLifetime: 360000,
cookieName: "my_cookie",
sessionLifetime: 400,
});
app.activateAuthentication({
type: "cookie",
cookieLifetime: 360000,
cookieName: "my_cookie",
sessionLifetime: 400,
});
!SUBSUBSECTION Adding a login route
@ -369,11 +369,11 @@ usernameField and passwordField can be used to adjust the expected attributes in
*Examples*
app.login('/login', {
onSuccess: function (req, res) {
res.json({"success": true});
}
});
app.login('/login', {
onSuccess: function (req, res) {
res.json({"success": true});
}
});
!SUBSUBSECTION Adding a logout route
@ -383,11 +383,11 @@ This works pretty similar to the logout function and adds a path to your app for
*Examples*
app.logout('/logout', {
onSuccess: function (req, res) {
res.json({"message": "Bye, Bye"});
}
});
app.logout('/logout', {
onSuccess: function (req, res) {
res.json({"message": "Bye, Bye"});
}
});
!SUBSUBSECTION Adding a register route
@ -397,12 +397,12 @@ This works pretty similar to the logout function and adds a path to your app for
`Examples`
app.register('/logout', {
acceptedAttributes: ['name'],
defaultAttributes: {
admin: false
}
});
app.register('/logout', {
acceptedAttributes: ['name'],
defaultAttributes: {
admin: false
}
});
!SUBSUBSECTION Adding a change password route
@ -414,11 +414,11 @@ passwordField can be used to adjust the expected attribute in the post request.
*Examples*
app.changePassword('/changePassword', {
onSuccess: function (req, res) {
res.json({"success": true});
}
});
app.changePassword('/changePassword', {
onSuccess: function (req, res) {
res.json({"success": true});
}
});
<!--
@ -502,12 +502,12 @@ Initialize with the name of a collection or a collection and optionally a set of
*Examples*
templateMiddleware = new TemplateMiddleware("templates", {
uppercase: function (x) { return x.toUpperCase(); }
});
// or without helpers:
//templateMiddleware = new TemplateMiddleware("templates");
app.before(templateMiddleware);
templateMiddleware = new TemplateMiddleware("templates", {
uppercase: function (x) { return x.toUpperCase(); }
});
// or without helpers:
//templateMiddleware = new TemplateMiddleware("templates");
app.before(templateMiddleware);
!SUBSUBSECTION Render
@ -517,7 +517,7 @@ When the TemplateMiddleware is included, you will have access to the render func
*Examples*
response.render("high/way", {username: 'Application'})
response.render("high/way", {username: 'Application'})
<!--
### Initialize

View File

@ -17,51 +17,51 @@ In case that the index was successfully created, the index identifier is returne
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
}
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
}
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
}
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
}
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

View File

@ -43,13 +43,13 @@ Note that this does not imply any restriction of the number of revisions of docu
Restrict the number of document to at most 10 documents:
arango> db.examples.ensureCapConstraint(10);
{ "id" : "examples/934311", "type" : "cap", "size" : 10, "byteSize" : 0, "isNewlyCreated" : true }
arango> for (var i = 0; i < 20; ++i) { var d = db.examples.save( { n : i } ); }
arango> db.examples.count();
10
arango> db.examples.ensureCapConstraint(10);
{ "id" : "examples/934311", "type" : "cap", "size" : 10, "byteSize" : 0, "isNewlyCreated" : true }
arango> for (var i = 0; i < 20; ++i) { var d = db.examples.save( { n : i } ); }
arango> db.examples.count();
10
<!--

View File

@ -18,8 +18,8 @@ The minimum length of words that are indexed can be specified with the minWordLe
In case that the index was successfully created, the index identifier is returned.
arangod> db.emails.ensureFulltextIndex("body");
{ "id" : "emails/42725508", "unique" : false, "type" : "fulltext", "fields" : ["body"], "isNewlyCreated" : true }
arangod> db.emails.ensureFulltextIndex("body");
{ "id" : "emails/42725508", "unique" : false, "type" : "fulltext", "fields" : ["body"], "isNewlyCreated" : true }
<!--
@anchor IndexFulltextShellEnsureFulltextIndex

View File

@ -38,64 +38,64 @@ In case that the index was successfully created, the index identifier is returne
Create an geo index for a list attribute:
arango> db.geo.ensureGeoIndex("loc");
{ "id" : "geo/47772301", "type" : "geo1", "geoJson" : false, "fields" : ["loc"], "isNewlyCreated" : true }
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo.save({ name : "Name/" + i + "/" + j,
.......> loc: [ i, j ] });
.......> }
.......> }
arango> db.geo.count();
703
arango> db.geo.near(0,0).limit(3).toArray();
[ { "_id" : "geo/24861164", "_key" : "24861164", "_rev" : "24861164", "name" : "Name/0/0", "loc" : [ 0, 0 ]},
{ "_id" : "geo/24926700", "_key" : "24926700", "_rev" : "24926700", "name" : "Name/0/10", "loc" : [ 0, 10 ]},
{ "_id" : "geo/22436332", "_key" : "22436332", "_rev" : "22436332", "name" : "Name/-10/0", "loc" : [ -10, 0 ]}]
arango> db.geo.near(0,0).count();
100
arango> db.geo.ensureGeoIndex("loc");
{ "id" : "geo/47772301", "type" : "geo1", "geoJson" : false, "fields" : ["loc"], "isNewlyCreated" : true }
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo.save({ name : "Name/" + i + "/" + j,
.......> loc: [ i, j ] });
.......> }
.......> }
arango> db.geo.count();
703
arango> db.geo.near(0,0).limit(3).toArray();
[ { "_id" : "geo/24861164", "_key" : "24861164", "_rev" : "24861164", "name" : "Name/0/0", "loc" : [ 0, 0 ]},
{ "_id" : "geo/24926700", "_key" : "24926700", "_rev" : "24926700", "name" : "Name/0/10", "loc" : [ 0, 10 ]},
{ "_id" : "geo/22436332", "_key" : "22436332", "_rev" : "22436332", "name" : "Name/-10/0", "loc" : [ -10, 0 ]}]
arango> db.geo.near(0,0).count();
100
Create an geo index for a hash array attribute:
arango> db.geo2.ensureGeoIndex("location.latitude", "location.longitude");
{ "id" : "geo2/1070652", "type" : "geo2", "fields" : ["location.latitude", "location.longitude"], "isNewlyCreated" : true }
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo2.save({ name : "Name/" + i + "/" + j,
.......> location: { latitude : i,
.......> longitude : j } });
.......> }
.......> }
arango> db.geo2.near(0,0).limit(3).toArray();
[
{
"_id" : "geo2/72964588",
"_key" : "72964588",
"_rev" : "72964588",
"location" : { "latitude" : 0, "longitude" : 0 },
"name" : "Name/0/0"
},
{
"_id" : "geo2/73030124",
"_key" : "73030124",
"_rev" : "73030124",
"location" : { "latitude" : 0, "longitude" : 10 },
"name" : "Name/0/10"
},
{
"_id" : "geo2/70539756",
"_key" : "70539756",
"_rev" : "70539756",
"location" : { "latitude" : -10, "longitude" : 0 },
"name" : "Name/-10/0"
}
]
arango> db.geo2.ensureGeoIndex("location.latitude", "location.longitude");
{ "id" : "geo2/1070652", "type" : "geo2", "fields" : ["location.latitude", "location.longitude"], "isNewlyCreated" : true }
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.geo2.save({ name : "Name/" + i + "/" + j,
.......> location: { latitude : i,
.......> longitude : j } });
.......> }
.......> }
arango> db.geo2.near(0,0).limit(3).toArray();
[
{
"_id" : "geo2/72964588",
"_key" : "72964588",
"_rev" : "72964588",
"location" : { "latitude" : 0, "longitude" : 0 },
"name" : "Name/0/0"
},
{
"_id" : "geo2/73030124",
"_key" : "73030124",
"_rev" : "73030124",
"location" : { "latitude" : 0, "longitude" : 10 },
"name" : "Name/0/10"
},
{
"_id" : "geo2/70539756",
"_key" : "70539756",
"_rev" : "70539756",
"location" : { "latitude" : -10, "longitude" : 0 },
"name" : "Name/-10/0"
}
]
`collection.ensureGeoConstraint( location, ignore-null)`
@ -129,35 +129,35 @@ Returns a geo index object if an index was found. The near or within operators c
Assume you have a location stored as list in the attribute home and a destination stored in the attribute work. Then you can use the geo operator to select which geo-spatial attributes (and thus which index) to use in a near query.
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.complex.save({ name : "Name/" + i + "/" + j,
.......> home : [ i, j ],
.......> work : [ -i, -j ] });
.......> }
.......> }
arango> db.complex.near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex(""home"");
arango> db.complex.near(0, 170).limit(5).toArray();
[ { "_id" : "complex/74655276", "_key" : "74655276", "_rev" : "74655276", "name" : "Name/0/170", "home" : [ 0, 170 ], "work" : [ 0, -170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] },
{ "_id" : "complex/77080108", "_key" : "77080108", "_rev" : "77080108", "name" : "Name/10/170", "home" : [ 10, 170 ], "work" : [ -10, -170 ] },
{ "_id" : "complex/72230444", "_key" : "72230444", "_rev" : "72230444", "name" : "Name/-10/170", "home" : [ -10, 170 ], "work" : [ 10, -170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] } ]
arango> db.complex.geo("work").near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex("work");
arango> db.complex.geo("work").near(0, 170).limit(5).toArray();
[ { "_id" : "complex/72427052", "_key" : "72427052", "_rev" : "72427052", "name" : "Name/0/-170", "home" : [ 0, -170 ], "work" : [ 0, 170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] },
{ "_id" : "complex/70002220", "_key" : "70002220", "_rev" : "70002220", "name" : "Name/-10/-170", "home" : [ -10, -170 ], "work" : [ 10, 170 ] },
{ "_id" : "complex/74851884", "_key" : "74851884", "_rev" : "74851884", "name" : "Name/10/-170", "home" : [ 10, -170 ], "work" : [ -10, 170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] } ]
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.complex.save({ name : "Name/" + i + "/" + j,
.......> home : [ i, j ],
.......> work : [ -i, -j ] });
.......> }
.......> }
arango> db.complex.near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex(""home"");
arango> db.complex.near(0, 170).limit(5).toArray();
[ { "_id" : "complex/74655276", "_key" : "74655276", "_rev" : "74655276", "name" : "Name/0/170", "home" : [ 0, 170 ], "work" : [ 0, -170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] },
{ "_id" : "complex/77080108", "_key" : "77080108", "_rev" : "77080108", "name" : "Name/10/170", "home" : [ 10, 170 ], "work" : [ -10, -170 ] },
{ "_id" : "complex/72230444", "_key" : "72230444", "_rev" : "72230444", "name" : "Name/-10/170", "home" : [ -10, 170 ], "work" : [ 10, -170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] } ]
arango> db.complex.geo("work").near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex("work");
arango> db.complex.geo("work").near(0, 170).limit(5).toArray();
[ { "_id" : "complex/72427052", "_key" : "72427052", "_rev" : "72427052", "name" : "Name/0/-170", "home" : [ 0, -170 ], "work" : [ 0, 170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] },
{ "_id" : "complex/70002220", "_key" : "70002220", "_rev" : "70002220", "name" : "Name/-10/-170", "home" : [ -10, -170 ], "work" : [ 10, 170 ] },
{ "_id" : "complex/74851884", "_key" : "74851884", "_rev" : "74851884", "name" : "Name/10/-170", "home" : [ 10, -170 ], "work" : [ -10, 170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] } ]
`collection.near( latitude, longitude)`
@ -186,17 +186,17 @@ This will add an attribute name to all documents returned, which contains the di
To get the nearst two locations:
arango> db.geo.near(0,0).limit(2).toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "name" : "Name/-10/0", "loc" : [ -10, 0 ] } ]
arango> db.geo.near(0,0).limit(2).toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "name" : "Name/-10/0", "loc" : [ -10, 0 ] } ]
If you need the distance as well, then you can use the distance operator:
arango> db.geo.near(0,0).distance().limit(2).toArray();
[
{ "_id" : geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] }
]
arango> db.geo.near(0,0).distance().limit(2).toArray();
[
{ "_id" : geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] }
]
`collection.within( latitude, longitude, radius)`
@ -216,16 +216,16 @@ This will add an attribute name to all documents returned, which contains the di
To find all documents within a radius of 2000 km use:
arango> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/24707840", "_key" : "24707840", "_rev" : "24707840", "distance" : 1111949.3, "name" : "Name/0/-10", "loc" : [ 0, -10 ] },
{ "_id" : "geo/24838912", "_key" : "24838912", "_rev" : "24838912", "distance" : 1111949.3, "name" : "Name/0/10", "loc" : [ 0, 10 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] },
{ "_id" : "geo/27198208", "_key" : "27198208", "_rev" : "27198208", "distance" : 1111949.3, "name" : "Name/10/0", "loc" : [ 10, 0 ] },
{ "_id" : "geo/22414080", "_key" : "22414080", "_rev" : "22414080", "distance" : 1568520.6, "name" : "Name/-10/10", "loc" : [ -10, 10 ] },
{ "_id" : "geo/27263744", "_key" : "27263744", "_rev" : "27263744", "distance" : 1568520.6, "name" : "Name/10/10", "loc" : [ 10, 10 ] },
{ "_id" : "geo/22283008", "_key" : "22283008", "_rev" : "22283008", "distance" : 1568520.6, "name" : "Name/-10/-10", "loc" : [ -10, -10 ] },
{ "_id" : "geo/27132672", "_key" : "27132672", "_rev" : "27132672", "distance" : 1568520.6, "name" : "Name/10/-10", "loc" : [ 10, -10 ] } ]
arango> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/24707840", "_key" : "24707840", "_rev" : "24707840", "distance" : 1111949.3, "name" : "Name/0/-10", "loc" : [ 0, -10 ] },
{ "_id" : "geo/24838912", "_key" : "24838912", "_rev" : "24838912", "distance" : 1111949.3, "name" : "Name/0/10", "loc" : [ 0, 10 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] },
{ "_id" : "geo/27198208", "_key" : "27198208", "_rev" : "27198208", "distance" : 1111949.3, "name" : "Name/10/0", "loc" : [ 10, 0 ] },
{ "_id" : "geo/22414080", "_key" : "22414080", "_rev" : "22414080", "distance" : 1568520.6, "name" : "Name/-10/10", "loc" : [ -10, 10 ] },
{ "_id" : "geo/27263744", "_key" : "27263744", "_rev" : "27263744", "distance" : 1568520.6, "name" : "Name/10/10", "loc" : [ 10, 10 ] },
{ "_id" : "geo/22283008", "_key" : "22283008", "_rev" : "22283008", "distance" : 1568520.6, "name" : "Name/-10/-10", "loc" : [ -10, -10 ] },
{ "_id" : "geo/27132672", "_key" : "27132672", "_rev" : "27132672", "distance" : 1568520.6, "name" : "Name/10/-10", "loc" : [ 10, -10 ] } ]
<!--

View File

@ -137,10 +137,10 @@ Returns the index with index-handle or null if no such index exists.
*Examples*
arango> db.example.getIndexes().map(function(x) { return x.id; });
["example/0"]
arango> db.example.index("93013/0");
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }
arango> db.example.getIndexes().map(function(x) { return x.id; });
["example/0"]
arango> db.example.index("93013/0");
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }
returns information about the indexes
@ -150,32 +150,32 @@ Returns a list of all indexes defined for the collection.
*Examples*
arango> db.demo.getIndexes()
[
{
"id" : "demo/0",
"type" : "primary",
"fields" : [ "_id" ]
},
{
"id" : "demo/2290971",
"unique" : true,
"type" : "hash",
"fields" : [ "a" ]
},
{
"id" : "demo/2946331",
"unique" : false,
"type" : "hash",
"fields" : [ "b" ]
},
{
"id" : "demo/3077403",
"unique" : false,
"type" : "skiplist",
"fields" : [ "c" ]
}
]
arango> db.demo.getIndexes()
[
{
"id" : "demo/0",
"type" : "primary",
"fields" : [ "_id" ]
},
{
"id" : "demo/2290971",
"unique" : true,
"type" : "hash",
"fields" : [ "a" ]
},
{
"id" : "demo/2946331",
"unique" : false,
"type" : "hash",
"fields" : [ "b" ]
},
{
"id" : "demo/3077403",
"unique" : false,
"type" : "skiplist",
"fields" : [ "c" ]
}
]
drops an index
@ -189,23 +189,23 @@ Same as above. Instead of an index an index handle can be given.
*Examples*
arango> db.example.ensureSkiplist("a", "b");
{ "id" : "example/991154", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"], "isNewlyCreated" : true }
arango> i = db.example.getIndexes();
[
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] },
{ "id" : "example/991154", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"] }
]
arango> db.example.dropIndex(i[0])
false
arango> db.example.dropIndex(i[1].id)
true
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }]
arango> db.example.ensureSkiplist("a", "b");
{ "id" : "example/991154", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"], "isNewlyCreated" : true }
arango> i = db.example.getIndexes();
[
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] },
{ "id" : "example/991154", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"] }
]
arango> db.example.dropIndex(i[0])
false
arango> db.example.dropIndex(i[1].id)
true
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }]
`collection.ensureIndex( index-description)`
@ -227,16 +227,16 @@ Calling this method returns an index object. Whether or not the index object exi
*Examples*
arango> db.example.ensureIndex({ type: "hash", fields: [ "name" ], unique: true });
{
"id" : "example/30242599562",
"type" : "hash",
"unique" : true,
"fields" : [
"name"
],
"isNewlyCreated" : true
}
arango> db.example.ensureIndex({ type: "hash", fields: [ "name" ], unique: true });
{
"id" : "example/30242599562",
"type" : "hash",
"unique" : true,
"fields" : [
"name"
],
"isNewlyCreated" : true
}
<!--
@ -264,10 +264,10 @@ Returns the index with index-handle or null if no such index exists.
*Examples*
arango> db.example.getIndexes().map(function(x) { return x.id; });
["example/0"]
arango> db._index("example/0");
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }
arango> db.example.getIndexes().map(function(x) { return x.id; });
["example/0"]
arango> db._index("example/0");
{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }
`db._dropIndex(index)`
@ -279,21 +279,21 @@ Drops the index with index-handle.
*Examples*
arango> db.example.ensureSkiplist("a", "b");
{ "id" : "example/1577138", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"], "isNewlyCreated" : true }
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] },
{ "id" : "example/1577138", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"] }]
arango> db._dropIndex(i[0]);
false
arango> db._dropIndex(i[1].id);
true
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }]
arango> db.example.ensureSkiplist("a", "b");
{ "id" : "example/1577138", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"], "isNewlyCreated" : true }
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] },
{ "id" : "example/1577138", "unique" : false, "type" : "skiplist", "fields" : ["a", "b"] }]
arango> db._dropIndex(i[0]);
false
arango> db._dropIndex(i[1].id);
true
arango> i = db.example.getIndexes();
[{ "id" : "example/0", "type" : "primary", "fields" : ["_id"] }]
<!--
@anchor HandlingIndexesDbRead

View File

@ -23,24 +23,24 @@ In case that the index was successfully created, the index identifier is returne
*Examples*
arango> db.four.ensureUniqueConstraint("a", "b.c");
{ "id" : "four/1147445", "unique" : true, "type" : "hash", "fields" : ["a", "b.c"], "isNewlyCreated" : true }
arango> db.four.save({ a : 1, b : { c : 1 } });
{ "_id" : "four/1868341", "_key" : "1868341", "_rev" : "1868341" }
arango> db.four.save({ a : 1, b : { c : 1 } });
JavaScript exception in file '(arango)' at 1,9: [ArangoError 1210: cannot save document]
!db.four.save({ a : 1, b : { c : 1 } });
! ^
stacktrace: [ArangoError 1210: cannot save document]
arango> db.four.ensureUniqueConstraint("a", "b.c");
{ "id" : "four/1147445", "unique" : true, "type" : "hash", "fields" : ["a", "b.c"], "isNewlyCreated" : true }
arango> db.four.save({ a : 1, b : { c : 1 } });
{ "_id" : "four/1868341", "_key" : "1868341", "_rev" : "1868341" }
arango> db.four.save({ a : 1, b : { c : 1 } });
JavaScript exception in file '(arango)' at 1,9: [ArangoError 1210: cannot save document]
!db.four.save({ a : 1, b : { c : 1 } });
! ^
stacktrace: [ArangoError 1210: cannot save document]
at (arango):1:9
arango> db.four.save({ a : 1, b : { c : null } });
{ "_id" : "four/2196021", "_key" : "2196021", "_rev" : "2196021" }
arango> db.four.save({ a : 1 });
{ "_id" : "four/2196023", "_key" : "2196023", "_rev" : "2196023" }
arango> db.four.save({ a : 1, b : { c : null } });
{ "_id" : "four/2196021", "_key" : "2196021", "_rev" : "2196021" }
arango> db.four.save({ a : 1 });
{ "_id" : "four/2196023", "_key" : "2196023", "_rev" : "2196023" }
`ensureHashIndex(field1, field2, ..., fieldn)`
@ -52,17 +52,17 @@ In case that the index was successfully created, the index identifier is returne
*Examples*
arango> db.test.ensureHashIndex("a");
{ "id" : "test/5922391", "unique" : false, "type" : "hash", "fields" : ["a"], "isNewlyCreated" : true }
arango> db.test.save({ a : 1 });
{ "_id" : "test/6381143", "_key" : "6381143", "_rev" : "6381143" }
arango> db.test.save({ a : 1 });
{ "_id" : "test/6446679", "_key" : "6446679", "_rev" : "6446679" }
arango> db.test.save({ a : null });
{ "_id" : "test/6708823", "_key" : "6708823", "_rev" : "6708823" }
arango> db.test.ensureHashIndex("a");
{ "id" : "test/5922391", "unique" : false, "type" : "hash", "fields" : ["a"], "isNewlyCreated" : true }
arango> db.test.save({ a : 1 });
{ "_id" : "test/6381143", "_key" : "6381143", "_rev" : "6381143" }
arango> db.test.save({ a : 1 });
{ "_id" : "test/6446679", "_key" : "6446679", "_rev" : "6446679" }
arango> db.test.save({ a : null });
{ "_id" : "test/6708823", "_key" : "6708823", "_rev" : "6708823" }
<!--
@anchor IndexHashShellEnsureUniqueConstraint

View File

@ -18,39 +18,39 @@ Creates a skiplist index on all documents using attributes as paths to the field
In case that the index was successfully created, the index identifier is returned.
arangod> db.ids.ensureUniqueSkiplist("myId");
{ "id" : "ids/42612360", "unique" : true, "type" : "skiplist", "fields" : ["myId"], "isNewlyCreated" : true }
arangod> db.ids.save({ "myId": 123 });
{ "_id" : "ids/42743432", "_key" : "42743432", "_rev" : "42743432" }
arangod> db.ids.save({ "myId": 456 });
{ "_id" : "ids/42808968", "_key" : "42808968", "_rev" : "42808968" }
arangod> db.ids.save({ "myId": 789 });
{ "_id" : "ids/42874504", "_key" : "42874504", "_rev" : "42874504" }
arangod> db.ids.save({ "myId": 123 });
JavaScript exception in file '(arango)' at 1,8: [ArangoError 1210: cannot save document: unique constraint violated]
!db.ids.save({ "myId": 123 });
! ^
stacktrace: [ArangoError 1210: cannot save document: unique constraint violated]
arangod> db.ids.ensureUniqueSkiplist("myId");
{ "id" : "ids/42612360", "unique" : true, "type" : "skiplist", "fields" : ["myId"], "isNewlyCreated" : true }
arangod> db.ids.save({ "myId": 123 });
{ "_id" : "ids/42743432", "_key" : "42743432", "_rev" : "42743432" }
arangod> db.ids.save({ "myId": 456 });
{ "_id" : "ids/42808968", "_key" : "42808968", "_rev" : "42808968" }
arangod> db.ids.save({ "myId": 789 });
{ "_id" : "ids/42874504", "_key" : "42874504", "_rev" : "42874504" }
arangod> db.ids.save({ "myId": 123 });
JavaScript exception in file '(arango)' at 1,8: [ArangoError 1210: cannot save document: unique constraint violated]
!db.ids.save({ "myId": 123 });
! ^
stacktrace: [ArangoError 1210: cannot save document: unique constraint violated]
at (arango):1:8
arangod> db.ids.ensureUniqueSkiplist("name.first", "name.last");
{ "id" : "ids/43362549", "unique" : true, "type" : "skiplist", "fields" : ["name.first", "name.last"], "isNewlyCreated" : true }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{ "_id" : "ids/43755765", "_rev" : "43755765", "_key" : "43755765" }
arangod> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{ "_id" : "ids/43821301", "_rev" : "43821301", "_key" : "43821301" }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{ "_id" : "ids/43886837", "_rev" : "43886837", "_key" : "43886837" }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
JavaScript exception in file '(arango)' at 1,8: [ArangoError 1210: cannot save document: unique constraint violated]
!db.ids.save({"name" : {"first" : "hans", "last": "hansen" }});
! ^
stacktrace: [ArangoError 1210: cannot save document: unique constraint violated]
arangod> db.ids.ensureUniqueSkiplist("name.first", "name.last");
{ "id" : "ids/43362549", "unique" : true, "type" : "skiplist", "fields" : ["name.first", "name.last"], "isNewlyCreated" : true }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{ "_id" : "ids/43755765", "_rev" : "43755765", "_key" : "43755765" }
arangod> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{ "_id" : "ids/43821301", "_rev" : "43821301", "_key" : "43821301" }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{ "_id" : "ids/43886837", "_rev" : "43886837", "_key" : "43886837" }
arangod> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
JavaScript exception in file '(arango)' at 1,8: [ArangoError 1210: cannot save document: unique constraint violated]
!db.ids.save({"name" : {"first" : "hans", "last": "hansen" }});
! ^
stacktrace: [ArangoError 1210: cannot save document: unique constraint violated]
at (arango):1:8
`ensureSkiplist(field1, field2, ..., fieldn)`
@ -59,19 +59,19 @@ Creates a multi skiplist index on all documents using attributes as paths to the
In case that the index was successfully created, the index identifier is returned.
arangod> db.names.ensureSkiplist("first");
{ "id" : "names/42725508", "unique" : false, "type" : "skiplist", "fields" : ["first"], "isNewlyCreated" : true }
arangod> db.names.save({ "first" : "Tim" });
{ "_id" : "names/42856580", "_key" : "42856580", "_rev" : "42856580" }
arangod> db.names.save({ "first" : "Tom" });
{ "_id" : "names/42922116", "_key" : "42922116", "_rev" : "42922116" }
arangod> db.names.save({ "first" : "John" });
{ "_id" : "names/42987652", "_key" : "42987652", "_rev" : "42987652" }
arangod> db.names.save({ "first" : "Tim" });
{ "_id" : "names/43053188", "_key" : "43053188", "_rev" : "43053188" }
arangod> db.names.save({ "first" : "Tom" });
{ "_id" : "names/43118724", "_key" : "43118724", "_rev" : "43118724" }
arangod> db.names.ensureSkiplist("first");
{ "id" : "names/42725508", "unique" : false, "type" : "skiplist", "fields" : ["first"], "isNewlyCreated" : true }
arangod> db.names.save({ "first" : "Tim" });
{ "_id" : "names/42856580", "_key" : "42856580", "_rev" : "42856580" }
arangod> db.names.save({ "first" : "Tom" });
{ "_id" : "names/42922116", "_key" : "42922116", "_rev" : "42922116" }
arangod> db.names.save({ "first" : "John" });
{ "_id" : "names/42987652", "_key" : "42987652", "_rev" : "42987652" }
arangod> db.names.save({ "first" : "Tim" });
{ "_id" : "names/43053188", "_key" : "43053188", "_rev" : "43053188" }
arangod> db.names.save({ "first" : "Tom" });
{ "_id" : "names/43118724", "_key" : "43118724", "_rev" : "43118724" }
<!--

View File

@ -6,14 +6,14 @@ Returns the identifier of the edge.
*Examples*
arango> v = g.addVertex("v");
Vertex("v")
arango> e = g.addEdge(v, v, 1, "self");
Edge(1)
arango> e.getId();
1
arango> v = g.addVertex("v");
Vertex("v")
arango> e = g.addEdge(v, v, 1, "self");
Edge(1)
arango> e.getId();
1
`edge.getInVertex()`
@ -21,14 +21,14 @@ Returns the vertex at the head of the edge.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getInVertex();
Vertex(1)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getInVertex();
Vertex(1)
`edge.getLabel()`
@ -36,14 +36,14 @@ Returns the label of the edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.getLabel();
knows
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.getLabel();
knows
`edge.getOutVertex()`
@ -51,14 +51,14 @@ Returns the vertex at the tail of the edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getOutVertex();
Vertex(1)
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self");
Edge(2)
arango> e.getOutVertex();
Vertex(1)
`edge.getPeerVertex( vertex)`
@ -66,14 +66,14 @@ Returns the peer vertex of the edge and the vertex.
*Examples*
arango> v1 = g.addVertex("1");
Vertex("1")
arango> v2 = g.addVertex("2");
Vertex("2")
arango> e = g.addEdge(v1, v2, "1->2", "knows");
Edge("1->2")
arango> e.getPeerVertex(v1);
Vertex(2)
arango> v1 = g.addVertex("1");
Vertex("1")
arango> v2 = g.addVertex("2");
Vertex("2")
arango> e = g.addEdge(v1, v2, "1->2", "knows");
Edge("1->2")
arango> e.getPeerVertex(v1);
Vertex(2)
`edge.getProperty( name)`
@ -81,14 +81,14 @@ Returns the property name an edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { "weight" : 10 });
Edge(2)
arango> e = g.addEdge(v, v, 2, "self", { "weight" : 10 });
Edge(2)
arango> e.getProperty("weight");
10
arango> e.getProperty("weight");
10
`edge.getPropertyKeys()`
@ -96,20 +96,20 @@ Returns all propety names an edge.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropertyKeys()
[ "weight" ]
arango> e.setProperty("name", "Hugo");
Hugo
arango> e.getPropertyKeys()
[ "weight", "name" ]
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropertyKeys()
[ "weight" ]
arango> e.setProperty("name", "Hugo");
Hugo
arango> e.getPropertyKeys()
[ "weight", "name" ]
`edge.properties()`
@ -117,14 +117,14 @@ Returns all properties and their values of an edge
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.properties();
{ "weight" : 10 }
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "knows");
Edge(2)
arango> e.properties();
{ "weight" : 10 }
`edge.setProperty( name, value)`
@ -132,20 +132,20 @@ Changes or sets the property name an edges to value.
*Examples*
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropert("weight")
10
arango> e.setProperty("weight", 20);
20
arango> e.getPropert("weight")
20
arango> v = g.addVertex(1);
Vertex(1)
arango> e = g.addEdge(v, v, 2, "self", { weight: 10 })
Edge(2)
arango> e.getPropert("weight")
10
arango> e.setProperty("weight", 20);
20
arango> e.getPropert("weight")
20
<!--

View File

@ -3,10 +3,10 @@
The graph module provides basic functions dealing with graph structures. The
examples assume
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g = new Graph("graph", "vertices", "edges");
Graph("graph")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g = new Graph("graph", "vertices", "edges");
Graph("graph")
`Graph(name, vertices, edges)`
@ -18,13 +18,13 @@ Returns a known graph.
*Examples*
arango> var Graph = require("org/arangodb/graph").Graph;
arango> new Graph("graph", db.vertices, db.edges);
Graph("graph")
arango> new Graph("graph", "vertices", "edges");
Graph("graph")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> new Graph("graph", db.vertices, db.edges);
Graph("graph")
arango> new Graph("graph", "vertices", "edges");
Graph("graph")
`graph.addEdge( out, in, id)`
@ -44,16 +44,16 @@ Creates a new edge and returns the edge object. The edge has the label label and
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> e = g.addEdge(v1, v2, 4, "1->2", { name : "Emil");
Edge(4)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> e = g.addEdge(v1, v2, 4, "1->2", { name : "Emil");
Edge(4)
`graph.addVertex( id)`
@ -67,15 +67,15 @@ Creates a new vertex and returns the vertex object. The vertex contains the prop
Without any properties:
arango> v = g.addVertex("hugo");
Vertex("hugo")
With given properties:
arango> v = g.addVertex("Emil", { age : 123 });
Vertex("Emil")
arango> v.getProperty("age");
123
arango> v = g.addVertex("hugo");
Vertex("hugo")
With given properties:
arango> v = g.addVertex("Emil", { age : 123 });
Vertex("Emil")
arango> v.getProperty("age");
123
`graph.getEdges()`
@ -83,25 +83,25 @@ Returns an iterator for all edges of the graph. The iterator supports the method
*Examples*
arango> f = g.getEdges();
[edge iterator]
arango> f.hasNext();
true
arango> e = f.next();
Edge("4636053")
graph.getVertex( id)
Returns the vertex identified by id or null.
arango> f = g.getEdges();
[edge iterator]
arango> f.hasNext();
true
arango> e = f.next();
Edge("4636053")
graph.getVertex( id)
Returns the vertex identified by id or null.
*Examples*
arango> g.addVertex(1);
Vertex(1)
arango> g.getVertex(1)
Vertex(1)
arango> g.addVertex(1);
Vertex(1)
arango> g.getVertex(1)
Vertex(1)
`graph.getVertices()`
@ -109,14 +109,14 @@ Returns an iterator for all vertices of the graph. The iterator supports the met
*Examples*
arango> f = g.getVertices();
[vertex iterator]
arango> f.hasNext();
true
arango> v = f.next();
Vertex(18364)
arango> f = g.getVertices();
[vertex iterator]
arango> f.hasNext();
true
arango> v = f.next();
Vertex(18364)
`graph.removeVertex( vertex, waitForSync)`
@ -124,19 +124,19 @@ Deletes the vertex and all its edges.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeVertex(v1);
arango> v2.edges();
[ ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeVertex(v1);
arango> v2.edges();
[ ]
`graph.removeEdge( vertex, waitForSync)`
@ -144,19 +144,19 @@ Deletes the edge. Note that the in and out vertices are left untouched.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeEdge(e);
arango> v2.edges();
[ ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> e = g.addEdge(v1, v2, 3);
Edge(3)
arango> g.removeEdge(e);
arango> v2.edges();
[ ]
`graph.drop( waitForSync)`

View File

@ -8,20 +8,20 @@ forming the edges. Together both collections form a graph. Assume that the
vertex collection is called `vertices` and the edges collection `edges`, then
you can build a graph using the *Graph* constructor.
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g1 = new Graph("graph", "vertices", "edges");
Graph("vertices", "edges")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g1 = new Graph("graph", "vertices", "edges");
Graph("vertices", "edges")
<!--@verbinclude graph25-->
It is possible to use different edges with the same vertices. For instance, to
build a new graph with a different edge collection use
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g2 = new Graph("graph", "vertices", "alternativeEdges");
Graph("vertices", "alternativeEdges")
arango> var Graph = require("org/arangodb/graph").Graph;
arango> g2 = new Graph("graph", "vertices", "alternativeEdges");
Graph("vertices", "alternativeEdges")
<!--@verbinclude graph26 -->

View File

@ -14,22 +14,22 @@ Creates a new edge from peer to vertex with given label and properties defined i
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addInEdge(v2, "2 -> 1");
Edge("2 -> 1")
arango> v1.getInEdges();
[ Edge("2 -> 1") ]
arango> v1.addInEdge(v2, "D", "knows", { data : 1 });
Edge("D")
arango> v1.getInEdges();
[ Edge("K"), Edge("2 -> 1"), Edges("D") ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addInEdge(v2, "2 -> 1");
Edge("2 -> 1")
arango> v1.getInEdges();
[ Edge("2 -> 1") ]
arango> v1.addInEdge(v2, "D", "knows", { data : 1 });
Edge("D")
arango> v1.getInEdges();
[ Edge("K"), Edge("2 -> 1"), Edges("D") ]
`vertex.addOutEdge( peer)`
@ -45,21 +45,21 @@ Creates a new edge from vertex to peer with given label and properties defined i
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addOutEdge(v2, "1->2");
Edge("1->2")
arango> v1.getOutEdges();
[ Edge(1->2") ]
arango> v1.addOutEdge(v2, 3, "knows");
Edge(3)
arango> v1.addOutEdge(v2, 4, "knows", { data : 1 });
Edge(4)
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex(2);
Vertex(2)
arango> v1.addOutEdge(v2, "1->2");
Edge("1->2")
arango> v1.getOutEdges();
[ Edge(1->2") ]
arango> v1.addOutEdge(v2, 3, "knows");
Edge(3)
arango> v1.addOutEdge(v2, 4, "knows", { data : 1 });
Edge(4)
`vertex.edges()`
@ -67,20 +67,20 @@ Returns a list of in- or outbound edges of the vertex.
*Examples*
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex();
Vertex(2)
arango> e = g.addEdge(v1, v2, "1->2");
Edge("1->2")
arango> v1.edges();
[ Edge("1->2") ]
arango> v2.edges();
[ Edge("1->2") ]
arango> v1 = g.addVertex(1);
Vertex(1)
arango> v2 = g.addVertex();
Vertex(2)
arango> e = g.addEdge(v1, v2, "1->2");
Edge("1->2")
arango> v1.edges();
[ Edge("1->2") ]
arango> v2.edges();
[ Edge("1->2") ]
`vertex.getId()`
@ -88,11 +88,11 @@ Returns the identifier of the vertex. If the vertex was deleted, then undefined
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getId();
"1"
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getId();
"1"
`vertex.getInEdges( label, ...)`
@ -100,29 +100,29 @@ Returns a list of inbound edges of the vertex with given label(s).
*Examples*
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v2.getInEdges();
[ Edge(3), Edge(4) ]
arango> v2.getInEdges("knows");
[ Edge(3) ]
arango> v2.getInEdges("hates");
[ Edge(4) ]
arango> v2.getInEdges("knows", "hates");
[ Edge(3), Edge(4) ]
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v2.getInEdges();
[ Edge(3), Edge(4) ]
arango> v2.getInEdges("knows");
[ Edge(3) ]
arango> v2.getInEdges("hates");
[ Edge(4) ]
arango> v2.getInEdges("knows", "hates");
[ Edge(3), Edge(4) ]
`vertex.getOutEdges( label, ...)`
@ -130,29 +130,29 @@ Returns a list of outbound edges of the vertex with given label(s).
*Examples*
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v1.getOutEdges();
[ Edge(3), Edge(4) ]
arango> v1.getOutEdges("knows");
[ Edge(3) ]
arango> v1.getOutEdges("hates");
[ Edge(4) ]
arango> v1.getOutEdges("knows", "hates");
[ Edge(3), Edge(4) ]
arango> v1 = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v2 = g.addVertex(2, { name : "Emil" });
Vertex(2)
arango> e1 = g.addEdge(v1, v2, 3, "knows");
Edge(3)
arango> e2 = g.addEdge(v1, v2, 4, "hates");
Edge(4)
arango> v1.getOutEdges();
[ Edge(3), Edge(4) ]
arango> v1.getOutEdges("knows");
[ Edge(3) ]
arango> v1.getOutEdges("hates");
[ Edge(4) ]
arango> v1.getOutEdges("knows", "hates");
[ Edge(3), Edge(4) ]
`vertex.getEdges( label, ...)`
@ -164,11 +164,11 @@ Returns the property name a vertex.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
Hugo
arango> v.getProperty("name");
Hugo
`vertex.getPropertyKeys()`
@ -176,28 +176,28 @@ Returns all propety names a vertex.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getPropertyKeys();
[ "name" ]
arango> v.setProperty("email", "hugo@hugo.de");
"hugo@hugo.de"
arango> v.getPropertyKeys();
[ "name", "email" ]
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getPropertyKeys();
[ "name" ]
arango> v.setProperty("email", "hugo@hugo.de");
"hugo@hugo.de"
arango> v.getPropertyKeys();
[ "name", "email" ]
`vertex.properties()`
Returns all properties and their values of a vertex
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.properties();
{ name : "Hugo" }
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.properties();
{ name : "Hugo" }
`vertex.setProperty( name, value)`
@ -205,17 +205,17 @@ Changes or sets the property name a vertex to value.
*Examples*
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
"Hugo"
arango> v.setProperty("name", "Emil");
"Emil"
arango> v.getProperty("name");
"Emil"
arango> v = g.addVertex(1, { name : "Hugo" });
Vertex(1)
arango> v.getProperty("name");
"Hugo"
arango> v.setProperty("name", "Emil");
"Emil"
arango> v.getProperty("name");
"Emil"
`vertex.commonNeighborsWith( target_vertex, options)`

View File

@ -25,14 +25,14 @@ Here are the details of the functionality:
This constructor builds a cluster planner object. The one and only argument is an object that can have the properties described below. The planner can plan clusters on a single machine (basically for testing purposes) and on multiple machines. The resulting "cluster plans" can be used by the kickstarter (see JSF_Cluster_Kickstarter_Constructor) to start up the processes comprising the cluster, including the agency. To this end, there has to be one dispatcher on every machine participating in the cluster. A dispatcher is a simple instance of ArangoDB, compiled with the cluster extensions, but not running in cluster mode. This is why the configuration option dispatchers below is of central importance.
* dispatchers: an object with a property for each dispatcher, the property name is the ID of the dispatcher and the value should be an object with at least the property endpoint containing the endpoint of the corresponding dispatcher. Further optional properties are:
* avoidPorts which is an object in which all port numbers that should not be used are bound to true, default is empty, that is, all ports can be used
* arangodExtraArgs, which is a list of additional command line arguments that will be given to DBservers and coordinators started by this dispatcher, the default is an empty list. These arguments will be appended to those produced automatically, such that one can overwrite things with this.
* allowCoordinators, which is a boolean value indicating whether or not coordinators should be started on this dispatcher, the default is true
* allowDBservers, which is a boolean value indicating whether or not DBservers should be started on this dispatcher, the default is true
* allowAgents, which is a boolean value indicating whether or not agents should be started on this dispatcher, the default is true
* username, which is a string that contains the user name for authentication with this dispatcher
* passwd, which is a string that contains the password for authentication with this dispatcher, if not both username and passwd are set, then no authentication is used between dispatchers. Note that this will not work if the dispatchers are configured with authentication.
* If .dispatchers is empty (no property), then an entry for the local arangod itself is automatically added. Note that if the only configured dispatcher has endpoint tcp://localhost:, all processes are started in a special "local" mode and are configured to bind their endpoints only to the localhost device. In all other cases both agents and arangod instances bind their endpoints to all available network devices.
* avoidPorts which is an object in which all port numbers that should not be used are bound to true, default is empty, that is, all ports can be used
* arangodExtraArgs, which is a list of additional command line arguments that will be given to DBservers and coordinators started by this dispatcher, the default is an empty list. These arguments will be appended to those produced automatically, such that one can overwrite things with this.
* allowCoordinators, which is a boolean value indicating whether or not coordinators should be started on this dispatcher, the default is true
* allowDBservers, which is a boolean value indicating whether or not DBservers should be started on this dispatcher, the default is true
* allowAgents, which is a boolean value indicating whether or not agents should be started on this dispatcher, the default is true
* username, which is a string that contains the user name for authentication with this dispatcher
* passwd, which is a string that contains the password for authentication with this dispatcher, if not both username and passwd are set, then no authentication is used between dispatchers. Note that this will not work if the dispatchers are configured with authentication.
* If .dispatchers is empty (no property), then an entry for the local arangod itself is automatically added. Note that if the only configured dispatcher has endpoint tcp://localhost:, all processes are started in a special "local" mode and are configured to bind their endpoints only to the localhost device. In all other cases both agents and arangod instances bind their endpoints to all available network devices.
* numberOfAgents: the number of agents in the agency, usually there is no reason to deviate from the default of 3. The planner distributes them amongst the dispatchers, if possible.
* agencyPrefix: a string that is used as prefix for all keys of configuration data stored in the agency.
* numberOfDBservers: the number of DBservers in the cluster. The planner distributes them evenly amongst the dispatchers.
@ -53,29 +53,29 @@ This constructor builds a cluster planner object. The one and only argument is a
All these values have default values. Here is the current set of default values:
{
"agencyPrefix" : "arango",
"numberOfAgents" : 1,
"numberOfDBservers" : 2,
"startSecondaries" : false,
"numberOfCoordinators" : 1,
"DBserverIDs" : ["Pavel", "Perry", "Pancho", "Paul", "Pierre",
"Pit", "Pia", "Pablo" ],
"coordinatorIDs" : ["Claus", "Chantalle", "Claire", "Claudia",
"Claas", "Clemens", "Chris" ],
"dataPath" : "", // means configured in dispatcher
"logPath" : "", // means configured in dispatcher
"arangodPath" : "", // means configured as dispatcher
"agentPath" : "", // means configured in dispatcher
"agentExtPorts" : [4001],
"agentIntPorts" : [7001],
"DBserverPorts" : [8629],
"coordinatorPorts" : [8530],
"dispatchers" : {"me": {"endpoint": "tcp://localhost:"}},
// this means only we as a local instance
"useSSLonDBservers" : false,
"useSSLonCoordinators" : false
};
{
"agencyPrefix" : "arango",
"numberOfAgents" : 1,
"numberOfDBservers" : 2,
"startSecondaries" : false,
"numberOfCoordinators" : 1,
"DBserverIDs" : ["Pavel", "Perry", "Pancho", "Paul", "Pierre",
"Pit", "Pia", "Pablo" ],
"coordinatorIDs" : ["Claus", "Chantalle", "Claire", "Claudia",
"Claas", "Clemens", "Chris" ],
"dataPath" : "", // means configured in dispatcher
"logPath" : "", // means configured in dispatcher
"arangodPath" : "", // means configured as dispatcher
"agentPath" : "", // means configured in dispatcher
"agentExtPorts" : [4001],
"agentIntPorts" : [7001],
"DBserverPorts" : [8629],
"coordinatorPorts" : [8530],
"dispatchers" : {"me": {"endpoint": "tcp://localhost:"}},
// this means only we as a local instance
"useSSLonDBservers" : false,
"useSSLonCoordinators" : false
};
`Planner.getPlan()`

View File

@ -9,8 +9,8 @@ restrictions:
`_key` attribute from a document)
- It must consist of the letters a-z (lower or upper case), the digits 0-9,
the underscore (_), dash (-), or colon (:) characters only
- Any other characters, especially multi-byte sequences, whitespace or
punctuation characters cannot be used inside key values
- Any other characters, especially multi-byte sequences, whitespace or
punctuation characters cannot be used inside key values
- The key must be unique within the collection it is used
Keys are case-sensitive, i.e. `myKey` and `MyKEY` are considered to be

View File

@ -7,144 +7,144 @@
* [Compiling](Installing/Compiling.md)
<!-- 2 -->
* [First Steps](FirstSteps/README.md)
* [Getting Familiar](FirstSteps/GettingFamiliar.md)
* [Collections and Documents](FirstSteps/CollectionsAndDocuments.md)
* [The ArangoDB Server](FirstSteps/Arangod.md)
* [ArangoDB Shell](FirstSteps/Arangosh.md)
* [Getting Familiar](FirstSteps/GettingFamiliar.md)
* [Collections and Documents](FirstSteps/CollectionsAndDocuments.md)
* [The ArangoDB Server](FirstSteps/Arangod.md)
* [ArangoDB Shell](FirstSteps/Arangosh.md)
<!-- 3 -->
* [The ArangoDB Shell](Arangosh/README.md)
* [Shell Output](Arangosh/Output.md)
* [Shell Configuration](Arangosh/Configuration.md)
* [Shell Output](Arangosh/Output.md)
* [Shell Configuration](Arangosh/Configuration.md)
<!-- 4 -->
* [ArangoDB Web Interface](WebInterface/README.md)
* [Some Features](WebInterface/Features.md)
* [Some Features](WebInterface/Features.md)
<!-- 5 -->
* [Handling Databases](Databases/README.md)
* [Working with Databases](Databases/WorkingWith.md)
* [Notes about Databases](Databases/Notes.md)
* [Working with Databases](Databases/WorkingWith.md)
* [Notes about Databases](Databases/Notes.md)
<!-- 6 -->
* [Handling Collections](Collections/README.md)
* [Address of a Collection](Collections/CollectionAddress.md)
* [Collection Methods](Collections/CollectionMethods.md)
* [Database Methods](Collections/DatabaseMethods.md)
* [Address of a Collection](Collections/CollectionAddress.md)
* [Collection Methods](Collections/CollectionMethods.md)
* [Database Methods](Collections/DatabaseMethods.md)
<!-- 7 -->
* [Handling Documents](Documents/README.md)
* [Address and ETag](Documents/DocumentAddress.md)
* [Collection Methods](Documents/DocumentMethods.md)
* [Database Methods](Documents/DatabaseMethods.md)
* [Address and ETag](Documents/DocumentAddress.md)
* [Collection Methods](Documents/DocumentMethods.md)
* [Database Methods](Documents/DatabaseMethods.md)
<!-- 8 -->
* [Handling Edges](Edges/README.md)
<!-- 9 -->
* [Simple Queries](SimpleQueries/README.md)
* [Queries](SimpleQueries/Queries.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)
* [Queries](SimpleQueries/Queries.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)
<!-- 10 -->
* [AQL](Aql/README.md)
* [How to invoke AQL](Aql/Invoke.md)
* [Query Results](Aql/QueryResults.md)
* [Language Basics](Aql/Basics.md)
* [Operators](Aql/Operators.md)
* [High level Operations](Aql/Operations.md)
* [Advanced Features](Aql/Advanced.md)
* [How to invoke AQL](Aql/Invoke.md)
* [Query Results](Aql/QueryResults.md)
* [Language Basics](Aql/Basics.md)
* [Operators](Aql/Operators.md)
* [High level Operations](Aql/Operations.md)
* [Advanced Features](Aql/Advanced.md)
<!-- 11 -->
* [Extending AQL](AqlExtending/README.md)
* [Conventions](AqlExtending/Conventions.md)
* [Registering Functions](AqlExtending/Functions.md)
* [Conventions](AqlExtending/Conventions.md)
* [Registering Functions](AqlExtending/Functions.md)
<!-- 12 -->
* [AQL Examples](AqlExamples/README.md)
* [Simple queries](AqlExamples/SimpleQueries.md)
* [Collection based queries](AqlExamples/CollectionQueries.md)
* [Projections and filters](AqlExamples/ProjectionsAndFilters.md)
* [Joins](AqlExamples/Join.md)
* [Grouping](AqlExamples/Grouping.md)
* [Simple queries](AqlExamples/SimpleQueries.md)
* [Collection based queries](AqlExamples/CollectionQueries.md)
* [Projections and filters](AqlExamples/ProjectionsAndFilters.md)
* [Joins](AqlExamples/Join.md)
* [Grouping](AqlExamples/Grouping.md)
<!-- 13 -->
* [Blueprint-Graphs](Blueprint-Graphs/README.md)
* [Graph Constructor](Blueprint-Graphs/GraphConstructor.md)
* [Vertex Methods](Blueprint-Graphs/VertexMethods.md)
* [Edge Methods](Blueprint-Graphs/EdgeMethods.md)
* [Graph Constructor](Blueprint-Graphs/GraphConstructor.md)
* [Vertex Methods](Blueprint-Graphs/VertexMethods.md)
* [Edge Methods](Blueprint-Graphs/EdgeMethods.md)
<!-- 13.5 -->
* [General-Graphs](General-Graphs/README.md)
* [Fluent AQL Interface](General-Graphs/FluentAQLInterface.md)
* [Fluent AQL Interface](General-Graphs/FluentAQLInterface.md)
<!-- 14 -->
* [Traversals](Traversals/README.md)
* [Starting from Scratch](Traversals/StartingFromScratch.md)
* [Using Traversal Objects](Traversals/UsingTraversalObjects.md)
* [Example Data](Traversals/ExampleData.md)
* [Starting from Scratch](Traversals/StartingFromScratch.md)
* [Using Traversal Objects](Traversals/UsingTraversalObjects.md)
* [Example Data](Traversals/ExampleData.md)
<!-- 15 -->
* [Transactions](Transactions/README.md)
* [Transaction invocation](Transactions/TransactionInvocation.md)
* [Passing parameters](Transactions/Passing.md)
* [Locking and isolation](Transactions/LockingAndIsolation.md)
* [Durability](Transactions/Durability.md)
* [Limitations](Transactions/Limitations.md)
* [Transaction invocation](Transactions/TransactionInvocation.md)
* [Passing parameters](Transactions/Passing.md)
* [Locking and isolation](Transactions/LockingAndIsolation.md)
* [Durability](Transactions/Durability.md)
* [Limitations](Transactions/Limitations.md)
<!-- 16 -->
* [Replication](Replication/README.md)
* [Components](Replication/Components.md)
* [Example Setup](Replication/ExampleSetup.md)
* [Replication Limitations](Replication/Limitations.md)
* [Replication Overhead](Replication/Overhead.md)
* [Components](Replication/Components.md)
* [Example Setup](Replication/ExampleSetup.md)
* [Replication Limitations](Replication/Limitations.md)
* [Replication Overhead](Replication/Overhead.md)
<!-- 17 -->
* [Foxx](Foxx/README.md)
* [Handling Request](Foxx/HandlingRequest.md)
* [FoxxController](Foxx/FoxxController.md)
* [FoxxModel](Foxx/FoxxModel.md)
* [FoxxRepository](Foxx/FoxxRepository.md)
* [Developing Applications](Foxx/DevelopingAnApplication.md)
* [Deploying Applications](Foxx/DeployingAnApplication.md)
* [Handling Request](Foxx/HandlingRequest.md)
* [FoxxController](Foxx/FoxxController.md)
* [FoxxModel](Foxx/FoxxModel.md)
* [FoxxRepository](Foxx/FoxxRepository.md)
* [Developing Applications](Foxx/DevelopingAnApplication.md)
* [Deploying Applications](Foxx/DeployingAnApplication.md)
<!-- 18 -->
* [Foxx Manager](FoxxManager/README.md)
* [First Steps](FoxxManager/FirstSteps.md)
* [Behind the scenes](FoxxManager/BehindTheScenes.md)
* [Multiple Databases](FoxxManager/MultipleDatabases.md)
* [Foxx Applications](FoxxManager/ApplicationsAndReplications.md)
* [Manager Commands](FoxxManager/ManagerCommands.md)
* [Frequently Used Options](FoxxManager/FrequentlyUsedOptions.md)
* [First Steps](FoxxManager/FirstSteps.md)
* [Behind the scenes](FoxxManager/BehindTheScenes.md)
* [Multiple Databases](FoxxManager/MultipleDatabases.md)
* [Foxx Applications](FoxxManager/ApplicationsAndReplications.md)
* [Manager Commands](FoxxManager/ManagerCommands.md)
* [Frequently Used Options](FoxxManager/FrequentlyUsedOptions.md)
<!-- 19 -->
* [Sharding](Sharding/README.md)
* [How to try it out](Sharding/HowTo.md)
* [Implementation](Sharding/StatusOfImplementation.md)
* [Authentication](Sharding/Authentication.md)
* [Firewall setup](Sharding/FirewallSetup.md)
* [How to try it out](Sharding/HowTo.md)
* [Implementation](Sharding/StatusOfImplementation.md)
* [Authentication](Sharding/Authentication.md)
* [Firewall setup](Sharding/FirewallSetup.md)
<!-- 20 -->
* [Managing Endpoints](ManagingEndpoints/README.md)
<!-- 21 -->
* [Command-line Options](CommandLineOptions/README.md)
* [General options](CommandLineOptions/GeneralOptions.md)
* [Arangod options](CommandLineOptions/Arangod.md)
* [Development options](CommandLineOptions/Development.md)
* [Cluster options](CommandLineOptions/Cluster.md)
* [Logging options](CommandLineOptions/Logging.md)
* [Communication options](CommandLineOptions/Communication.md)
* [Random numbers](CommandLineOptions/RandomNumbers.md)
* [General options](CommandLineOptions/GeneralOptions.md)
* [Arangod options](CommandLineOptions/Arangod.md)
* [Development options](CommandLineOptions/Development.md)
* [Cluster options](CommandLineOptions/Cluster.md)
* [Logging options](CommandLineOptions/Logging.md)
* [Communication options](CommandLineOptions/Communication.md)
* [Random numbers](CommandLineOptions/RandomNumbers.md)
<!-- 22 -->
* [Arangoimp](Arangoimp/README.md)
<!-- 23 -->
* [Arangodump](Arangodump/README.md)
<!-- 24 -->
* [Arangorestore](Arangorestore/README.md)
* [Arangorestore](Arangorestore/README.md)
<!-- 25 -->
* [HTTP Databases](HttpDatabase/README.md)
* [Database-to-Endpoint](HttpDatabase/DatabaseEndpoint.md)
* [Database Management](HttpDatabase/DatabaseManagement.md)
* [Managing Databases (http)](HttpDatabase/ManagingDatabasesUsingHttp.md)
* [Note on Databases](HttpDatabase/NotesOnDatabases.md)
* [Database-to-Endpoint](HttpDatabase/DatabaseEndpoint.md)
* [Database Management](HttpDatabase/DatabaseManagement.md)
* [Managing Databases (http)](HttpDatabase/ManagingDatabasesUsingHttp.md)
* [Note on Databases](HttpDatabase/NotesOnDatabases.md)
<!-- 26 -->
* [HTTP Documents](HttpDocuments/README.md)
* [Address and ETag](HttpDocuments/AddressAndEtag.md)
* [Working with Documents](HttpDocuments/WorkingWithDocuments.md)
* [Address and ETag](HttpDocuments/AddressAndEtag.md)
* [Working with Documents](HttpDocuments/WorkingWithDocuments.md)
<!-- 27 -->
* [HTTP Edges](HttpEdges/README.md)
* [Documents, Identifiers, Handles](HttpEdges/Documents.md)
* [Address and ETag](HttpEdges/AddressAndEtag.md)
* [Working with Edges](HttpEdges/WorkingWithEdges.md)
* [Documents, Identifiers, Handles](HttpEdges/Documents.md)
* [Address and ETag](HttpEdges/AddressAndEtag.md)
* [Working with Edges](HttpEdges/WorkingWithEdges.md)
<!-- 28 -->
* [HTTP AQL Query Cursors](HttpAqlQueryCursor/README.md)
* [Retrieving query results](HttpAqlQueryCursor/QueryResults.md)
* [Accessing Cursors](HttpAqlQueryCursor/AccessingCursors.md)
* [Retrieving query results](HttpAqlQueryCursor/QueryResults.md)
* [Accessing Cursors](HttpAqlQueryCursor/AccessingCursors.md)
<!-- 29 -->
* [HTTP AQL Queries](HttpAqlQueries/README.md)
<!-- 30 -->
@ -153,34 +153,34 @@
* [HTTP Simple Queries](HttpSimpleQueries/README.md)
<!-- 32 -->
* [HTTP Collections](HttpCollections/README.md)
* [Address of a Collection](HttpCollections/Address.md)
* [Creating Collections](HttpCollections/Creating.md)
* [Getting Information](HttpCollections/Getting.md)
* [Modifying a Collection](HttpCollections/Modifying.md)
* [Address of a Collection](HttpCollections/Address.md)
* [Creating Collections](HttpCollections/Creating.md)
* [Getting Information](HttpCollections/Getting.md)
* [Modifying a Collection](HttpCollections/Modifying.md)
<!-- 33 -->
* [HTTP Indexes](HttpIndexes/README.md)
* [HTTP Address of an Index](HttpIndexes/Address.md)
* [HTTP Working with Indexes](HttpIndexes/WorkingWith.md)
* [HTTP Specialized Index Type Methods](HttpIndexes/SpecializedIndex.md)
* [HTTP Address of an Index](HttpIndexes/Address.md)
* [HTTP Working with Indexes](HttpIndexes/WorkingWith.md)
* [HTTP Specialized Index Type Methods](HttpIndexes/SpecializedIndex.md)
<!-- 34 -->
* [HTTP Transactions](HttpTransactions/README.md)
<!-- 35 -->
* [HTTP Graphs](HttpGraphs/README.md)
* [Vertex](HttpGraphs/Vertex.md)
* [Edges](HttpGraphs/Edge.md)
* [Vertex](HttpGraphs/Vertex.md)
* [Edges](HttpGraphs/Edge.md)
<!-- 36 -->
* [HTTP Traversals](HttpTraversal/README.md)
<!-- 37 -->
* [HTTP Replication](HttpReplications/README.md)
* [Replication Dump](HttpReplications/ReplicationDump.md)
* [Replication Logger](HttpReplications/ReplicationLogger.md)
* [Replication Applier](HttpReplications/ReplicationApplier.md)
* [Other Replications](HttpReplications/OtherReplication.md)
* [Replication Dump](HttpReplications/ReplicationDump.md)
* [Replication Logger](HttpReplications/ReplicationLogger.md)
* [Replication Applier](HttpReplications/ReplicationApplier.md)
* [Other Replications](HttpReplications/OtherReplication.md)
<!-- 38 -->
* [HTTP Bulk Imports](HttpBulkImports/README.md)
* [Self-Contained JSON Documents](HttpBulkImports/ImportingSelfContained.md)
* [Headers and Values](HttpBulkImports/ImportingHeadersAndValues.md)
* [Edge Collections](HttpBulkImports/ImportingIntoEdges.md)
* [Self-Contained JSON Documents](HttpBulkImports/ImportingSelfContained.md)
* [Headers and Values](HttpBulkImports/ImportingHeadersAndValues.md)
* [Edge Collections](HttpBulkImports/ImportingIntoEdges.md)
<!-- 39 -->
* [HTTP Batch Requests](HttpBatchRequest/README.md)
<!-- 40 -->
@ -189,7 +189,7 @@
* [HTTP User Management](HttpUserManagement/README.md)
<!-- 42 -->
* [HTTP Async Results Management](HttpAsyncResultsManagement/README.md)
* [Async Results Management](HttpAsyncResultsManagement/ManagingAsyncResults.md)
* [Async Results Management](HttpAsyncResultsManagement/ManagingAsyncResults.md)
<!-- 43 -->
* [HTTP Endpoints](HttpEndpoints/README.md)
<!-- 44 -->
@ -200,17 +200,17 @@
* [General HTTP Handling](GeneralHttp/README.md)
<!-- 47 -->
* [Javascript Modules](ModuleJavaScript/README.md)
* [Common JSModules](ModuleJavaScript/JSModules.md)
* [Modules Path](ModuleJavaScript/ModulesPath.md)
* [Common JSModules](ModuleJavaScript/JSModules.md)
* [Modules Path](ModuleJavaScript/ModulesPath.md)
<!-- 48 -->
* [Module "console"](ModuleConsole/README.md)
<!-- 49 -->
* [Module "fs"](ModuleFs/README.md)
<!-- 50 -->
* [Module "graph"](ModuleGraph/README.md)
* [Graph Constructors](ModuleGraph/GraphConstructor.md)
* [Vertex Methods](ModuleGraph/VertexMethods.md)
* [Edge Methods](ModuleGraph/EdgeMethods.md)
* [Graph Constructors](ModuleGraph/GraphConstructor.md)
* [Vertex Methods](ModuleGraph/VertexMethods.md)
* [Edge Methods](ModuleGraph/EdgeMethods.md)
<!-- 51 -->
* [Module "actions"](ModuleActions/README.md)
<!-- 52 -->
@ -245,9 +245,9 @@
* [Emergency Console](EmergencyConsole/README.md)
<!-- 67 -->
* [Naming Conventions](NamingConventions/README.md)
* [Database Names](NamingConventions/DatabaseNames.md)
* [Collection Names](NamingConventions/CollectionNames.md)
* [Document Keys](NamingConventions/DocumentKeys.md)
* [Attribute Names](NamingConventions/AttributeNames.md)
* [Database Names](NamingConventions/DatabaseNames.md)
* [Collection Names](NamingConventions/CollectionNames.md)
* [Document Keys](NamingConventions/DocumentKeys.md)
* [Attribute Names](NamingConventions/AttributeNames.md)
<!-- 68 -->
* [Error codes and meanings](ErrorCodes/README.md)

View File

@ -6,13 +6,13 @@ The hasNext operator returns true, then the cursor still has documents. In this
*Examples*
arango> var a = db.five.all();
arango> while (a.hasNext()) print(a.next());
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 }
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 }
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
arango> var a = db.five.all();
arango> while (a.hasNext()) print(a.next());
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 }
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 }
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
`cursor.next()`
@ -20,8 +20,8 @@ If the hasNext operator returns true, then the underlying cursor of the simple q
*Examples*
arango> db.five.all().next();
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
arango> db.five.all().next();
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
cursor.setBatchSize( 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.
@ -61,12 +61,12 @@ Examples
Ignore any limit:
arango> db.five.all().limit(2).count();
5
arango> db.five.all().limit(2).count();
5
Counting any limit or skip:
arango> db.five.all().limit(2).count(true);
2
arango> db.five.all().limit(2).count(true);
2
<!--
@anchor SimpleQueryHasNext

View File

@ -25,9 +25,9 @@ In order to use the fulltext operator, a fulltext index must be defined for the
To find all documents which contain the terms foo and bar:
arango> db.emails.fulltext("text", "word").toArray();
[ { "_id" : "emails/1721603", "_key" : "1721603", "_rev" : "1721603", "text" : "this document contains a word" },
{ "_id" : "emails/1783231", "_key" : "1783231", "_rev" : "1783231", "text" : "this document also contains a word" } ]
arango> db.emails.fulltext("text", "word").toArray();
[ { "_id" : "emails/1721603", "_key" : "1721603", "_rev" : "1721603", "text" : "this document contains a word" },
{ "_id" : "emails/1783231", "_key" : "1783231", "_rev" : "1783231", "text" : "this document also contains a word" } ]
!SUBSUBSECTION Fulltext query syntax:

View File

@ -39,17 +39,17 @@ This will add an attribute name to all documents returned, which contains the di
To get the nearest two locations:
arango> db.geo.near(0,0).limit(2).toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "name" : "Name/-10/0", "loc" : [ -10, 0 ] } ]
arango> db.geo.near(0,0).limit(2).toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "name" : "Name/-10/0", "loc" : [ -10, 0 ] } ]
If you need the distance as well, then you can use the distance operator:
arango> db.geo.near(0,0).distance().limit(2).toArray();
[
{ "_id" : geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] }
]
arango> db.geo.near(0,0).distance().limit(2).toArray();
[
{ "_id" : geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] }
]
`collection.within( latitude, longitude, radius)`
@ -69,16 +69,16 @@ This will add an attribute name to all documents returned, which contains the di
To find all documents within a radius of 2000 km use:
arango> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/24707840", "_key" : "24707840", "_rev" : "24707840", "distance" : 1111949.3, "name" : "Name/0/-10", "loc" : [ 0, -10 ] },
{ "_id" : "geo/24838912", "_key" : "24838912", "_rev" : "24838912", "distance" : 1111949.3, "name" : "Name/0/10", "loc" : [ 0, 10 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] },
{ "_id" : "geo/27198208", "_key" : "27198208", "_rev" : "27198208", "distance" : 1111949.3, "name" : "Name/10/0", "loc" : [ 10, 0 ] },
{ "_id" : "geo/22414080", "_key" : "22414080", "_rev" : "22414080", "distance" : 1568520.6, "name" : "Name/-10/10", "loc" : [ -10, 10 ] },
{ "_id" : "geo/27263744", "_key" : "27263744", "_rev" : "27263744", "distance" : 1568520.6, "name" : "Name/10/10", "loc" : [ 10, 10 ] },
{ "_id" : "geo/22283008", "_key" : "22283008", "_rev" : "22283008", "distance" : 1568520.6, "name" : "Name/-10/-10", "loc" : [ -10, -10 ] },
{ "_id" : "geo/27132672", "_key" : "27132672", "_rev" : "27132672", "distance" : 1568520.6, "name" : "Name/10/-10", "loc" : [ 10, -10 ] } ]
arango> db.geo.within(0, 0, 2000 * 1000).distance().toArray();
[ { "_id" : "geo/24773376", "_key" : "24773376", "_rev" : "24773376", "distance" : 0, "name" : "Name/0/0", "loc" : [ 0, 0 ] },
{ "_id" : "geo/24707840", "_key" : "24707840", "_rev" : "24707840", "distance" : 1111949.3, "name" : "Name/0/-10", "loc" : [ 0, -10 ] },
{ "_id" : "geo/24838912", "_key" : "24838912", "_rev" : "24838912", "distance" : 1111949.3, "name" : "Name/0/10", "loc" : [ 0, 10 ] },
{ "_id" : "geo/22348544", "_key" : "22348544", "_rev" : "22348544", "distance" : 1111949.3, "name" : "Name/-10/0", "loc" : [ -10, 0 ] },
{ "_id" : "geo/27198208", "_key" : "27198208", "_rev" : "27198208", "distance" : 1111949.3, "name" : "Name/10/0", "loc" : [ 10, 0 ] },
{ "_id" : "geo/22414080", "_key" : "22414080", "_rev" : "22414080", "distance" : 1568520.6, "name" : "Name/-10/10", "loc" : [ -10, 10 ] },
{ "_id" : "geo/27263744", "_key" : "27263744", "_rev" : "27263744", "distance" : 1568520.6, "name" : "Name/10/10", "loc" : [ 10, 10 ] },
{ "_id" : "geo/22283008", "_key" : "22283008", "_rev" : "22283008", "distance" : 1568520.6, "name" : "Name/-10/-10", "loc" : [ -10, -10 ] },
{ "_id" : "geo/27132672", "_key" : "27132672", "_rev" : "27132672", "distance" : 1568520.6, "name" : "Name/10/-10", "loc" : [ 10, -10 ] } ]
`collection.geo( location)`
@ -96,35 +96,35 @@ The next near or within operator will use the specific geo-spatial index.
Assume you have a location stored as list in the attribute home and a destination stored in the attribute work. Than you can use the geo operator to select, which coordinates to use in a near query.
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.complex.save({ name : "Name/" + i + "/" + j,
.......> home : [ i, j ],
.......> work : [ -i, -j ] });
.......> }
.......> }
arango> for (i = -90; i <= 90; i += 10) {
.......> for (j = -180; j <= 180; j += 10) {
.......> db.complex.save({ name : "Name/" + i + "/" + j,
.......> home : [ i, j ],
.......> work : [ -i, -j ] });
.......> }
.......> }
arango> db.complex.near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex(""home"");
arango> db.complex.near(0, 170).limit(5).toArray();
[ { "_id" : "complex/74655276", "_key" : "74655276", "_rev" : "74655276", "name" : "Name/0/170", "home" : [ 0, 170 ], "work" : [ 0, -170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] },
{ "_id" : "complex/77080108", "_key" : "77080108", "_rev" : "77080108", "name" : "Name/10/170", "home" : [ 10, 170 ], "work" : [ -10, -170 ] },
{ "_id" : "complex/72230444", "_key" : "72230444", "_rev" : "72230444", "name" : "Name/-10/170", "home" : [ -10, 170 ], "work" : [ 10, -170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] } ]
arango> db.complex.near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex(""home"");
arango> db.complex.near(0, 170).limit(5).toArray();
[ { "_id" : "complex/74655276", "_key" : "74655276", "_rev" : "74655276", "name" : "Name/0/170", "home" : [ 0, 170 ], "work" : [ 0, -170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] },
{ "_id" : "complex/77080108", "_key" : "77080108", "_rev" : "77080108", "name" : "Name/10/170", "home" : [ 10, 170 ], "work" : [ -10, -170 ] },
{ "_id" : "complex/72230444", "_key" : "72230444", "_rev" : "72230444", "name" : "Name/-10/170", "home" : [ -10, 170 ], "work" : [ 10, -170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] } ]
arango> db.complex.geo("work").near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex("work");
arango> db.complex.geo("work").near(0, 170).limit(5).toArray();
[ { "_id" : "complex/72427052", "_key" : "72427052", "_rev" : "72427052", "name" : "Name/0/-170", "home" : [ 0, -170 ], "work" : [ 0, 170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] },
{ "_id" : "complex/70002220", "_key" : "70002220", "_rev" : "70002220", "name" : "Name/-10/-170", "home" : [ -10, -170 ], "work" : [ 10, 170 ] },
{ "_id" : "complex/74851884", "_key" : "74851884", "_rev" : "74851884", "name" : "Name/10/-170", "home" : [ 10, -170 ], "work" : [ -10, 170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] } ]
arango> db.complex.geo("work").near(0, 170).limit(5);
exception in file '/simple-query' at 1018,5: a geo-index must be known
arango> db.complex.ensureGeoIndex("work");
arango> db.complex.geo("work").near(0, 170).limit(5).toArray();
[ { "_id" : "complex/72427052", "_key" : "72427052", "_rev" : "72427052", "name" : "Name/0/-170", "home" : [ 0, -170 ], "work" : [ 0, 170 ] },
{ "_id" : "complex/72361516", "_key" : "72361516", "_rev" : "72361516", "name" : "Name/0/-180", "home" : [ 0, -180 ], "work" : [ 0, 180 ] },
{ "_id" : "complex/70002220", "_key" : "70002220", "_rev" : "70002220", "name" : "Name/-10/-170", "home" : [ -10, -170 ], "work" : [ 10, 170 ] },
{ "_id" : "complex/74851884", "_key" : "74851884", "_rev" : "74851884", "name" : "Name/10/-170", "home" : [ 10, -170 ], "work" : [ -10, 170 ] },
{ "_id" : "complex/74720812", "_key" : "74720812", "_rev" : "74720812", "name" : "Name/0/180", "home" : [ 0, 180 ], "work" : [ 0, -180 ] } ]
<!--

View File

@ -14,7 +14,7 @@ will be undefined which of the matching documents will get removed/modified.
!SUBSUBSECTION Examples
arangod> db.content.removeByExample({ "domain": "de.celler" })
arangod> db.content.removeByExample({ "domain": "de.celler" })
`collection.replaceByExample( example, newValue)`
@ -30,7 +30,7 @@ The optional limit parameter can be used to restrict the number of replacements
!SUBSUBSECTION Examples
arangod> db.content.replaceByExample({ "domain": "de.celler" }, { "foo": "someValue }, false, 5)
arangod> db.content.replaceByExample({ "domain": "de.celler" }, { "foo": "someValue }, false, 5)
`collection.updateByExample( example, newValue)`
@ -48,7 +48,7 @@ The optional limit parameter can be used to restrict the number of updates to th
!SUBSUBSECTION Examples
arangod> db.content.updateByExample({ "domain": "de.celler" }, { "foo": "someValue, "domain": null }, false)
arangod> db.content.updateByExample({ "domain": "de.celler" }, { "foo": "someValue, "domain": null }, false)
<!--

View File

@ -21,20 +21,20 @@ In general the input to limit should be sorted. Otherwise it will be unclear whi
*Examples*
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().limit(2).toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
]
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().limit(2).toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
]
*query.skip( number)*
@ -44,20 +44,20 @@ In general the input to limit should be sorted. Otherwise it will be unclear whi
*Examples*
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().skip(3).toArray();
[
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().skip(3).toArray();
[
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
<!--

View File

@ -8,24 +8,24 @@ Selects all documents of a collection and returns a cursor. You can use toArray,
Use toArray to get all documents at once:
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
arango> db.five.all().toArray();
[
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 },
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 },
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 },
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 },
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
]
Use next to loop over all documents:
arango> var a = db.five.all();
arango> while (a.hasNext()) print(a.next());
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 }
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 }
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
arango> var a = db.five.all();
arango> while (a.hasNext()) print(a.next());
{ "_id" : "five/1798296", "_key" : "1798296", "_rev" : "1798296", "doc" : 3 }
{ "_id" : "five/1732760", "_key" : "1732760", "_rev" : "1732760", "doc" : 2 }
{ "_id" : "five/1863832", "_key" : "1863832", "_rev" : "1863832", "doc" : 4 }
{ "_id" : "five/1667224", "_key" : "1667224", "_rev" : "1667224", "doc" : 1 }
{ "_id" : "five/1929368", "_key" : "1929368", "_rev" : "1929368", "doc" : 5 }
`collection.byExample( example)`
@ -35,26 +35,26 @@ You can use toArray, next, or hasNext to access the result. The result can be li
An attribute name of the form a.b is interpreted as attribute path, not as attribute. If you use
{ a : { c : 1 } }
{ a : { c : 1 } }
as example, then you will find all documents, such that the attribute a contains a document of the form {c : 1 }. E.g., the document
{ a : { c : 1 }, b : 1 }
{ a : { c : 1 }, b : 1 }
will match, but the document
{ a : { c : 1, b : 1 } }
{ a : { c : 1, b : 1 } }
will not.
However, if you use
{ a.c : 1 },
{ a.c : 1 },
then you will find all documents, which contain a sub-document in a that has an attribute c of value 1. E.g., both documents
{ a : { c : 1 }, b : 1 } and
{ a : { c : 1, b : 1 } }
{ a : { c : 1 }, b : 1 } and
{ a : { c : 1, b : 1 } }
will match.
@ -66,27 +66,27 @@ As alternative you can supply a list of paths and values.
Use toArray to get all documents at once:
arango> db.users.all().toArray();
[ { "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285", "id" : 323, "name" : "Peter" },
{ "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749", "id" : 535, "name" : "Peter" },
{ "_id" : "users/554833357", "_key" : "554833357", "_rev" : "554833357", "id" : 25, "name" : "Vladimir" } ]
arango> db.users.all().toArray();
[ { "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285", "id" : 323, "name" : "Peter" },
{ "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749", "id" : 535, "name" : "Peter" },
{ "_id" : "users/554833357", "_key" : "554833357", "_rev" : "554833357", "id" : 25, "name" : "Vladimir" } ]
arango> db.users.byExample({ "id" : 323 }).toArray();
[ { "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" } ]
arango> db.users.byExample({ "id" : 323 }).toArray();
[ { "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" } ]
arango> db.users.byExample({ "name" : "Peter" }).toArray();
[ { "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" },
{ "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" } ]
arango> db.users.byExample({ "name" : "Peter" }).toArray();
[ { "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" },
{ "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" } ]
arango> db.users.byExample({ "name" : "Peter", "id" : 535 }).toArray();
[ { "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" } ]
arango> db.users.byExample({ "name" : "Peter", "id" : 535 }).toArray();
[ { "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" } ]
Use next to loop over all documents:
arango> var a = db.users.byExample( {"name" : "Peter" } );
arango> while (a.hasNext()) print(a.next());
{ "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" }
{ "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" }
arango> var a = db.users.byExample( {"name" : "Peter" } );
arango> while (a.hasNext()) print(a.next());
{ "id" : 323, "name" : "Peter", "_id" : "users/554702285", "_key" : "554702285", "_rev" : "554702285" }
{ "id" : 535, "name" : "Peter", "_id" : "users/554636749", "_key" : "554636749", "_rev" : "554636749" }
`collection.firstExample( example)`
@ -98,8 +98,8 @@ As alternative you can supply a list of paths and values.
*Examples*
arango> db.users.firstExample("name", 1237);
{ "_id" : "users/83049373", "_key" : "83049373", "_rev" : "83049373", "name" : 1237 }
arango> db.users.firstExample("name", 1237);
{ "_id" : "users/83049373", "_key" : "83049373", "_rev" : "83049373", "name" : 1237 }
`collection.range( attribute, left, right)`
@ -115,12 +115,12 @@ For range queries it is required that a skiplist index is present for the querie
Use toArray to get all documents at once:
arangod> l = db.skip.range("age", 10, 13).toArray();
[
{ "_id" : "skip/4260278", "_key" : "4260278", "_rev" : "4260278", "age" : 10 },
{ "_id" : "skip/4325814", "_key" : "4325814", "_rev" : "4325814", "age" : 11 },
{ "_id" : "skip/4391350", "_key" : "4391350", "_rev" : "4391350", "age" : 12 }
]
arangod> l = db.skip.range("age", 10, 13).toArray();
[
{ "_id" : "skip/4260278", "_key" : "4260278", "_rev" : "4260278", "age" : 10 },
{ "_id" : "skip/4325814", "_key" : "4325814", "_rev" : "4325814", "age" : 11 },
{ "_id" : "skip/4391350", "_key" : "4391350", "_rev" : "4391350", "age" : 12 }
]
`collection.any()`
@ -128,8 +128,8 @@ The any method returns a random document from the collection. It returns null if
*Examples*
arangod> db.example.any()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
arangod> db.example.any()
{ "_id" : "example/222716379559", "_rev" : "222716379559", "Hello" : "World" }
`collection.count()`
@ -137,8 +137,8 @@ Returns the number of living documents in the collection.
*Examples*
arango> db.users.count();
10001
arango> db.users.count();
10001
`collection.toArray()`

View File

@ -12,8 +12,8 @@ Assume that you have a test file containing
function aqlTestSuite () {
return {
testSizeOfTestCollection : function () {
assertEqual(5, 5);
testSizeOfTestCollection : function () {
assertEqual(5, 5);
};
}

View File

@ -1,3 +1,4 @@
{
"theme": "./localtheme"
}
"plugins": ["reveal"],
"theme": "./localtheme"
}

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,6 @@ html, body {
body {
text-rendering: optimizeLegibility;
font-smoothing: antialiased;
font-family: @font-family-base;
font-smoothing: antialiased;
font-family: @font-family-base;
}

View File

@ -1,89 +1,89 @@
.book-header{
#font-settings-wrapper{
position:relative;
.dropdown-menu{
background-color:@header-background;
border-color:@sidebar-divider-color;
padding: 0px;
#font-settings-wrapper{
position:relative;
.dropdown-menu{
background-color:@header-background;
border-color:@sidebar-divider-color;
padding: 0px;
.dropdown-caret{
position: absolute;
top: 14px;
left: -8px;
width: 10px;
height: 18px;
float: left;
overflow: hidden;
.caret-outer{
position: absolute;
border-bottom: 9px solid transparent;
border-top: 9px solid transparent;
border-right: 9px solid rgba(0,0,0,0.1);
height: auto;
left: 0;
top: 0;
width: auto;
display: inline-block;
margin-left: -1px;
}
.caret-inner{
position: absolute;
display: inline-block;
margin-left: -1px;
top: 0;
left: 1px;
border-bottom: 9px solid transparent;
border-top: 9px solid transparent;
border-right: 9px solid @header-background;
}
}
button{
border: 0;
background-color:transparent;
color:@header-button-color;
&:hover{
color:@header-button-hover-color;
background-color:@header-button-hover-background;
}
}
#enlarge-font-size{
width: 50%;
font-size:1.4em;
}
#reduce-font-size{
width: 50.5%;
font-size:1em;
}
.btn-group-xs{
.btn{
width: 33.7%;
padding: initial;
}
}
.list-group{
margin: 0px 0;
.dropdown-caret{
position: absolute;
top: 14px;
left: -8px;
width: 10px;
height: 18px;
float: left;
overflow: hidden;
.caret-outer{
position: absolute;
border-bottom: 9px solid transparent;
border-top: 9px solid transparent;
border-right: 9px solid rgba(0,0,0,0.1);
height: auto;
left: 0;
top: 0;
width: auto;
display: inline-block;
margin-left: -1px;
}
.caret-inner{
position: absolute;
display: inline-block;
margin-left: -1px;
top: 0;
left: 1px;
border-bottom: 9px solid transparent;
border-top: 9px solid transparent;
border-right: 9px solid @header-background;
}
}
button{
border: 0;
background-color:transparent;
color:@header-button-color;
&:hover{
color:@header-button-hover-color;
background-color:@header-button-hover-background;
}
}
#enlarge-font-size{
width: 50%;
font-size:1.4em;
}
#reduce-font-size{
width: 50.5%;
font-size:1em;
}
.btn-group-xs{
.btn{
width: 33.7%;
padding: initial;
}
}
.list-group{
margin: 0px 0;
.list-group-item{
cursor:pointer;
background-color:transparent;
border-color: @sidebar-divider-color;
border-width: 1px 0 !important;
.list-group-item{
cursor:pointer;
background-color:transparent;
border-color: @sidebar-divider-color;
border-width: 1px 0 !important;
&:hover{
color:@header-button-hover-color;
background-color:@header-button-hover-background !important;
}
&.active{
color:@header-button-hover-color;
background-color:@header-button-hover-background !important;
}
}
}
&.open{
display:block;
}
}
}
&:hover{
color:@header-button-hover-color;
background-color:@header-button-hover-background !important;
}
&.active{
color:@header-button-hover-color;
background-color:@header-button-hover-background !important;
}
}
}
&.open{
display:block;
}
}
}
}
/*
@ -91,35 +91,35 @@
*/
.color-theme-1{
#font-settings-wrapper{
.dropdown-menu{
background-color:@sidebar-background-1;
border-color:@sidebar-divider-color-1;
.dropdown-caret .caret-inner{
border-right: 9px solid @sidebar-background-1;
}
button{
color:@header-button-color-1;
&:hover{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1;
}
}
.list-group{
.list-group-item{
border-color:@sidebar-divider-color-1;
&:hover{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1 !important;
}
&.active{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1 !important;
}
}
}
}
}
#font-settings-wrapper{
.dropdown-menu{
background-color:@sidebar-background-1;
border-color:@sidebar-divider-color-1;
.dropdown-caret .caret-inner{
border-right: 9px solid @sidebar-background-1;
}
button{
color:@header-button-color-1;
&:hover{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1;
}
}
.list-group{
.list-group-item{
border-color:@sidebar-divider-color-1;
&:hover{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1 !important;
}
&.active{
color:@header-button-hover-color-1;
background-color:@header-button-hover-background-1 !important;
}
}
}
}
}
}
/*
@ -127,33 +127,33 @@
*/
.color-theme-2{
#font-settings-wrapper{
.dropdown-menu{
background-color:@sidebar-background-2;
border-color:@sidebar-divider-color-2;
.dropdown-caret .caret-inner{
border-right: 9px solid @sidebar-background-2;
}
button{
color:@header-button-color-2;
&:hover{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2;
}
}
.list-group{
.list-group-item{
border-color:@sidebar-divider-color-2;
&:hover{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2 !important;
}
&.active{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2 !important;
}
}
}
}
}
#font-settings-wrapper{
.dropdown-menu{
background-color:@sidebar-background-2;
border-color:@sidebar-divider-color-2;
.dropdown-caret .caret-inner{
border-right: 9px solid @sidebar-background-2;
}
button{
color:@header-button-color-2;
&:hover{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2;
}
}
.list-group{
.list-group-item{
border-color:@sidebar-divider-color-2;
&:hover{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2 !important;
}
&.active{
color:@header-button-hover-color-2;
background-color:@header-button-hover-background-2 !important;
}
}
}
}
}
}

View File

@ -21,7 +21,7 @@ the program
in order to check the consistency of the datafiles and journals. This brings up
___ _ __ _ _ ___ ___ ___
___ _ __ _ _ ___ ___ ___
/ \__ _| |_ __ _ / _(_) | ___ / \/ __\ / _ \
/ /\ / _` | __/ _` | |_| | |/ _ \ / /\ /__\// / /_\/
/ /_// (_| | || (_| | _| | | __/ / /_// \/ \/ /_\\

View File

@ -1,6 +1,6 @@
arango> require("internal").processStat();
{
minorPageFaults : 2683,
minorPageFaults : 2683,
majorPageFaults : 0,
userTime : 26,
systemTime : 7,

View File

@ -53,7 +53,8 @@ restrictions:
`_key` attribute from a document)
- It must consist of the letters a-z (lower or upper case), the digits 0-9,
the underscore (_), dash (-), or colon (:) characters only
- Any other characters, especially multi-byte sequences, whitespace or punctuation characters cannot be used inside key values
- Any other characters, especially multi-byte sequences, whitespace or
punctuation characters cannot be used inside key values
- The key must be unique within the collection it is used
Keys are case-sensitive, i.e. `myKey` and `MyKEY` are considered to be

View File

@ -14,94 +14,98 @@ OUTPUT_FOLDER=Doxygen/manuals/$(PACKAGE_VERSION)
################################################################################
WIKI = \
Aql \ AqlExamples
ArangoErrors \
CommandLin \
Communicati n \
Compil ng \
CookbookClu ter \
DbaM nual \
DbaManualAuthenti ation \
DbaManua Basics \
DbaManualDatafile ebugger \
DbaManualEmergen yConsole \
umpManual \
E tendingAql \
FirstS epsArangoD \
Glos ary \
Aql \
AqlExamples \
ArangoErrors \
CommandLine \
Communication \
Compiling \
CookbookCluster \
DbaManual \
DbaManualAuthentication \
DbaManualBasics \
DbaManualDatafileDebugger \
DbaManualEmergencyConsole \
DumpManual \
ExtendingAql \
FirstStepsArangoDB \
Glossary \
Graphs \
Hand ingCollections \
H ndlingDatabases \
andlingDocument \
HandlingEdges \ HandlingEndpoint \
Ha dlingIndexes \
Ho e \
HttpAq Functions \
Htt Batch \
Htt Collection \
ttpCursor \
H tpDatabase
HttpEndpoi t \
HttpGr ph \
Htt Import \
ttpIndex \
HttpJob \
HttpMi c \
HttpQuery \
HttpRepli ation \
Htt Sharding \
HttpSi ple \
HttpSyste \
HttpTr nsactions \ HttpTraversals \
ttpUser \
HandlingCollections \
HandlingDatabases \
HandlingDocuments \
HandlingEdges \
HandlingEndpoints \
HandlingIndexes \
Home \
HttpAqlFunctions \
HttpBatch \
HttpCollection \
HttpCursor \
HttpDatabase \
HttpEndpoint \
HttpGraph \
HttpImport \
HttpIndex \
HttpJob \
HttpMisc \
HttpQuery \
HttpReplication \
HttpSharding \
HttpSimple \
HttpSystem \
HttpTransactions \
HttpTraversals \
HttpUser \
ImpManual \
Impleme torManual \
Im lementorMa ualArangoErrors \
IndexBi Array \
In exCap \
IndexF lltext \
Index eo \
IndexH sh \
IndexSkipli t \
InstallManua \
ImplementorManual \
ImplementorManualArangoErrors \
IndexBitArray \
IndexCap \
IndexFulltext \
IndexGeo \
IndexHash \
IndexSkiplist \
InstallManual \
Installing \
JSModuleActi ns \
JSModuleC uster \
JSModuleConso e \
JSModu eFs \
JSModuleGrap \
JSModuleGen ralGraph \
JSM dules \
Naming onventions \
N wFeatures11 \
ewFeatures12 \
NewFeatures 3 \
JSModuleActions \
JSModuleCluster \
JSModuleConsole \
JSModuleFs \
JSModuleGraph \
JSModuleGeneralGraph \
JSModules \
NamingConventions \
NewFeatures11 \
NewFeatures12 \
NewFeatures13 \
NewFeatures14 \
N wFeatures20 \
NewFeat res21 \
RefMa ual \
Ref anualArangoErro s \
RefMa ualReplication
RestD cument \
Res Edge \
Restor Manual \
Sh rding \
Si pleQueries \
Task \
ToolsManu l \
Transact ons \
Traver als \
Upgrad ng \
Upgradi gGeneral \
U grading11 \
Upgrading12 \
Upgr ding13 \
Upgrading1 \
Upgrading20
NewFeatures20 \
NewFeatures21 \
RefManual \
RefManualArangoErrors \
RefManualReplication \
RestDocument \
RestEdge \
RestoreManual \
Sharding \
SimpleQueries \
Tasks \
ToolsManual \
Transactions \
Traversals \
Upgrading \
UpgradingGeneral \
Upgrading11 \
Upgrading12 \
Upgrading13 \
Upgrading14 \
Upgrading20 \
Upgrading21 \
UserMa ual \
UserManualAction \
UserManualArangosh \ UserManualFoxx \
UserManual \
UserManualActions \
UserManualArangosh \
UserManualFoxx \
UserManualFoxxManager \
UserManualReplication \
UserManualWebInterface \
@ -109,79 +113,82 @@ WIKI = \
################################################################################
### @brief TOC files
## ###################################### ######################################
################################################################################
DOXYGEN_TOC =
DOXYGEN_TOC = \
Documentation/DbaManual/DbaManual.md \
Documentation/ mplementorManual/ImplementorMa ual.md \
Documentation/InstallationMa ual/InstallationManual.md \
Documentation Manual/Home.md \
Documentation/RefManua /RefManual.md \
Documentation/ImplementorManual/ImplementorManual.md \
Documentation/InstallationManual/InstallationManual.md \
Documentation/Manual/Home.md \
Documentation/RefManual/RefManual.md \
Documentation/ToolsManual/ToolsManual.md \
Documentation/UserManual/UserManual.md \
Documentation/Manual/Upgrading.md
################################################################################
### @brief install man pag s
################################ ##################################### #########
### @brief install man pages
################################################################################
dist_man_MANS += \
Docum ntation/man/man1/arangob.1 \
Documentat on/man/man1/arangodump.1 \
Documen ation/man/man1/arangoimp.1 \
Docume tation/man/man1/arangorestore.1 \
Documentation/man/man1/arangosh.1 \
D cumentation/man/man8/rcarangod.8 \
Documentation/man/man1/arangob.1 \
Documentation/man/man1/arangodump.1 \
Documentation/man/man1/arangoimp.1 \
Documentation/man/man1/arangorestore.1 \
Documentation/man/man1/arangosh.1 \
Documentation/man/man8/rcarangod.8 \
Documentation/man/man8/arangod.8 \
Documentation/man/man8/arango-dfdb.8 \
Documentation/man/man8/foxx-manager.8
################################################################################
### @brie JavaScript files
#################### ################################## ########################
### @brief JavaScript files
################################################################################
DOXYGEN = \ Doxygen/js/actions/api-aqlfuncti n.c \
Doxygen/js/actions/api-clust r.c \
Doxygen/js/actions/api-co lection.c \
Doxygen/js/actions/api cursor.c \
Doxygen/js/actions/api database.c \
Doxygen/js/action /api-edges.c \
Doxygen/js/actio s/api-endpoint.c \
Doxygen/js/a tions/api-explain.c \
Doxygen/j /actions/api-foxx.c \
Doxygen/js actions/api-graph.c \
Doxygen/js actions/api-index.c \
Doxygen/js/acti ns/api-query.c \
Doxygen/js/actions api-simple.c \
Doxygen/js/acti ns/api-system.c \
Doxygen/js/actions/api-tran action.c \
Doxygen/js/actions/api-traver al.c \
Doxygen/js/actions/api-user.c \ Doxygen/js/common/bootstrap/module-c nsole.c \
DOXYGEN = \
Doxygen/js/actions/api-aqlfunction.c \
Doxygen/js/actions/api-cluster.c \
Doxygen/js/actions/api-collection.c \
Doxygen/js/actions/api-cursor.c \
Doxygen/js/actions/api-database.c \
Doxygen/js/actions/api-edges.c \
Doxygen/js/actions/api-endpoint.c \
Doxygen/js/actions/api-explain.c \
Doxygen/js/actions/api-foxx.c \
Doxygen/js/actions/api-graph.c \
Doxygen/js/actions/api-index.c \
Doxygen/js/actions/api-query.c \
Doxygen/js/actions/api-simple.c \
Doxygen/js/actions/api-system.c \
Doxygen/js/actions/api-transaction.c \
Doxygen/js/actions/api-traversal.c \
Doxygen/js/actions/api-user.c \
Doxygen/js/common/bootstrap/module-console.c \
Doxygen/js/common/bootstrap/module-fs.c \
Do ygen/js/common/bootstrap/modules.c \
Doxygen/js/common/modules/js nity.c \
Doxygen/js/common/bootstrap/modules.c \
Doxygen/js/common/modules/jsunity.c \
Doxygen/js/common/modules/org/arangodb/aql/functions.c \
Doxygen/js/common/modules/org/arangodb/graph/algorithms-common.c \ Doxygen/js/common/modules/org/arangodb/arango-collecti n-common.c \
Doxygen/js/common/modules/org/arangodb/arango-statem nt-common.c \
Doxygen/js/common/modules/org/arangodb/graph-co mon.c \
Doxygen/js/common/modules/org/arangodb/gr ph/algorithms-common.c \
Doxygen/js/common/modules/org/aran odb/simple-query-common.c \
Doxygen/js/server/modules/org arangodb/actions.c \
Doxygen/js/server/modules org/arangodb/arango-collection.c \
Doxygen/js/server/modules/ rg/arangodb/arango-database.c \
Doxygen/js/server/modules/org/ rangodb/foxx.c \
Doxygen/js/server/modules/org/arangodb/f xx/authentication.c \
Doxygen/js/server/modules/org/arangodb/fox /base_middleware.c \
Doxygen/js/server/modules/org/arang db/foxx/controller.c \
Doxygen/js/server/modules/org arangodb/foxx/format_middleware.c \
Doxygen/js/server/mod les/org/arangodb/foxx/internals.c \
Doxygen/js/server/modules/ rg/arangodb/foxx/model.c \
Doxygen/js/server/modules/org/arangodb/ oxx/repository.c \
Doxygen/js/server/modules/org/arangodb foxx/request_context.c \
Doxygen/js/server/modules/org arangodb/foxx/template_middleware.c \
Doxygen/js/ erver/modules/org/arangodb/graph-blueprint.c \
Doxygen/js server/modules/org/arangodb/simple-query.c \
Doxygen/js/serve /modules/org/arangodb/cluster.c \
Doxygen/js/common/modules/org/arangodb/graph/algorithms-common.c \
Doxygen/js/common/modules/org/arangodb/arango-collection-common.c \
Doxygen/js/common/modules/org/arangodb/arango-statement-common.c \
Doxygen/js/common/modules/org/arangodb/graph-common.c \
Doxygen/js/common/modules/org/arangodb/graph/algorithms-common.c \
Doxygen/js/common/modules/org/arangodb/simple-query-common.c \
Doxygen/js/server/modules/org/arangodb/actions.c \
Doxygen/js/server/modules/org/arangodb/arango-collection.c \
Doxygen/js/server/modules/org/arangodb/arango-database.c \
Doxygen/js/server/modules/org/arangodb/foxx.c \
Doxygen/js/server/modules/org/arangodb/foxx/authentication.c \
Doxygen/js/server/modules/org/arangodb/foxx/base_middleware.c \
Doxygen/js/server/modules/org/arangodb/foxx/controller.c \
Doxygen/js/server/modules/org/arangodb/foxx/format_middleware.c \
Doxygen/js/server/modules/org/arangodb/foxx/internals.c \
Doxygen/js/server/modules/org/arangodb/foxx/model.c \
Doxygen/js/server/modules/org/arangodb/foxx/repository.c \
Doxygen/js/server/modules/org/arangodb/foxx/request_context.c \
Doxygen/js/server/modules/org/arangodb/foxx/template_middleware.c \
Doxygen/js/server/modules/org/arangodb/graph-blueprint.c \
Doxygen/js/server/modules/org/arangodb/simple-query.c \
Doxygen/js/server/modules/org/arangodb/cluster.c \
Doxygen/js/server/modules/org/arangodb/cluster/planner.c \
Doxygen/js/server/modules/org/arangodb/cluster/kickstarter.c \
Doxygen/js/server/server.c
@ -191,120 +198,121 @@ DOXYGEN = \ Doxygen/js/actions/api-aqlfuncti n.c \
## -----------------------------------------------------------------------------
################################################################################
### @brief di ectory setup
############################### ################################################
### @brief directory setup
################################################################################
.P ONY: doxygen-create-directories
.PHONY: doxygen-create-directories
doxygen-create-directorie :
doxygen-create-directories:
@test -d Doxygen/doc || mkdir -p Doxygen/doc
@test -d Doxygen/website || mkdir -p Doxygen/website
@test -d Doxygen/website || mkdir -p Doxygen/website
@test -d Doxygen/js/actions || mkdir -p Doxygen/js/actions
@test -d Doxygen/js/ ommon/bootstrap || mkdir -p Doxygen/js/common/bootstrap
@test -d Doxygen/js/common/modules/org/arangodb/aql | mkdir -p Doxygen/js/common/modules/org/arangodb/aql
@test -d Doxygen/js/common/modules/org/arangodb/graph | mkdir -p Doxygen/js/common/modules/org/arangodb/graph
@test -d Doxygen/js/server/modules/org/arangodb/foxx | mkdir -p Doxygen/js/server/modules/org/arangodb/foxx
@test -d Doxygen/js/server/modules/org/arangodb/graph || m dir -p Doxygen/js/server/modules/org/arangodb/graph
@te t -d Doxygen/js/server/modules/org/arangodb/cluster || mkdir -p Doxygen/js/server/modules/org/arangodb/cluste
@test -d Doxygen/js/common/bootstrap || mkdir -p Doxygen/js/common/bootstrap
@test -d Doxygen/js/common/modules/org/arangodb/aql || mkdir -p Doxygen/js/common/modules/org/arangodb/aql
@test -d Doxygen/js/common/modules/org/arangodb/graph || mkdir -p Doxygen/js/common/modules/org/arangodb/graph
@test -d Doxygen/js/server/modules/org/arangodb/foxx || mkdir -p Doxygen/js/server/modules/org/arangodb/foxx
@test -d Doxygen/js/server/modules/org/arangodb/graph || mkdir -p Doxygen/js/server/modules/org/arangodb/graph
@test -d Doxygen/js/server/modules/org/arangodb/cluster || mkdir -p Doxygen/js/server/modules/org/arangodb/cluster
@test -d Doxygen/js/client || mkdir -p Doxygen/js/client
@test -d Doxygen/man/man1 || mkdir -p Doxygen/man/man1
@test -d Doxygen/man/man8 || mkdir -p Doxygen/man/man8
@test -d Doxygen/xml || mkdir p Doxygen/xml
@test -d Doxygen/xml || mkdir -p Doxygen/xml
.PHONY: Doxygen/js Doxygen/js/system Doxygen/js/modules
BUILT_SOURCES = Doxygen/.setup-directories
BUILT_SOURCES += Doxygen/.setup-directories
Doxygen/.setup-directories: doxygen-create-directories
@touch $@
Doxygen/js/actions/%.c: @srcdir@/js/actions/%.js Doxygen/.s tup-directories
Doxygen/js/actions/%.c: @srcdir@/js/actions/%.js Doxygen/.setup-directories
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
Doxygen/js/common/bootstrap/%.c: @srcdir@/js/common/bootstrap/%.js Doxyg n/.setup-directories
Doxygen/js/common/bootstrap/%.c: @srcdir@/js/common/bootstrap/%.js Doxygen/.setup-directories
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
Doxygen/js/common/modules/%.c: @srcdir@/js/common/m dules/%.js Doxygen/.setup-directories
Doxygen/js/common/modules/%.c: @srcdir@/js/common/modules/%.js Doxygen/.setup-directories
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
Doxygen/js/server/%.c: @srcdir@/js/server/%.js Dox gen/.setup-directories
Doxygen/js/server/%.c: @srcdir@/js/server/%.js Doxygen/.setup-directories
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
Doxygen/js/ erver/modules/%.c: @srcdir@/js/server/modules/%.js Doxygen/.setup-directories
Doxygen/js/server/modules/%.c: @srcdir@/js/server/modules/%.js Doxygen/.setup-directories
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
Doxygen/xml/%.md: Doxygen/xml/%.xml
@python @top_srcdir@/Doxygen/Scripts/xml2md.py $< > $@
######################################## #######################################
################################################################################
### @brief doxygen toc
################################ ###############################################
################################################################################
.PHONY: doxygen-toc
doxygen-toc:
pyth n @top_srcdir@/Documentation/Scripts/generateTOC.py $(DOXYGEN_TOC) >> Doxygen/toc.doxy.tmp
python @top_srcdir@/Documentation/Scripts/generateTOC.py $(DOXYGEN_TOC) >> Doxygen/toc.doxy.tmp
cmp -s Doxygen/toc.doxy Doxygen/toc.doxy.tmp || mv Doxygen/toc.doxy.tmp Doxygen/toc.doxy
@rm -f Doxygen/toc.doxy.tmp
Doxygen/toc.doxy: doxygen-toc
################################################################################
### @bri f doxygen
### @brief doxygen
################################################################################
.PHONY: doxygen
Doxyg n/arango-html.doxy: Documentation/arango.template Doxygen/toc.doxy
sed -e 's:GENERATE_HTML *= *NO: ENERATE_HTML = YES:' -e 's:ENABL D_SECTIONS *=:ENABLED_SECTIONS = HTML:' < $< $@
Doxygen/arango-html.doxy: Documentation/arango.template Doxygen/toc.doxy
sed -e 's:GENERATE_HTML *= *NO:GENERATE_HTML = YES:' -e 's:ENABLED_SECTIONS *=:ENABLED_SECTIONS = HTML:' < $< > $@
cat Doxygen/toc.doxy >> $@
doxygen: Doxygen/.setup-directories Doxygen/arango-html.doxy $(DOXYGEN)
$(MAKE) lib/BasicsC/voc-error .h
$(MAKE) lib/BasicsC/voc-errors.h
doxygen Doxygen/arango-html.doxy > /dev/null
@for w n $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh -keep-title Doxygen/html/$$w.html Doxygen/website/$$w.html; done
@for w in $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh --keep-title Doxygen/html/$$w.html Doxygen/website/$$w.html; done
cp -R @top_srcdir@/Documentation/images/* Doxygen/website/
cp -R @top_srcdir /Documentation/arangodb.css Doxygen/website
cp -R @top_srcdir@/Documentation/arangodb.css Doxygen/website
@for w i $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh --full-html --keep-title Doxygen/html/$$w.html Doxygen/doc/$$w.html; done
@for w in $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh --full-html --keep-title Doxygen/html/$$w.html Doxygen/doc/$$w.html; done
cp -R @top_srcdir@/Documentation/images/* Doxygen/doc/
cp -R @top_srcdir@/Documentation/arangodb.css Doxygen/doc
############################################################################ ###
################################################################################
### @brief latex
################################################################################
.PHONY: latex
Doxygen/arango-latex.doxy: Documentation/arango.template Doxygen/toc.doxy
sed -e 's:GENERATE_LATE *= *NO:GENERATE_LATEX = YES:' - 's:ENABLED_SECTIONS *=:ENABLED_SECTIONS = LAT X:' < $< > $@
Doxygen/arango-latex.doxy: Documentation/arango.template Doxygen/toc.doxy
sed -e 's:GENERATE_LATEX *= *NO:GENERATE_LATEX = YES:' -e 's:ENABLED_SECTIONS *=:ENABLED_SECTIONS = LATEX:' < $< > $@
cat Doxygen/toc.doxy >> $@
lat x: Doxygen/.setup-directories Doxygen/arango-latex.doxy $(DOXYGEN)
latex: Doxygen/.setup-directories Doxygen/arango-latex.doxy $(DOXYGEN)
$(MAKE) lib/BasicsC/voc-errors.h
doxygen Doxygen/aran o-latex.doxy > /dev/null
doxygen Doxygen/arango-latex.doxy > /dev/null
cp -R Documentation/latex/*.tex Doxygen/latex
pyth n @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/InstallManual.tex > Doxygen/latex/InstallManual.inc.te
cd Doxygen/latex && pdflatex -interaction batchmode install-manual.tex || rue
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/InstallManual.tex > Doxygen/latex/InstallManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode install-manual.tex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/UserManual.tex > Doxygen/latex/UserManual.inc.tex
cd Dox gen/latex && pdflatex -interaction batchmode user-manual.tex || true
cd Doxygen/latex && pdflatex -interaction batchmode user-manual.tex || true
python @top_ rcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/ImplementorManual.tex > Doxygen/latex/ImplementorManual.inc. ex
cd Doxygen/latex && pdflatex -interaction batchmode implementor-manual. ex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/ImplementorManual.tex > Doxygen/latex/ImplementorManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode implementor-manual.tex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/RefManual.tex > Doxygen/latex/RefM nual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode ref-manua .tex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/RefManual.tex > Doxygen/latex/RefManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode ref-manual.tex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/DbaManual.tex > Doxygen/latex/DbaMan al.inc.tex
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/DbaManual.tex > Doxygen/latex/DbaManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode dba-manual.tex || true
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/ToolsManual.tex > Doxygen/latex/ToolsManual.inc.tex
cd Doxygen/latex && pdflatex -interaction batchmode tools-manual.tex || true
################### ############################################################
################################################################################
### @brief man pages
################################################################################
@ -317,36 +325,36 @@ man: Doxygen/.setup-directories
## --SECTION-- EXAMPLES
## -----------------------------------------------------------------------------
######################## #######################################################
################################################################################
### @brief generate json for swagger REST-API
################################################################### ############
################################################################################
.PHONY: swagger
swagger:
(python @srcdir@/Documentation/Scripts/generateSwaggerApi.py @srcdir@ @srcdir@/js/apps/system/aardvark/api-docs api-docs) > @srcdir@/js/apps/system/aardvark/api-docs.json
####### ############################## #########################################
### @brief genera e examples
##################################### ##########################################
################################################################################
### @brief generate examples
################################################################################
.PHONY: examples
exampl s:
@rm -f /tmp/arangodb.e amples
examples:
@rm -f /tmp/arangodb.examples
python @srcdir@/Documentation/ cripts/generateExamples.py \
--output- ir @builddir@/Documentation/Examples \
--aran osh-setup @srcdir@/Documentation/Exa ples/setup-arangosh.js \
@srcdir@/js/actions/*.js
python @srcdir@/Documentation/Scripts/generateExamples.py \
--output-dir @builddir@/Documentation/Examples \
--arangosh-setup @srcdir@/Documentation/Examples/setup-arangosh.js \
@srcdir@/js/actions/*.js \
@srcdir@/Documentation/DbaManual/*.md \
@srcdir@/Documentation/UserManual/*.md \
@srcdir@/Documentation/ImplementorManual/*.md \
@src ir@/arangod/RestHandler/* cpp
@srcdir@/arangod/RestHandler/*.cpp \
@srcdir@/lib/Admin/*.cpp \
> /tmp/a angosh.examples
> /tmp/arangosh.examples
$(MA E) start-server PID=$(PID) SERVER_START="--serv r.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
@builddir@/bin/arangosh \
@ -366,7 +374,7 @@ exampl s:
.PHONY: documentation-complete
ocumentation-complete: doxygen examples swagger
documentation-complete: doxygen examples swagger
################################################################################
### @brief cleanup
@ -377,29 +385,30 @@ CLEANUP += \
Doxygen/*
################# ################################ #############################
################################################################################
## publish
##################################### ############### ##########################
################################################################################
.PHO Y: publish publish-html publish-pdf publish-copy
.PHONY: publish publish-html publish-pdf publish-copy
publish: publish-html ublish-pdf
publish: publish-html publish-pdf
make publish-copy
publish-copy:
cd Doxygen/manuals && scp -r "$(PACKAGE_VERSION)" $(MANUAL_DST)
cd Doxygen/manuals && scp -r "$(PACKAGE_VERSION)" $(MANUAL_DST)
publish-ht l:
publish-html:
$(MAKE) doxygen
mkdir -p $(OUTPUT_FOLDER)/images
@for w in $(WIKI); do cp Doxygen/website/$ w.html $(OUTP T_FOLDER); done
@for i in `ls Doxygen/website/* png`; do cp $$i $(OUTPUT_FOLDER)/; done
@cp Doxygen/web ite/arangodb.css $(OUTPUT_FOLDER)
@cp Documentation Manual/shell_reference_card.pdf $(OUTPUT_FOLDER)
publish-pdf: $(OUTPUT_FOLDER)
@for w in $(WIKI); do cp Doxygen/website/$$w.html $(OUTPUT_FOLDER); done
@for i in `ls Doxygen/website/*.png`; do cp $$i $(OUTPUT_FOLDER)/; done
@cp Doxygen/website/arangodb.css $(OUTPUT_FOLDER)
@cp Documentation/Manual/shell_reference_card.pdf $(OUTPUT_FOLDER)
publish-pdf: $(OUTPUT_FOLDER)
$(MAKE) latex
cp Doxygen/latex/dba-manual.pdf $(OUTPUT_FOLDER)
cp oxygen/latex/implementor-manual.pdf $(OUTPUT_FOLDER)
cp Doxygen/latex/dba-manual.pdf $(OUTPUT_FOLDER)
cp Doxygen/latex/implementor-manual.pdf $(OUTPUT_FOLDER)
cp Doxygen/latex/install-manual.pdf $(OUTPUT_FOLDER)
cp Doxygen/latex/user-manual.pdf $(OUTPUT_FOLDER)
cp Doxygen/latex/ref-manual.pdf $(OUTPUT_FOLDER)

View File

@ -221,7 +221,7 @@ It is possible to use more then one constraint for the same URL part.
{
url: {
match: "/hello/:name|:id/world",
constraint: {
constraint: {
name: "/[a-z]+/", id: "/[0-9]+/"
}
}
@ -310,9 +310,10 @@ You can write the following document into the `_routing` collection
to test the above examples.
{
routes: [ { url: { match: "/hello/world" }, content: "route 1" }
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "route 2" ,
{ url: { match: "/:something/world" }, content: "route 3" },
routes: [
{ url: { match: "/hello/world" }, content: "route 1" },
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "route 2" },
{ url: { match: "/:something/world" }, content: "route 3" },
{ url: { match: "/hello/*" }, content: "route 4" },
]
}
@ -357,8 +358,8 @@ Static Content{#UserManualActionsContentStatic}
You can specify a body and a content-type.
{
conten : {
contentType: "text/h ml",
content: {
contentType: "text/html",
body: "<html><body>Hello World</body></html>"
}
}

View File

@ -17,7 +17,8 @@ Assume that you have a test file containing
function aqlTestSuite () {
return {
testSizeOfTestCollection : function () { assertEqual(5, 5);
testSizeOfTestCollection : function () {
assertEqual(5, 5);
};
}

View File

@ -100,8 +100,9 @@ for line in f:
m = r2.match(line)
if m:
if fn:
func = "void " + fn + " (" fn = Non
if fn:
func = "void " + fn + " ("
fn = None
else:
name = m.group(1)
func = "void JSF_" + name + " ("
@ -126,10 +127,10 @@ for line in f:
# check for function assigment
m = r4.match(line)
if :
if m:
if fn:
func = "void " + fn + " ("
fn = one
func = "void " + fn + " ("
fn = None
else:
name = m.group(1)
func = "void JSF_" + string.replace(name, '.', '_') + " ("

View File

@ -19,5 +19,5 @@ s/\<ENDEXAMPLE\>/\n\.EE\n/g
i\
a\
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany
}

View File

@ -351,7 +351,8 @@ attribute naming conventions.
FOR u IN users
FOR f IN friends
FILTER u.active == true && f.active == true && u.id == f.userId RETURN u.name
FILTER u.active == true && f.active == true && u.id == f.userId
RETURN u.name
In the above example, the attribute names `active`, `name`, `id`, and `userId`
are qualified using the collection names they belong to (`u` and `f`
@ -542,7 +543,7 @@ type of bind parameter has a name prefixed with an additional `@` symbol (thus
when using the bind parameter in a query, two `@` symbols must be used).
FOR u IN @@collection
FILTER u.active == tru
FILTER u.active == true
RETURN u
Type and value order {#AqlTypeOrder}
@ -1381,7 +1382,8 @@ AQL supports the following functions to operate on document values:
)
[
{ "user1" : { "name" : "J" }, "user2" : { "name" : "T" } }
{ "user1" : { "name" : "J" },
"user2" : { "name" : "T" } }
]
When merging documents with identical attribute names, the attribute values of the
@ -1979,7 +1981,7 @@ nested, a cross product of the list elements returned by the individual `FOR`
statements will be created.
FOR u IN users
FOR l IN locati ns
FOR l IN locations
RETURN { "user" : u, "location" : l }
In this example, there are two list iterations: an outer iteration over the list
@ -2115,14 +2117,14 @@ Another use case for `LET` is to declare a complex computation in a subquery,
making the whole query more readable.
FOR u IN users
LET friends = (
FOR f IN fri nds
FILTER u.id == f. serId
LET friends = (
FOR f IN friends
FILTER u.id == f.userId
RETURN f
)
LET membersh ps = (
FOR m IN mem erships
FILTER u.id == m.userId
LET memberships = (
FOR m IN memberships
FILTER u.id == m.userId
RETURN m
)
RETURN { "user" : u, "friends" : friends, "numFriends" : LENGTH(friends), "memberShips" : memberships }
@ -2183,10 +2185,10 @@ It is required that subqueries be put inside parentheses `(` and `)` to
explicitly mark their start and end points:
FOR u IN users
LET recommenda ions = (
FOR r IN reco mendations
FILTER u.id == r.userId
SOR u.rank DE C
LET recommendations = (
FOR r IN recommendations
FILTER u.id == r.userId
SORT u.rank DESC
LIMIT 10
RETURN r
)
@ -2195,7 +2197,7 @@ explicitly mark their start and end points:
FOR u IN users
COLLECT city = u.city INTO g
RETURN { "city" : city, "numUsers" : LENGTH(g), "m xRating": M X(
RETURN { "city" : city, "numUsers" : LENGTH(g), "maxRating": MAX(
FOR r IN g
RETURN r.user.rating
) }

View File

@ -62,7 +62,7 @@ For a list of available methods for the `db` object, type
Note that it also possible to execute scripts in arangosh and pass parameters
to the file, e.g.:
> arangosh --javascript.execute myscript.js parameter1 parameter2
> arangosh --javascript.execute myscript.js parameter1 parameter2
Inside the script you can use the "ARGUMENTS" array to access the parameters.

View File

@ -158,11 +158,11 @@ embedded version in the browser. Using the command-line tool has the
advantage that you can use autocompletion.
unix> arangosh --server.password ""
_
_
__ _ _ __ __ _ _ __ __ _ ___ ___| |__
/ _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
\__,_|_| \__,_|_| |_|\__, |\___/|___/_| |_|
\__,_|_| \__,_|_| |_|\__, |\___/|___/_| |_|
|___/
Welcome to arangosh 1.x.y. Copyright (c) 2012 triAGENS GmbH.
@ -320,24 +320,24 @@ Now extract all elements:
arangosh> db.example.all().toArray()
[
{
{
_id : "example/6308263",
_key : "1 93214",
_rev : " 993214",
ge : 31,
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
}
},
{
_id : "example/6242727",
_key "1774564",
_rev "1774564"
_key : "1774564",
_rev : "1774564",
age : 29,
name : "John Doe"
},
},
{
_id : "example/5980583",
_ ey : "1512420",
_ ev : "1512420",
_key : "1512420",
_rev : "1512420",
Hello : "World"
}
]
@ -346,19 +346,19 @@ The last document was a mistake so let's delete it:
arangosh> db.example.remove("example/5980583")
true
arangosh> db.example.all().toArra ()
arangosh> db.example.all().toArray()
[
{
_id : "example/6308263",
_key : "1993214"
_rev : " 993214",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smi h"
name : "Jane Smith"
},
{
_id : "example/6242727",
_key : "17745 4",
_rev "1774564",
_key : "1774564",
_rev : "1774564",
age : 29,
name : "John Doe"
}
@ -368,12 +368,12 @@ Now we want to look for a person with a given name. We can use
`byExample` for this. The method returns a list of documents
matching a given example.
arangosh> db.example.byExample({ name: "Jane Smith" } .toArray()
arangosh> db.example.byExample({ name: "Jane Smith" }).toArray()
[
{
_id : "example/6308263",
_key : " 993214",
rev : "1993214",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
}
@ -384,11 +384,11 @@ combine the conditions with an `and`. The syntax above becomes messy for joins
and `or` conditions. Therefore ArangoDB also supports a full-blown
query language.
arangosh> db._query('FOR user IN example FILTER user.name == "Jane Smith" RETURN u er').toArray()
arangosh> db._query('FOR user IN example FILTER user.name == "Jane Smith" RETURN user').toArray()
[
{
_id : "example/63082 3",
_key : "1993214 ,
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"
@ -397,11 +397,11 @@ query language.
Search for all persons over 30:
arangosh> db._query('FOR user IN example FILTER user.age > 30 RETU N user').toArray()
arangosh> db._query('FOR user IN example FILTER user.age > 30 RETURN user').toArray()
[
{
_id : "example/6 08263",
key : "199 214",
_id : "example/6308263",
_key : "1993214",
_rev : "1993214",
age : 31,
name : "Jane Smith"

View File

@ -27,7 +27,7 @@ All collections in ArangoDB have an unique identifier and an unique
name. ArangoDB internally uses the collection's unique identifier to look up
collections. This identifier, however, is managed by ArangoDB and the user has
no control over it. In order to allow users to use their own names, each collection
also has an unique name which is specified by the user. To access a collection
also has an unique name which is specified by the user. To access a collection
from the user perspective, the collection name should be used, i.e.:
@LIT{db._collection(@FA{collection-name})}

View File

@ -489,7 +489,7 @@ Let us summarize what you have to do, to enable authentication in a cluster:
files of all dispatchers (this is already the default).
2. Put the same values for `cluster.username` and `cluster.password`
in the very same configuration files of all dispatchers.
3. The same procedure from step 2 must be done in the cluster plan as well.
3. The same procedure from step 2 must be done in the cluster plan as well.
4. Create users via the usual interface on the coordinators
(initially after the cluster launch there will be a single user `root`
with empty password).

View File

@ -71,4 +71,4 @@ runs the 'document' test case with 2000 requests, with concurrency 2, using batc
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -57,4 +57,4 @@ disable the password prompt and authentication when connecting to the server
.SH EXAMPLES
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -61,4 +61,4 @@ imports JSON data from file values.json into collection mydata, using a differen
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -48,4 +48,4 @@ disable the password prompt and authentication when connecting to the server
.SH EXAMPLES
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -61,4 +61,4 @@ starts arangosh connecting to a specific server using an SSL connection
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -21,4 +21,4 @@ starts the debugger with database directory /data/arangodb
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -68,4 +68,4 @@ starts the emergency console
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -44,4 +44,4 @@ shell> foxx-manager help
shows the help pageENDEXAMPLE
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany

View File

@ -14,4 +14,4 @@ ArangoDB database server.
.BR arangod "(8), "
.SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany
Copyright triAGENS GmbH, Cologne, Germany