1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into mjmh

This commit is contained in:
Jan Steemann 2014-06-18 21:13:51 +02:00
commit 73e3fd5551
39 changed files with 478 additions and 426 deletions

View File

@ -8,12 +8,15 @@ MD_FILES = $(wildcard Users/*/*.md)
md-files:
@for file in $(basename $(MDPP_FILES)); do echo "converting $${file}.mdpp"; markdown-pp.py $${file}.mdpp $${file}.md; done
clean-md-files:
@for file in $(basename $(MD_FILES)); do echo "remove $${file}.md";rm $${file}.md;done
.PHONY: build-books
build-books: md-files
@test -d books || mkdir books
make build-book NAME=Users
make clean-md-files
build-book:
@test -d books/$(NAME) || mkdir books/$(NAME)
@ -21,4 +24,3 @@ build-book:
python bot.py
cd $(NAME) && gitbook build -o ../books/$(NAME)
cp Users/Arangodb_Logo.png books/Users/
@for file in $(basename $(MD_FILES)); do echo "remove $${file}.md";rm $${file}.md;done

View File

@ -346,12 +346,13 @@ examples:
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 \
@srcdir@/arangod/RestHandler/*.cpp \
@srcdir@/lib/Admin/*.cpp \
@srcdir@/js/actions \
@srcdir@/js/client \
@srcdir@/js/common \
@srcdir@/js/server \
@srcdir@/Documentation/Books/Users \
@srcdir@/arangod/RestHandler \
@srcdir@/lib/Admin \
> /tmp/arangosh.examples
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http

View File

@ -32,10 +32,10 @@
### Copyright holder is triAGENS GmbH, Cologne, Germany
###
### @author Dr. Frank Celler
### @author Copyright 2011-2012, triagens GmbH, Cologne, Germany
### @author Copyright 2011-2014, triagens GmbH, Cologne, Germany
################################################################################
import re, sys, string
import re, sys, string, os
argv = sys.argv
argv.pop(0)
@ -105,24 +105,35 @@ STATE_ARANGOSH_RUN = 2
state = STATE_BEGIN
################################################################################
### @brief parse file
### @brief optioon states
################################################################################
r1 = re.compile(r'^(/// )?@EXAMPLE_ARANGOSH_OUTPUT{([^}]*)}')
r2 = re.compile(r'^(/// )?@EXAMPLE_ARANGOSH_RUN{([^}]*)}')
r3 = re.compile(r'^@END_EXAMPLE_')
name = ""
OPTION_NORMAL = 0
OPTION_ARANGOSH_SETUP = 1
OPTION_OUTPUT_DIR = 2
fstate = OPTION_NORMAL
strip = None
partialCmd = ""
partialLine = ""
################################################################################
### @brief append input
################################################################################
def appendInput (partialCmd, cmd, addNL):
nl = ""
if addNL:
nl = "\\n"
if partialCmd == "":
return "arangosh> " + cmd + nl
else:
return partialCmd + "........> " + cmd + nl
################################################################################
### @brief get file names
################################################################################
filenames = []
for filename in argv:
if filename == "--arangosh-setup":
@ -133,108 +144,14 @@ for filename in argv:
fstate = OPTION_OUTPUT_DIR
continue
## .............................................................................
## input file
## .............................................................................
if fstate == OPTION_NORMAL:
f = open(filename, "r")
state = STATE_BEGIN
for line in f:
if strip is None:
strip = ""
line = line.rstrip('\n')
# read the start line and remember the prefix which must be skipped
if state == STATE_BEGIN:
m = r1.match(line)
if m:
strip = m.group(1)
name = m.group(2)
if name in ArangoshFiles:
print >> sys.stderr, "%s\nduplicate file name '%s'\n%s\n" % ('#' * 80, name, '#' * 80)
ArangoshFiles[name] = True
ArangoshOutput[name] = []
state = STATE_ARANGOSH_OUTPUT
continue
m = r2.match(line)
if m:
strip = m.group(1)
name = m.group(2)
if name in ArangoshFiles:
print >> sys.stderr, "%s\nduplicate file name '%s'\n%s\n" % ('#' * 80, name, '#' * 80)
ArangoshCases.append(name)
ArangoshFiles[name] = True
ArangoshRun[name] = ""
state = STATE_ARANGOSH_RUN
continue
continue
# we are within a example handle any continued line magic
line = line[len(strip):]
m = r3.match(line)
showCmd = True
if m:
name = ""
partialLine = ""
partialCmd = ""
state = STATE_BEGIN
continue
cmd = line.replace("\\", "\\\\").replace("'", "\\'")
if line != "":
if line[0] == "|":
partialLine = partialLine + line[1:] + "\n"
cmd = cmd[1:]
if partialCmd == "":
partialCmd = "arangosh> " + cmd + "\\n"
else:
partialCmd = partialCmd + "........> " + cmd + "\\n"
continue
if line[0] == "~":
line = line[1:]
showCmd = False
line = partialLine + line
partialLine = ""
if showCmd:
if partialCmd == "":
cmd = "arangosh> " + cmd
else:
cmd = partialCmd + "........> " + cmd
partialCmd = ""
else:
cmd = None
if state == STATE_ARANGOSH_OUTPUT:
ArangoshOutput[name].append([line, cmd])
elif state == STATE_ARANGOSH_RUN:
ArangoshRun[name] += line + "\n"
f.close()
## .............................................................................
## arangosh setup file
## .............................................................................
if os.path.isdir(filename):
for root, dirs, files in os.walk(filename):
for file in files:
if file.endswith(".mdpp") or file.endswith(".js") or file.endswith(".cpp"):
filenames.append(os.path.join(root, file))
else:
filenames.append(filename)
elif fstate == OPTION_ARANGOSH_SETUP:
fstate = OPTION_NORMAL
@ -246,14 +163,130 @@ for filename in argv:
f.close()
## .............................................................................
## output directory
## .............................................................................
elif fstate == OPTION_OUTPUT_DIR:
fstate = OPTION_NORMAL
OutputDir = filename
################################################################################
### @brief loop over input files
################################################################################
r1 = re.compile(r'^(/// )?@EXAMPLE_ARANGOSH_OUTPUT{([^}]*)}')
r2 = re.compile(r'^(/// )?@EXAMPLE_ARANGOSH_RUN{([^}]*)}')
r3 = re.compile(r'^@END_EXAMPLE_')
r4 = re.compile(r'^ +')
strip = None
name = ""
partialCmd = ""
partialLine = ""
for filename in filenames:
f = open(filename, "r")
state = STATE_BEGIN
for line in f:
if strip is None:
strip = ""
line = line.rstrip('\n')
# read the start line and remember the prefix which must be skipped
if state == STATE_BEGIN:
m = r1.match(line)
if m:
strip = m.group(1)
name = m.group(2)
if name in ArangoshFiles:
print >> sys.stderr, "%s\nduplicate file name '%s'\n%s\n" % ('#' * 80, name, '#' * 80)
ArangoshFiles[name] = True
ArangoshOutput[name] = []
state = STATE_ARANGOSH_OUTPUT
continue
m = r2.match(line)
if m:
strip = m.group(1)
name = m.group(2)
if name in ArangoshFiles:
print >> sys.stderr, "%s\nduplicate file name '%s'\n%s\n" % ('#' * 80, name, '#' * 80)
ArangoshCases.append(name)
ArangoshFiles[name] = True
ArangoshRun[name] = ""
state = STATE_ARANGOSH_RUN
continue
continue
# we are within a example
line = line[len(strip):]
showCmd = True
# end-example test
m = r3.match(line)
if m:
name = ""
partialLine = ""
partialCmd = ""
state = STATE_BEGIN
continue
# fix special characters
cmd = line.replace("\\", "\\\\").replace("'", "\\'")
# handle any continued line magic
if line != "":
if line[0] == "|":
if line.startswith("| "):
line = line[2:]
cmd = cmd[2:]
else:
line = line[1:]
cmd = cmd[1:]
partialLine = partialLine + line + "\n"
partialCmd = appendInput(partialCmd, cmd, True)
continue
if line[0] == "~":
if line.startswith("~ "):
line = line[2:]
else:
line = line[1:]
showCmd = False
elif line.startswith(" "):
line = line[2:]
cmd = cmd[2:]
line = partialLine + line
partialLine = ""
if showCmd:
cmd = appendInput(partialCmd, cmd, False)
partialCmd = ""
else:
cmd = None
if state == STATE_ARANGOSH_OUTPUT:
ArangoshOutput[name].append([line, cmd])
elif state == STATE_ARANGOSH_RUN:
ArangoshRun[name] += line + "\n"
f.close()
################################################################################
### @brief generate arangosh example
################################################################################

View File

@ -16,7 +16,7 @@ describe ArangoDB do
doc.code.should eq(200)
compatibility = doc.parsed_response['compatibility']
compatibility.should be_kind_of(Integer)
compatibility.should eq(20100)
compatibility.should eq(20200)
end
it "tests the compatibility value when a broken header is set" do
@ -28,7 +28,7 @@ describe ArangoDB do
doc.code.should eq(200)
compatibility = doc.parsed_response['compatibility']
compatibility.should be_kind_of(Integer)
compatibility.should eq(20100)
compatibility.should eq(20200)
end
end
@ -97,6 +97,19 @@ describe ArangoDB do
end
end
it "tests the compatibility value when a valid header is set" do
versions = [ "2.2.0", "2.2.0-devel", "2.2.0-alpha", "2.2", " 2.2", "2.2 ", " 2.2.0", " 2.2.0 ", "20200", "20200 ", "20299" ]
versions.each do|value|
doc = ArangoDB.get("/_admin/echo", :headers => { "x-arango-version" => value })
doc.code.should eq(200)
compatibility = doc.parsed_response['compatibility']
compatibility.should be_kind_of(Integer)
compatibility.should eq(20200)
end
end
it "tests the compatibility value when a too low version is set" do
versions = [ "0.0", "0.1", "0.2", "0.9", "1.0", "1.1", "1.2" ]
@ -111,12 +124,12 @@ describe ArangoDB do
end
it "tests the compatibility value when a too high version is set" do
doc = ArangoDB.get("/_admin/echo", :headers => { "x-arango-version" => "2.1" })
doc = ArangoDB.get("/_admin/echo", :headers => { "x-arango-version" => "2.3" })
doc.code.should eq(200)
compatibility = doc.parsed_response['compatibility']
compatibility.should be_kind_of(Integer)
compatibility.should eq(20100)
compatibility.should eq(20300)
end
end

View File

@ -66,7 +66,7 @@ var aqlfunctions = require("org/arangodb/aql/functions");
/// @RESTRETURNCODE{200}
/// if success `HTTP 200` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestAqlfunctionsGetAll}
/// var url = "/_api/aqlfunction";
@ -149,7 +149,7 @@ function get_api_aqlfunction (req, res) {
/// If the JSON representation is malformed or mandatory data is missing from the
/// request, the server will respond with `HTTP 400`.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestAqlfunctionCreate}
/// var url = "/_api/aqlfunction";
@ -230,7 +230,7 @@ function post_api_aqlfunction (req, res) {
/// @RESTRETURNCODE{404}
/// If the specified user user function does not exist, the server will respond with `HTTP 404`.
///
/// @EXAMPLES
/// *Examples*
///
/// deletes a function:
///

View File

@ -251,7 +251,7 @@ function parseBodyForCreateCollection (req, res) {
/// determine the target shard. Note that values of shard key attributes cannot
/// be changed once set.
/// This option is meaningless in a single server setup.
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionCreateCollection}
/// var url = "/_api/collection";
@ -373,7 +373,7 @@ function post_api_collection (req, res) {
/// By providing the optional URL parameter `excludeSystem` with a value of
/// `true`, all system collections will be excluded from the response.
///
/// @EXAMPLES
/// *Examples*
///
/// Return information about all collections:
///
@ -500,7 +500,7 @@ function get_api_collections (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Using an identifier:
///
@ -560,7 +560,7 @@ function get_api_collections (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Using an identifier and requesting the number of documents:
///
@ -664,7 +664,7 @@ function get_api_collections (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Using an identifier and requesting the figures of the collection:
///
@ -711,7 +711,7 @@ function get_api_collections (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Retrieving the revision of a collection
///
@ -786,7 +786,7 @@ function get_api_collections (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Retrieving the checksum of a collection:
///
@ -1014,7 +1014,7 @@ function get_api_collection (req, res) {
/// If the `collection-name` is unknown, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierLoad}
/// var cn = "products";
@ -1085,7 +1085,7 @@ function put_api_collection_load (req, res, collection) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierUnload}
/// var cn = "products";
@ -1128,7 +1128,7 @@ function put_api_collection_unload (req, res, collection) {
/// @RESTDESCRIPTION
/// Removes all documents from the collection, but leaves the indexes intact.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierTruncate}
/// var cn = "products";
@ -1198,7 +1198,7 @@ function put_api_collection_truncate (req, res, collection) {
/// `numberOfShards` or `shardKeys` cannot be changed once a collection is
/// created.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierPropertiesSync}
/// var cn = "products";
@ -1261,7 +1261,7 @@ function put_api_collection_properties (req, res, collection) {
/// - 2: document collection
/// - 3: edges collection
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCollectionIdentifierRename}
/// var cn = "products1";
@ -1338,7 +1338,7 @@ function put_api_collection_rename (req, res, collection) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Rotating a journal:
///
@ -1460,7 +1460,7 @@ function put_api_collection (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Using an identifier:
///

View File

@ -149,7 +149,7 @@ var internal = require("internal");
/// @RESTRETURNCODE{405}
/// The server will respond with `HTTP 405` if an unsupported HTTP method is used.
///
/// @EXAMPLES
/// *Examples*
///
/// Executes a query and extract the result in a single go:
///
@ -335,7 +335,7 @@ function post_api_cursor(req, res) {
/// If no cursor with the specified identifier can be found, the server will respond
/// with `HTTP 404`.
///
/// @EXAMPLES
/// *Examples*
///
/// Valid request for next batch:
///
@ -448,7 +448,7 @@ function put_api_cursor (req, res) {
/// is returned if the server is not aware of the cursor. It is also
/// returned if a cursor is used after it has been destroyed.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestCursorDelete}
/// var url = "/_api/cursor";

View File

@ -65,7 +65,7 @@ var API = "_api/database";
/// @RESTRETURNCODE{403}
/// is returned if the request was not executed in the `_system` database.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestDatabaseGet}
/// var url = "/_api/database";
@ -95,7 +95,7 @@ var API = "_api/database";
/// @RESTRETURNCODE{400}
/// is returned if the request is invalid.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestDatabaseGetUser}
/// var url = "/_api/database/user";
@ -137,7 +137,7 @@ var API = "_api/database";
/// @RESTRETURNCODE{404}
/// is returned if the database could not be found.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestDatabaseGetInfo}
/// var url = "/_api/database/current";
@ -263,7 +263,7 @@ function get_api_database (req, res) {
/// @RESTRETURNCODE{409}
/// is returned if a database with the specified name already exists.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a database named `example`.
///
@ -418,7 +418,7 @@ function post_api_database (req, res) {
/// @RESTRETURNCODE{404}
/// is returned if the database could not be found.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestDatabaseDrop}
/// var url = "/_api/database";

View File

@ -61,7 +61,7 @@ var API = "/_api/edges";
/// Returns the list of edges starting or ending in the vertex identified by
/// `vertex-handle`.
///
/// @EXAMPLES
/// *Examples*
///
/// Any direction
///

View File

@ -77,7 +77,7 @@ var internal = require("internal");
/// @RESTRETURNCODE{405}
/// The server will respond with `HTTP 405` if an unsupported HTTP method is used.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestEndpointGet}
/// var url = "/_api/endpoint";
@ -142,7 +142,7 @@ var internal = require("internal");
/// @RESTRETURNCODE{405}
/// The server will respond with `HTTP 405` if an unsupported HTTP method is used.
///
/// @EXAMPLES
/// *Examples*
/// Adding an endpoint `tcp://127.0.0.1:8532` with two mapped databases
/// (`mydb1` and `mydb2`). `mydb1` will become the default database for the
/// endpoint.
@ -246,7 +246,7 @@ var internal = require("internal");
/// @RESTRETURNCODE{405}
/// The server will respond with `HTTP 405` if an unsupported HTTP method is used.
///
/// @EXAMPLES
/// *Examples*
///
/// Deleting an existing endpoint
///

View File

@ -112,7 +112,7 @@ var EXPLAIN = require("internal").AQL_EXPLAIN;
/// The server will respond with `HTTP 404` in case a non-existing collection is
/// accessed in the query.
///
/// @EXAMPLES
/// *Examples*
///
/// Valid query:
///

View File

@ -226,7 +226,7 @@ function matchError (req, res, doc, errorCode) {
/// is returned if it failed.
/// The response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphPostGraph}
/// var url = "/_api/graph/";
@ -337,7 +337,7 @@ function post_graph_graph (req, res) {
/// a different version. This response code may only be returned if `graph-name`
/// is specified in the request.
///
/// @EXAMPLES
/// *Examples*
///
/// get graph by name
///
@ -435,7 +435,7 @@ function get_graph_graph (req, res) {
/// "If-Match" header or `rev` is given and the current graph has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// delete graph by name
///
@ -542,7 +542,7 @@ function delete_graph_graph (req, res) {
/// is returned if the graph was created successfully and `waitForSync` was
/// `false`.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphCreateVertex}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -644,7 +644,7 @@ function post_graph_vertex (req, res, g) {
/// "If-None-Match" header or `rev` is given and the current graph has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// get vertex properties by name
///
@ -736,7 +736,7 @@ function get_graph_vertex (req, res, g) {
/// "If-Match" header or `rev` is given and the current vertex has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphDeleteVertex}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -905,7 +905,7 @@ function update_graph_vertex (req, res, g, isPatch) {
/// "If-Match" header or `rev` is given and the current vertex has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphChangeVertex}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -994,7 +994,7 @@ function put_graph_vertex (req, res, g) {
/// "If-Match" header or `rev` is given and the current vertex has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphChangepVertex}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1149,7 +1149,7 @@ function process_labels_filter (data, labels, collname) {
/// @RESTRETURNCODE{201}
/// is returned if the cursor was created
///
/// @EXAMPLES
/// *Examples*
///
/// Select all vertices
///
@ -1259,7 +1259,7 @@ function post_graph_all_vertices (req, res, g) {
/// @RESTRETURNCODE{201}
/// is returned if the cursor was created
///
/// @EXAMPLES
/// *Examples*
///
/// Select all vertices
///
@ -1428,7 +1428,7 @@ function post_graph_vertex_vertices (req, res, g) {
/// is returned if the edge was created successfully and `waitForSync` was
/// `false`.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphCreateEdge}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1541,7 +1541,7 @@ function post_graph_edge (req, res, g) {
/// "If-None-Match" header or `rev` is given and the current edge has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphGetEdge}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1632,7 +1632,7 @@ function get_graph_edge (req, res, g) {
/// "If-Match" header or `rev` is given and the current edge has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphDeleteEdge}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1806,7 +1806,7 @@ function update_graph_edge (req, res, g, isPatch) {
/// "If-Match" header or `rev` is given and the current edge has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphChangeEdge}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1897,7 +1897,7 @@ function put_graph_edge (req, res, g) {
/// "If-Match" header or `rev` is given and the current edge has
/// a different version
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestGraphChangepEdge}
/// var Graph = require("org/arangodb/graph-blueprint").Graph;
@ -1958,7 +1958,7 @@ function patch_graph_edge (req, res, g) {
/// @RESTRETURNCODE{201}
/// is returned if the cursor was created
///
/// @EXAMPLES
/// *Examples*
///
/// Select all edges
///
@ -2085,7 +2085,7 @@ function post_graph_all_edges (req, res, g) {
/// @RESTRETURNCODE{201}
/// is returned if the cursor was created
///
/// @EXAMPLES
/// *Examples*
///
/// Select all edges
///

View File

@ -59,7 +59,7 @@ var API = "_api/index";
/// available in the `identifiers` as hash map with the index handle as
/// keys.
///
/// @EXAMPLES
/// *Examples*
///
/// Return information about all indexes:
///
@ -130,7 +130,7 @@ function get_api_indexes (req, res) {
/// If the index does not exist, then a `HTTP 404`
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestIndexPrimaryIndex}
/// var cn = "products";
@ -244,7 +244,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a cap constraint
///
@ -332,7 +332,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a geo index with a location attribute:
///
@ -414,7 +414,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating an unique constraint:
///
@ -496,7 +496,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a skiplist:
///
@ -558,7 +558,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a fulltext index:
///
@ -616,7 +616,7 @@ function get_api_index (req, res) {
/// @RESTRETURNCODE{404}
/// If the `collection-name` is unknown, then a `HTTP 404` is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Creating a bitarray index:
///
@ -785,7 +785,7 @@ function post_api_index (req, res) {
///
/// @RESTRETURNCODE{404}
/// If the `index-handle` is unknown, then an `HTTP 404` is returned.
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestIndexDeleteUniqueSkiplist}
/// var cn = "products";

View File

@ -70,7 +70,7 @@ var PARSE = require("internal").AQL_PARSE;
/// or if the query contains a parse error. The body of the response will
/// contain the error details embedded in a JSON object.
///
/// @EXAMPLES
/// *Examples*
///
/// Valid query:
///

View File

@ -417,7 +417,7 @@ setupIndexQueries();
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Limit the amount of documents using `limit`
///
@ -544,7 +544,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleAny}
/// var cn = "products";
@ -658,7 +658,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Without distance:
///
@ -839,7 +839,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Without distance:
///
@ -1008,7 +1008,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleFulltext}
/// var cn = "products";
@ -1123,7 +1123,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Matching an attribute:
///
@ -1277,7 +1277,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// If a matching document was found:
///
@ -1406,7 +1406,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Retrieving the first n documents:
///
@ -1525,7 +1525,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// Retrieving the last n documents:
///
@ -1650,7 +1650,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleRange}
/// var cn = "products";
@ -1782,7 +1782,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleRemoveByExample}
/// var cn = "products";
@ -1950,7 +1950,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleReplaceByExample}
/// var cn = "products";
@ -2113,7 +2113,7 @@ actions.defineHttp({
/// is returned if the collection specified by `collection` is unknown. The
/// response body contains an error document in this case.
///
/// @EXAMPLES
/// *Examples*
/// using old syntax for options
/// @EXAMPLE_ARANGOSH_RUN{RestSimpleUpdateByExample}
/// var cn = "products";

View File

@ -348,7 +348,7 @@ actions.defineHttp({
/// @RESTRETURNCODE{200}
/// Statistics were returned successfully.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestAdminStatistics1}
/// var url = "/_admin/statistics";
@ -417,7 +417,7 @@ actions.defineHttp({
/// @RESTRETURNCODE{200}
/// Description was returned successfully.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_RUN{RestAdminStatisticsDescription1}
/// var url = "/_admin/statistics-description";

View File

@ -135,7 +135,7 @@ var actions = require("org/arangodb/actions");
/// Exceptions thrown by users will make the server respond with a return code of
/// `HTTP 500`
///
/// @EXAMPLES
/// *Examples*
///
/// Executing a transaction on a single collection:
///

View File

@ -200,7 +200,7 @@ function notFound (req, res, code, message) {
/// The server will responded with `HTTP 500` when an error occurs inside the
/// traversal or if a traversal performs more than `maxIterations` iterations.
///
/// @EXAMPLES
/// *Examples*
///
/// In the following examples the underlying graph will contain five persons
/// `Alice`, `Bob`, `Charlie`, `Dave` and `Eve`.

View File

@ -170,7 +170,7 @@ var stringifyFunction = function (code, name) {
/// Trying to unregister a function that does not exist will result in an
/// exception.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").unregister("myfunctions::temperature::celsiustofahrenheit");
@ -213,7 +213,7 @@ var unregisterFunction = function (name) {
///
/// This will return the number of functions unregistered.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions::temperature");
@ -263,7 +263,7 @@ var unregisterFunctionsGroup = function (group) {
/// and are the same for repeated calls with the same input values). It is not
/// used at the moment but may be used for optimisations later.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").register("myfunctions::temperature::celsiustofahrenheit",
@ -351,7 +351,7 @@ var registerFunction = function (name, code, isDeterministic) {
///
/// @FUN{aqlfunctions.toArray(@FA{prefix})}
///
/// @EXAMPLES
/// *Examples*
///
/// To list all available user functions:
///

View File

@ -196,7 +196,7 @@ ArangoCollection.prototype.toString = function () {
/// @FN{toArray}, @FN{next}, or @FN{hasNext} to access the result. The result
/// can be limited using the @FN{skip} and @FN{limit} operator.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -256,7 +256,7 @@ ArangoCollection.prototype.all = function () {
///
/// As alternative you can supply a list of paths and values.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -488,7 +488,7 @@ ArangoCollection.prototype.byConditionBitarray = function (index, condition) {
/// queried attribute. If no skiplist index is present on the attribute, an
/// error will be thrown.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -514,7 +514,7 @@ ArangoCollection.prototype.range = function (name, left, right) {
/// An attribute name of the form @LIT{a.b} is interpreted as attribute path,
/// not as attribute.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -558,7 +558,7 @@ ArangoCollection.prototype.closedRange = function (name, left, right) {
/// @FN{within} operators can then be used to execute a geo-spatial query on
/// this particular index.
///
/// @EXAMPLES
/// *Examples*
///
/// Assume you have a location stored as list in the attribute @LIT{home}
/// and a destination stored in the attribute @LIT{work}. Then you can use the
@ -670,7 +670,7 @@ ArangoCollection.prototype.geo = function(loc, order) {
/// This will add an attribute @FA{name} to all documents returned, which
/// contains the distance between the given point and the document in meter.
///
/// @EXAMPLES
/// *Examples*
///
/// To get the nearst two locations:
///
@ -713,7 +713,7 @@ ArangoCollection.prototype.near = function (lat, lon) {
/// This will add an attribute @FA{name} to all documents returned, which
/// contains the distance between the given point and the document in meter.
///
/// @EXAMPLES
/// *Examples*
///
/// To find all documents within a radius of 2000 km use:
///
@ -737,7 +737,7 @@ ArangoCollection.prototype.within = function (lat, lon, radius) {
/// collection, for the specified attribute. If multiple fulltext indexes are defined
/// for the collection and attribute, the most capable one will be selected.
///
/// @EXAMPLES
/// *Examples*
///
/// To find all documents which contain the terms @LIT{text} and @LIT{word}:
///
@ -765,7 +765,7 @@ ArangoCollection.prototype.fulltext = function (attribute, query, iid) {
/// - @LIT{probability} (optional, default all): a number between @LIT{0} and
/// @LIT{1}. Documents are chosen with this probability.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arango> db.example.getIndexes().map(function(x) { return x.id; });

View File

@ -414,7 +414,7 @@ AQLGenerator.prototype._edges = function(edgeExample, options) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered edges:
///
@ -470,7 +470,7 @@ AQLGenerator.prototype.edges = function(example) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered outbound edges:
///
@ -526,7 +526,7 @@ AQLGenerator.prototype.outEdges = function(example) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered inbound edges:
///
@ -613,7 +613,7 @@ AQLGenerator.prototype._vertices = function(example, options) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered vertices:
///
@ -683,7 +683,7 @@ AQLGenerator.prototype.vertices = function(example) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered starting vertices:
///
@ -751,7 +751,7 @@ AQLGenerator.prototype.fromVertices = function(example) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered starting vertices:
///
@ -825,7 +825,7 @@ AQLGenerator.prototype.getLastVar = function() {
/// Using `path()` as the last action before requesting the result
/// will modify the result such that the path required to find the set vertices is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Request the iteratively explored path using vertices and edges:
///
@ -888,7 +888,7 @@ AQLGenerator.prototype.pathEdges = function() {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered neighbors:
///
@ -988,7 +988,7 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() {
/// * A list of strings defining a set of collection names.
/// Elements from all collections in this set are used for matching
///
/// @EXAMPLES
/// *Examples*
///
/// Request all directly connected vertices unrestricted:
///
@ -1065,7 +1065,7 @@ AQLGenerator.prototype.restrict = function(restrictions) {
/// * A list containing example objects and/or strings.
/// All elements matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Request vertices unfiltered:
///
@ -1158,7 +1158,7 @@ AQLGenerator.prototype.execute = function() {
/// However keeping a reference to the query before
/// executing allows to chain further statements to it.
///
/// @EXAMPLES
/// *Examples*
///
/// To collect the entire result of a query toArray can be used:
///
@ -1189,7 +1189,7 @@ AQLGenerator.prototype.toArray = function() {
/// The query object maintains a cursor of the query for you.
/// *count()* does not change the cursor position.
///
/// @EXAMPLES
/// *Examples*
///
/// To count the number of matched elements:
///
@ -1221,7 +1221,7 @@ AQLGenerator.prototype.count = function() {
/// If the query has not yet been executed *hasNext()*
/// will execute it and create the cursor for you.
///
/// @EXAMPLES
/// *Examples*
///
/// Start query execution with hasNext:
///
@ -1262,7 +1262,7 @@ AQLGenerator.prototype.hasNext = function() {
/// will execute it and create the cursor for you.
/// It will throw an error of your query has no further results.
///
/// @EXAMPLES
/// *Examples*
///
/// Request some elements with next:
///
@ -1309,7 +1309,7 @@ AQLGenerator.prototype.next = function() {
/// edges in any direction between any pair of vertices within the
/// *vertexCollections*.
///
/// @EXAMPLES
/// *Examples*
///
/// To define simple relation with only one vertex collection:
///
@ -1366,7 +1366,7 @@ var _undirectedRelationDefinition = function (relationName, vertexCollections) {
/// Relations are only allowed in the direction from any collection in *fromVertexCollections*
/// to any collection in *toVertexCollections*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphDirectedRelationDefinition}
/// var graph = require("org/arangodb/general-graph");
@ -1412,7 +1412,7 @@ var _directedRelationDefinition = function (
/// @startDocuBlock JSF_general_graph_list_info
/// Lists all graph names stored in this database.
///
/// @EXAMPLES
/// *Examples*
/// @endDocuBlock
/// @startDocuBlock JSF_general_graph_list_examples
///
@ -1575,7 +1575,7 @@ var createHiddenProperty = function(obj, name, value) {
///
/// *data*: json - data of vertex
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionSave}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1596,7 +1596,7 @@ var createHiddenProperty = function(obj, name, value) {
/// *data*: json - data of vertex
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionReplace}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1618,7 +1618,7 @@ var createHiddenProperty = function(obj, name, value) {
/// *data*: json - data of vertex
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionUpdate}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1639,7 +1639,7 @@ var createHiddenProperty = function(obj, name, value) {
/// Additionally removes all ingoing and outgoing edges of the vertex recursively
/// (see [edge remove](#edge.remove)).
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionRemove}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1664,7 +1664,7 @@ var createHiddenProperty = function(obj, name, value) {
/// *to*: string - of ingoing vertex
/// *data*: json - data of edge
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionSave1}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1694,7 +1694,7 @@ var createHiddenProperty = function(obj, name, value) {
/// *data*: json - data of edge
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionReplace}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1716,7 +1716,7 @@ var createHiddenProperty = function(obj, name, value) {
/// *data*: json - data of edge
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionUpdate}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1736,7 +1736,7 @@ var createHiddenProperty = function(obj, name, value) {
///
/// If this edge is used as a vertex by another edge, the other edge will be removed (recursively).
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionRemove}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2207,7 +2207,7 @@ Graph.prototype._OUTEDGES = function(vertexId) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// In the examples the *toArray* function is used to print the result.
/// The description of this module can be found below.
@ -2259,7 +2259,7 @@ Graph.prototype._edges = function(edgeExample) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// In the examples the *toArray* function is used to print the result.
/// The description of this module can be found below.
@ -2296,7 +2296,7 @@ Graph.prototype._vertices = function(example) {
///
/// Returns the vertex defined with the attribute *_from* of the edge with *edgeId* as its *_id*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphGetFromVertex}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2326,7 +2326,7 @@ Graph.prototype._getFromVertex = function(edgeId) {
///
/// Returns the vertex defined with the attribute *_to* of the edge with *edgeId* as its *_id*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphGetToVertex}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2506,7 +2506,7 @@ Graph.prototype._amountCommonProperties = function(vertex1Example, vertex2Exampl
///
/// *edgeDefinition* - [string] : the edge definition to extend the graph
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__extendEdgeDefinitions}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2659,7 +2659,7 @@ var changeEdgeDefinitionsForGraph = function(graph, edgeDefinition, newCollectio
/// *edgeDefinition* - [string] : the edge definition to replace the existing edge
/// definition with the same attribute *collection*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__editEdgeDefinition}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2728,7 +2728,7 @@ Graph.prototype._editEdgeDefinitions = function(edgeDefinition) {
/// *edgeCollectionName* - string : name of edge collection defined in *collection* of the edge
/// definition.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinition}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2790,7 +2790,7 @@ Graph.prototype._deleteEdgeDefinition = function(edgeCollection) {
/// *vertexCollectionName* - string : name of vertex collection.
/// *createCollection* - bool : if true the collection will be created if it does not exist. Default: true.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__addVertexCollection}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2840,7 +2840,7 @@ Graph.prototype._addVertexCollection = function(vertexCollectionName, createColl
///
/// `general-graph._orphanCollections()`
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__orphanCollections}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2869,7 +2869,7 @@ Graph.prototype._orphanCollections = function() {
/// *dropCollection* - bool : if true the collection will be dropped if it is not used in any graph.
/// Default: true.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__removeVertexCollections}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");

View File

@ -265,7 +265,7 @@ Edge = function (graph, properties) {
///
/// Returns the identifier of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-id
////////////////////////////////////////////////////////////////////////////////
@ -281,7 +281,7 @@ Edge.prototype.getId = function () {
///
/// Returns the label of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-label
////////////////////////////////////////////////////////////////////////////////
@ -297,7 +297,7 @@ Edge.prototype.getLabel = function () {
///
/// Returns the property @FA{name} an @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-property
////////////////////////////////////////////////////////////////////////////////
@ -313,7 +313,7 @@ Edge.prototype.getProperty = function (name) {
///
/// Returns all propety names an @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-property-keys
////////////////////////////////////////////////////////////////////////////////
@ -329,7 +329,7 @@ Edge.prototype.getPropertyKeys = function () {
///
/// Returns all properties and their values of an @FA{edge}
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-properties
////////////////////////////////////////////////////////////////////////////////
@ -345,7 +345,7 @@ Edge.prototype.properties = function () {
///
/// Returns the vertex at the head of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-in-vertex
////////////////////////////////////////////////////////////////////////////////
@ -361,7 +361,7 @@ Edge.prototype.getInVertex = function () {
///
/// Returns the vertex at the tail of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-out-vertex
////////////////////////////////////////////////////////////////////////////////
@ -377,7 +377,7 @@ Edge.prototype.getOutVertex = function () {
///
/// Returns the peer vertex of the @FA{edge} and the @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arango> v1 = g.addVertex("1");
@ -481,7 +481,7 @@ Vertex = function (graph, properties) {
/// Creates a new edge from @FA{peer} to @FA{vertex} with given label and
/// properties defined in @FA{data}. Returns the edge object.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-add-in-edge
///
@ -510,7 +510,7 @@ Vertex.prototype.addInEdge = function (out, id, label, data) {
/// Creates a new edge from @FA{vertex} to @FA{peer} with given @FA{label} and
/// properties defined in @FA{data}. Returns the edge object.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-add-out-edge
///
@ -555,7 +555,7 @@ Vertex.prototype.outDegree = function () {
/// Returns the identifier of the @FA{vertex}. If the vertex was deleted, then
/// @LIT{undefined} is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-id
////////////////////////////////////////////////////////////////////////////////
@ -571,7 +571,7 @@ Vertex.prototype.getId = function () {
///
/// Returns the property @FA{name} a @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-property
////////////////////////////////////////////////////////////////////////////////
@ -587,7 +587,7 @@ Vertex.prototype.getProperty = function (name) {
///
/// Returns all propety names a @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-property-keys
////////////////////////////////////////////////////////////////////////////////
@ -603,7 +603,7 @@ Vertex.prototype.getPropertyKeys = function () {
///
/// Returns all properties and their values of a @FA{vertex}
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-properties
////////////////////////////////////////////////////////////////////////////////
@ -748,7 +748,7 @@ Graph.prototype.getOrAddVertex = function (id) {
/// label @FA{label} and contains the properties defined in @FA{data}.
/// out and in can either be vertices or their IDs
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-add-edge
///
@ -790,7 +790,7 @@ Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, wait
/// Creates a new vertex and returns the vertex object. The vertex contains
/// the properties defined in @FA{data}.
///
/// @EXAMPLES
/// *Examples*
///
/// Without any properties:
///

View File

@ -366,7 +366,7 @@ SimpleQuery.prototype.execute = function () {
/// In general the input to @FN{limit} should be sorted. Otherwise it will be
/// unclear which documents are used in the result set.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple2
////////////////////////////////////////////////////////////////////////////////
@ -399,7 +399,7 @@ SimpleQuery.prototype.limit = function (limit) {
/// In general the input to @FN{limit} should be sorted. Otherwise it will be
/// unclear which documents are used in the result set.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple8
////////////////////////////////////////////////////////////////////////////////
@ -508,7 +508,7 @@ SimpleQuery.prototype.setBatchSize = function (value) {
/// @note Not all simple queries support counting. In this case @LIT{null} is
/// returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Ignore any limit:
///
@ -538,7 +538,7 @@ SimpleQuery.prototype.count = function (applyPagination) {
/// documents. In this case the next document can be accessed using the
/// @FN{next} operator, which will advance the cursor.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple7
////////////////////////////////////////////////////////////////////////////////
@ -560,7 +560,7 @@ SimpleQuery.prototype.hasNext = function () {
/// will advance the underlying cursor. If you use @FN{next} on an
/// exhausted cursor, then @LIT{undefined} is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple5
////////////////////////////////////////////////////////////////////////////////

View File

@ -169,7 +169,7 @@ var stringifyFunction = function (code, name) {
/// Trying to unregister a function that does not exist will result in an
/// exception.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").unregister("myfunctions::temperature::celsiustofahrenheit");
@ -212,7 +212,7 @@ var unregisterFunction = function (name) {
///
/// This will return the number of functions unregistered.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").unregisterGroup("myfunctions::temperature");
@ -262,7 +262,7 @@ var unregisterFunctionsGroup = function (group) {
/// and are the same for repeated calls with the same input values). It is not
/// used at the moment but may be used for optimisations later.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arangosh> require("org/arangodb/aql/functions").register("myfunctions::temperature::celsiustofahrenheit",
@ -350,7 +350,7 @@ var registerFunction = function (name, code, isDeterministic) {
///
/// @FUN{aqlfunctions.toArray(@FA{prefix})}
///
/// @EXAMPLES
/// *Examples*
///
/// To list all available user functions:
///

View File

@ -195,7 +195,7 @@ ArangoCollection.prototype.toString = function () {
/// @FN{toArray}, @FN{next}, or @FN{hasNext} to access the result. The result
/// can be limited using the @FN{skip} and @FN{limit} operator.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -255,7 +255,7 @@ ArangoCollection.prototype.all = function () {
///
/// As alternative you can supply a list of paths and values.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -487,7 +487,7 @@ ArangoCollection.prototype.byConditionBitarray = function (index, condition) {
/// queried attribute. If no skiplist index is present on the attribute, an
/// error will be thrown.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -513,7 +513,7 @@ ArangoCollection.prototype.range = function (name, left, right) {
/// An attribute name of the form @LIT{a.b} is interpreted as attribute path,
/// not as attribute.
///
/// @EXAMPLES
/// *Examples*
///
/// Use @FN{toArray} to get all documents at once:
///
@ -557,7 +557,7 @@ ArangoCollection.prototype.closedRange = function (name, left, right) {
/// @FN{within} operators can then be used to execute a geo-spatial query on
/// this particular index.
///
/// @EXAMPLES
/// *Examples*
///
/// Assume you have a location stored as list in the attribute @LIT{home}
/// and a destination stored in the attribute @LIT{work}. Then you can use the
@ -669,7 +669,7 @@ ArangoCollection.prototype.geo = function(loc, order) {
/// This will add an attribute @FA{name} to all documents returned, which
/// contains the distance between the given point and the document in meter.
///
/// @EXAMPLES
/// *Examples*
///
/// To get the nearst two locations:
///
@ -712,7 +712,7 @@ ArangoCollection.prototype.near = function (lat, lon) {
/// This will add an attribute @FA{name} to all documents returned, which
/// contains the distance between the given point and the document in meter.
///
/// @EXAMPLES
/// *Examples*
///
/// To find all documents within a radius of 2000 km use:
///
@ -736,7 +736,7 @@ ArangoCollection.prototype.within = function (lat, lon, radius) {
/// collection, for the specified attribute. If multiple fulltext indexes are defined
/// for the collection and attribute, the most capable one will be selected.
///
/// @EXAMPLES
/// *Examples*
///
/// To find all documents which contain the terms @LIT{text} and @LIT{word}:
///
@ -764,7 +764,7 @@ ArangoCollection.prototype.fulltext = function (attribute, query, iid) {
/// - @LIT{probability} (optional, default all): a number between @LIT{0} and
/// @LIT{1}. Documents are chosen with this probability.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arango> db.example.getIndexes().map(function(x) { return x.id; });

View File

@ -413,7 +413,7 @@ AQLGenerator.prototype._edges = function(edgeExample, options) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered edges:
///
@ -469,7 +469,7 @@ AQLGenerator.prototype.edges = function(example) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered outbound edges:
///
@ -525,7 +525,7 @@ AQLGenerator.prototype.outEdges = function(example) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered inbound edges:
///
@ -612,7 +612,7 @@ AQLGenerator.prototype._vertices = function(example, options) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered vertices:
///
@ -682,7 +682,7 @@ AQLGenerator.prototype.vertices = function(example) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered starting vertices:
///
@ -750,7 +750,7 @@ AQLGenerator.prototype.fromVertices = function(example) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered starting vertices:
///
@ -824,7 +824,7 @@ AQLGenerator.prototype.getLastVar = function() {
/// Using `path()` as the last action before requesting the result
/// will modify the result such that the path required to find the set vertices is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Request the iteratively explored path using vertices and edges:
///
@ -887,7 +887,7 @@ AQLGenerator.prototype.pathEdges = function() {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// To request unfiltered neighbors:
///
@ -987,7 +987,7 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() {
/// * A list of strings defining a set of collection names.
/// Elements from all collections in this set are used for matching
///
/// @EXAMPLES
/// *Examples*
///
/// Request all directly connected vertices unrestricted:
///
@ -1064,7 +1064,7 @@ AQLGenerator.prototype.restrict = function(restrictions) {
/// * A list containing example objects and/or strings.
/// All elements matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Request vertices unfiltered:
///
@ -1157,7 +1157,7 @@ AQLGenerator.prototype.execute = function() {
/// However keeping a reference to the query before
/// executing allows to chain further statements to it.
///
/// @EXAMPLES
/// *Examples*
///
/// To collect the entire result of a query toArray can be used:
///
@ -1188,7 +1188,7 @@ AQLGenerator.prototype.toArray = function() {
/// The query object maintains a cursor of the query for you.
/// *count()* does not change the cursor position.
///
/// @EXAMPLES
/// *Examples*
///
/// To count the number of matched elements:
///
@ -1220,7 +1220,7 @@ AQLGenerator.prototype.count = function() {
/// If the query has not yet been executed *hasNext()*
/// will execute it and create the cursor for you.
///
/// @EXAMPLES
/// *Examples*
///
/// Start query execution with hasNext:
///
@ -1262,7 +1262,7 @@ AQLGenerator.prototype.hasNext = function() {
/// will execute it and create the cursor for you.
/// It will throw an error of your query has no further results.
///
/// @EXAMPLES
/// *Examples*
///
/// Request some elements with next:
///
@ -1309,7 +1309,7 @@ AQLGenerator.prototype.next = function() {
/// edges in any direction between any pair of vertices within the
/// *vertexCollections*.
///
/// @EXAMPLES
/// *Examples*
///
/// To define simple relation with only one vertex collection:
///
@ -1366,7 +1366,7 @@ var _undirectedRelationDefinition = function (relationName, vertexCollections) {
/// Relations are only allowed in the direction from any collection in *fromVertexCollections*
/// to any collection in *toVertexCollections*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphDirectedRelationDefinition}
/// var graph = require("org/arangodb/general-graph");
@ -1412,7 +1412,7 @@ var _directedRelationDefinition = function (
/// @startDocuBlock JSF_general_graph_list_info
/// Lists all graph names stored in this database.
///
/// @EXAMPLES
/// *Examples*
/// @endDocuBlock
/// @startDocuBlock JSF_general_graph_list_examples
///
@ -1439,7 +1439,7 @@ var _list = function() {
/// The list of edge definitions of a graph can be managed by the graph module itself.
/// This function is the entry point for the management and will return the correct list.
///
/// @EXAMPLES
/// *Examples*
///
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions}
@ -1471,7 +1471,7 @@ var _edgeDefinitions = function () {
/// In order to add more edge definitions to the graph before creating
/// this function can be used to add more definitions to the initial list.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsExtend}
/// var graph = require("org/arangodb/general-graph");
@ -1519,7 +1519,7 @@ var _extendEdgeDefinitions = function (edgeDefinition) {
/// * *edge-definitions*: array - list of edge definition objects
/// * *orphan-collections*: array - list of additonal vertex collection names
///
/// @EXAMPLES
/// *Examples*
///
/// Create an empty graph, edge definitions can be added at runtime:
///
@ -1855,7 +1855,7 @@ var updateBindCollections = function(graph) {
///
/// *data*: json - data of vertex
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionSave}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1876,7 +1876,7 @@ var updateBindCollections = function(graph) {
/// *data*: json - data of vertex
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionReplace}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1898,7 +1898,7 @@ var updateBindCollections = function(graph) {
/// *data*: json - data of vertex
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionUpdate}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1919,7 +1919,7 @@ var updateBindCollections = function(graph) {
/// Additionally removes all ingoing and outgoing edges of the vertex recursively
/// (see [edge remove](#edge.remove)).
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionRemove}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1944,7 +1944,7 @@ var updateBindCollections = function(graph) {
/// *to*: string - of ingoing vertex
/// *data*: json - data of edge
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionSave1}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1974,7 +1974,7 @@ var updateBindCollections = function(graph) {
/// *data*: json - data of edge
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionReplace}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -1996,7 +1996,7 @@ var updateBindCollections = function(graph) {
/// *data*: json - data of edge
/// *options*: json - (optional) - see collection documentation
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionUpdate}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2016,7 +2016,7 @@ var updateBindCollections = function(graph) {
///
/// If this edge is used as a vertex by another edge, the other edge will be removed (recursively).
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeCollectionRemove}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2058,7 +2058,7 @@ var Graph = function(graphName, edgeDefinitions, vertexCollections, edgeCollecti
///
/// * *graph-name*: string - unique identifier of the graph
///
/// @EXAMPLES
/// *Examples*
///
/// Load a graph:
///
@ -2161,7 +2161,7 @@ var checkIfMayBeDropped = function(colName, graphName, graphs) {
/// * *graphName*: string - unique identifier of the graph
/// * *dropCollections*: boolean (optional) - define if collections should be dropped (default: false)
///
/// @EXAMPLES
/// *Examples*
///
/// Drop a graph:
///
@ -2353,7 +2353,7 @@ Graph.prototype._OUTEDGES = function(vertexId) {
/// * A list containing example objects and/or strings.
/// All edges matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// In the examples the *toArray* function is used to print the result.
/// The description of this module can be found below.
@ -2405,7 +2405,7 @@ Graph.prototype._edges = function(edgeExample) {
/// * A list containing example objects and/or strings.
/// All vertices matching at least one of the elements in the list are returned.
///
/// @EXAMPLES
/// *Examples*
///
/// In the examples the *toArray* function is used to print the result.
/// The description of this module can be found below.
@ -2442,7 +2442,7 @@ Graph.prototype._vertices = function(example) {
///
/// Returns the vertex defined with the attribute *_from* of the edge with *edgeId* as its *_id*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphGetFromVertex}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2472,7 +2472,7 @@ Graph.prototype._getFromVertex = function(edgeId) {
///
/// Returns the vertex defined with the attribute *_to* of the edge with *edgeId* as its *_id*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphGetToVertex}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
@ -2559,7 +2559,7 @@ Graph.prototype._getVertexCollectionByName = function(name) {
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all common neighbors of capitals.
///
@ -2575,10 +2575,13 @@ Graph.prototype._getVertexCollectionByName = function(name) {
///
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphModuleCommonNeighbors2}
/// ~ var db = require("internal").db;
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
/// var g = examples.loadGraph("routeplanner");
/// |g._listCommonNeighbors('city/Munich', {}, {direction : 'outbound', maxDepth : 2},
/// {direction : 'outbound', maxDepth : 2});
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
/// var g = examples.loadGraph("routeplanner");
/// | g._listCommonNeighbors(
/// | 'city/Munich',
/// | {},
/// | {direction : 'outbound', maxDepth : 2},
/// {direction : 'outbound', maxDepth : 2});
/// @END_EXAMPLE_ARANGOSH_OUTPUT
///
/// @endDocuBlock
@ -2649,7 +2652,7 @@ Graph.prototype._listCommonNeighbors = function(vertex1Example, vertex2Example,
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all common neighbors of capitals.
///
@ -2745,7 +2748,7 @@ Graph.prototype._amountCommonNeighbors = function(vertex1Example, vertex2Example
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all locations with the same properties:
///
@ -2823,7 +2826,7 @@ Graph.prototype._listCommonProperties = function(vertex1Example, vertex2Example,
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all locations with the same properties:
///
@ -2886,7 +2889,7 @@ Graph.prototype._amountCommonProperties = function(vertex1Example, vertex2Exampl
///
/// *edgeDefinition* - [string] : the edge definition to extend the graph
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__extendEdgeDefinitions}
/// var graph = require("org/arangodb/general-graph")
@ -3045,7 +3048,7 @@ var changeEdgeDefinitionsForGraph = function(graph, edgeDefinition, newCollectio
/// *edgeDefinition* - [string] : the edge definition to replace the existing edge
/// definition with the same attribute *collection*.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__editEdgeDefinition}
/// var graph = require("org/arangodb/general-graph")
@ -3117,7 +3120,7 @@ Graph.prototype._editEdgeDefinitions = function(edgeDefinition) {
/// * *edgeCollectionName*: string - name of edge collection defined in *collection* of the edge
/// definition.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__deleteEdgeDefinition}
/// var graph = require("org/arangodb/general-graph")
@ -3183,7 +3186,7 @@ Graph.prototype._deleteEdgeDefinition = function(edgeCollection) {
/// * *vertexCollectionName* - string : name of vertex collection.
/// * *createCollection* - bool : if true the collection will be created if it does not exist. Default: true.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__addVertexCollection}
/// var graph = require("org/arangodb/general-graph")
@ -3237,7 +3240,7 @@ Graph.prototype._addVertexCollection = function(vertexCollectionName, createColl
///
/// `general-graph._orphanCollections()`
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__orphanCollections}
/// var graph = require("org/arangodb/general-graph")
@ -3268,7 +3271,7 @@ Graph.prototype._orphanCollections = function() {
/// *dropCollection*: bool (optional) - if true the collection will be dropped if it is
/// not used in any graph. Default: false.
///
/// @EXAMPLES
/// *Examples*
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__removeVertexCollections}
/// var graph = require("org/arangodb/general-graph")

View File

@ -264,7 +264,7 @@ Edge = function (graph, properties) {
///
/// Returns the identifier of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-id
////////////////////////////////////////////////////////////////////////////////
@ -280,7 +280,7 @@ Edge.prototype.getId = function () {
///
/// Returns the label of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-label
////////////////////////////////////////////////////////////////////////////////
@ -296,7 +296,7 @@ Edge.prototype.getLabel = function () {
///
/// Returns the property @FA{name} an @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-property
////////////////////////////////////////////////////////////////////////////////
@ -312,7 +312,7 @@ Edge.prototype.getProperty = function (name) {
///
/// Returns all propety names an @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-property-keys
////////////////////////////////////////////////////////////////////////////////
@ -328,7 +328,7 @@ Edge.prototype.getPropertyKeys = function () {
///
/// Returns all properties and their values of an @FA{edge}
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-properties
////////////////////////////////////////////////////////////////////////////////
@ -344,7 +344,7 @@ Edge.prototype.properties = function () {
///
/// Returns the vertex at the head of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-in-vertex
////////////////////////////////////////////////////////////////////////////////
@ -360,7 +360,7 @@ Edge.prototype.getInVertex = function () {
///
/// Returns the vertex at the tail of the @FA{edge}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-get-out-vertex
////////////////////////////////////////////////////////////////////////////////
@ -376,7 +376,7 @@ Edge.prototype.getOutVertex = function () {
///
/// Returns the peer vertex of the @FA{edge} and the @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arango> v1 = g.addVertex("1");
@ -480,7 +480,7 @@ Vertex = function (graph, properties) {
/// Creates a new edge from @FA{peer} to @FA{vertex} with given label and
/// properties defined in @FA{data}. Returns the edge object.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-add-in-edge
///
@ -509,7 +509,7 @@ Vertex.prototype.addInEdge = function (out, id, label, data) {
/// Creates a new edge from @FA{vertex} to @FA{peer} with given @FA{label} and
/// properties defined in @FA{data}. Returns the edge object.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-add-out-edge
///
@ -554,7 +554,7 @@ Vertex.prototype.outDegree = function () {
/// Returns the identifier of the @FA{vertex}. If the vertex was deleted, then
/// @LIT{undefined} is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-id
////////////////////////////////////////////////////////////////////////////////
@ -570,7 +570,7 @@ Vertex.prototype.getId = function () {
///
/// Returns the property @FA{name} a @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-property
////////////////////////////////////////////////////////////////////////////////
@ -586,7 +586,7 @@ Vertex.prototype.getProperty = function (name) {
///
/// Returns all propety names a @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-property-keys
////////////////////////////////////////////////////////////////////////////////
@ -602,7 +602,7 @@ Vertex.prototype.getPropertyKeys = function () {
///
/// Returns all properties and their values of a @FA{vertex}
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-properties
////////////////////////////////////////////////////////////////////////////////
@ -747,7 +747,7 @@ Graph.prototype.getOrAddVertex = function (id) {
/// label @FA{label} and contains the properties defined in @FA{data}.
/// out and in can either be vertices or their IDs
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-add-edge
///
@ -789,7 +789,7 @@ Graph.prototype.addEdge = function (out_vertex, in_vertex, id, label, data, wait
/// Creates a new vertex and returns the vertex object. The vertex contains
/// the properties defined in @FA{data}.
///
/// @EXAMPLES
/// *Examples*
///
/// Without any properties:
///

View File

@ -365,7 +365,7 @@ SimpleQuery.prototype.execute = function () {
/// In general the input to @FN{limit} should be sorted. Otherwise it will be
/// unclear which documents are used in the result set.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple2
////////////////////////////////////////////////////////////////////////////////
@ -398,7 +398,7 @@ SimpleQuery.prototype.limit = function (limit) {
/// In general the input to @FN{limit} should be sorted. Otherwise it will be
/// unclear which documents are used in the result set.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple8
////////////////////////////////////////////////////////////////////////////////
@ -507,7 +507,7 @@ SimpleQuery.prototype.setBatchSize = function (value) {
/// @note Not all simple queries support counting. In this case @LIT{null} is
/// returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Ignore any limit:
///
@ -537,7 +537,7 @@ SimpleQuery.prototype.count = function (applyPagination) {
/// documents. In this case the next document can be accessed using the
/// @FN{next} operator, which will advance the cursor.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple7
////////////////////////////////////////////////////////////////////////////////
@ -559,7 +559,7 @@ SimpleQuery.prototype.hasNext = function () {
/// will advance the underlying cursor. If you use @FN{next} on an
/// exhausted cursor, then @LIT{undefined} is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude simple5
////////////////////////////////////////////////////////////////////////////////

View File

@ -4358,7 +4358,7 @@ function GRAPH_PATHS (vertices, edgeCollection, direction, followCycles, minLeng
/// * Number *maxLength* : Defines the maximal length a path must
/// have to be returned (default is 10).
///
/// @EXAMPLES
/// *Examples*
///
/// Return all paths of the graph "social":
///
@ -5286,7 +5286,7 @@ function IS_EXAMPLE_SET (example) {
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that match one of
/// the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, shortest distance from all villages to other cities:
///
@ -5387,7 +5387,7 @@ function GRAPH_TRAVERSAL (vertexCollection,
/// are *outbound*, *inbound* and *any* (default).
/// * Object *options* : Optional options, see below:
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, start a traversal from Munich :
///
@ -5492,7 +5492,7 @@ function GRAPH_TRAVERSAL_TREE (vertexCollection,
/// This function is a wrapper of [GRAPH\_SHORTEST\_PATH](#SUBSUBSECTION GRAPH_SHORTEST_PATH).
/// It does not return the actual path but only the distance between two vertices.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, distance from all villages to other cities:
///
@ -5565,7 +5565,7 @@ function GENERAL_GRAPH_DISTANCE_TO (graphName,
/// contains the connection.
/// * Object *options* : Optional options, see below:
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, start a traversal from Munich :
///
@ -5740,7 +5740,7 @@ function GRAPH_NEIGHBORS (vertexCollection,
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the edges/vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all neighbors of locations with a distance of either
/// 700 or 600.:
@ -5863,7 +5863,7 @@ function GENERAL_GRAPH_NEIGHBORS (graphName,
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the edges/vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all edges to locations with a distance of either 700 or 600.:
///
@ -5938,7 +5938,7 @@ function GENERAL_GRAPH_EDGES (
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all vertices of the graph
///
@ -6053,7 +6053,7 @@ function TRANSFER_GENERAL_GRAPH_NEIGHBORS_RESULT (result) {
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all common neighbors of capitals.
///
@ -6170,7 +6170,7 @@ function GENERAL_GRAPH_COMMON_NEIGHBORS (
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, all locations with the same properties:
///
@ -6323,7 +6323,7 @@ function GENERAL_GRAPH_COMMON_PROPERTIES (
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the absolute eccentricity of all locations.
///
@ -6414,7 +6414,7 @@ function GENERAL_GRAPH_ABSOLUTE_ECCENTRICITY (graphName, vertexExample, options)
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the eccentricity of all locations.
///
@ -6512,7 +6512,7 @@ function GENERAL_GRAPH_ECCENTRICITY (graphName, options) {
/// * [{*key1* : *value1*}, {*key2* : *value2*}] : Returns the vertices that
/// match one of the examples.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the absolute closeness of all locations.
///
@ -6602,7 +6602,7 @@ function GENERAL_GRAPH_ABSOLUTE_CLOSENESS (graphName, vertexExample, options) {
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the closeness of all locations.
///
@ -6696,7 +6696,7 @@ function GENERAL_GRAPH_CLOSENESS (graphName, options) {
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the absolute betweenness of all locations.
///
@ -6804,7 +6804,7 @@ function GENERAL_GRAPH_ABSOLUTE_BETWEENNESS (graphName, options) {
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the betweenness of all locations.
///
@ -6891,7 +6891,7 @@ function GENERAL_GRAPH_BETWEENNESS (graphName, options) {
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the radius of the graph.
///
@ -6983,7 +6983,7 @@ function GENERAL_GRAPH_RADIUS (graphName, options) {
/// If no default is supplied the default would be positive Infinity so the path and
/// hence the eccentricity can not be calculated.
///
/// @EXAMPLES
/// *Examples*
///
/// A route planner example, the diameter of the graph.
///

View File

@ -145,7 +145,7 @@ ArangoCollection.prototype.truncate = function () {
///
/// Returns the index with @FA{index-handle} or null if no such index exists.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// arango> db.example.getIndexes().map(function(x) { return x.id; });
@ -512,7 +512,7 @@ ArangoCollection.prototype.last = function (count) {
///
/// As alternative you can supply a list of paths and values.
///
/// @EXAMPLES
/// *Examples*
///
/// @TINYEXAMPLE{shell-simple-query-first-example,finds a document with a given name}
////////////////////////////////////////////////////////////////////////////////
@ -1055,7 +1055,7 @@ ArangoCollection.prototype.ensureUndefBitarray = function () {
/// Note that this does not imply any restriction of the number of revisions
/// of documents.
///
/// @EXAMPLES
/// *Examples*
///
/// Restrict the number of document to at most 10 documents:
///
@ -1178,7 +1178,7 @@ ArangoCollection.prototype.ensureFulltextIndex = function (field, minLength) {
/// In case that the index was successfully created, the index identifier is
/// returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude shell-index-create-unique-constraint
////////////////////////////////////////////////////////////////////////////////
@ -1207,7 +1207,7 @@ ArangoCollection.prototype.ensureUniqueConstraint = function () {
/// In case that the index was successfully created, the index identifier
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude shell-index-create-hash-index
////////////////////////////////////////////////////////////////////////////////
@ -1253,7 +1253,7 @@ ArangoCollection.prototype.ensureHashIndex = function () {
/// In case that the index was successfully created, the index identifier
/// is returned.
///
/// @EXAMPLES
/// *Examples*
///
/// Create an geo index for a list attribute:
///

View File

@ -167,7 +167,7 @@ ArangoDatabase.prototype._query = function (query, bindVars, cursorOptions, opti
/// - @LIT{params}: optional arguments passed to the function specified in
/// @LIT{action}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude shell_transaction
////////////////////////////////////////////////////////////////////////////////
@ -301,7 +301,7 @@ ArangoDatabase.indexRegex = /^([a-zA-Z0-9\-_]+)\/([0-9]+)$/;
///
/// Returns the index with @FA{index-handle} or null if no such index exists.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude shell_index-read-db
////////////////////////////////////////////////////////////////////////////////
@ -357,7 +357,7 @@ ArangoDatabase.prototype._index = function(id) {
///
/// Drops the index with @FA{index-handle}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude shell_index-drop-index-db
////////////////////////////////////////////////////////////////////////////////

View File

@ -850,7 +850,7 @@ exports.Communication = function() {
///
/// This returns a singleton instance for the agency or creates it.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// agency = communication._createAgency();

View File

@ -110,7 +110,7 @@ BaseMiddleware = function () {
///
/// Set the status @FA{code} of your response, for example:
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// response.status(404);
@ -129,7 +129,7 @@ BaseMiddleware = function () {
///
/// Set a header attribute, for example:
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// response.set("Content-Length", 123);
@ -172,7 +172,7 @@ BaseMiddleware = function () {
/// Set the content type to JSON and the body to the JSON encoded @FA{object}
/// you provided.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// response.json({'born': 'December 12, 1915'});

View File

@ -54,7 +54,7 @@ var Controller,
///
/// * `urlPrefix`: All routes you define within will be prefixed with it.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app = new Controller(applicationContext, {
@ -206,7 +206,7 @@ extend(Controller.prototype, {
/// the user provided for `barn` via the `params` function (see the Request
/// object).
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.get('/goose/barn', function (req, res) {
@ -229,7 +229,7 @@ extend(Controller.prototype, {
/// This handles requests from the HTTP verb `post`. See above for the
/// arguments you can give.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.post('/goose/barn', function (req, res) {
@ -252,7 +252,7 @@ extend(Controller.prototype, {
/// This handles requests from the HTTP verb `put`. See above for the arguments
/// you can give.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.put('/goose/barn', function (req, res) {
@ -275,7 +275,7 @@ extend(Controller.prototype, {
/// This handles requests from the HTTP verb `patch`. See above for the
/// arguments you can give.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.patch('/goose/barn', function (req, res) {
@ -302,7 +302,7 @@ extend(Controller.prototype, {
/// therefore needs to be called as app['delete']. There is also an alias `del`
/// for this very reason.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app['delete']('/goose/barn', function (req, res) {
@ -336,7 +336,7 @@ extend(Controller.prototype, {
/// omit the path, the function will be executed before each request, no matter
/// the path. Your function gets a Request and a Response object.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.before('/high/way', function(req, res) {
@ -373,7 +373,7 @@ extend(Controller.prototype, {
/// This works pretty similar to the before function. But it acts after the
/// execution of the handlers (Big surprise, I suppose).
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.after('/high/way', function(req, res) {
@ -438,7 +438,7 @@ extend(Controller.prototype, {
/// * `sessionLifetime`: An integer. Lifetime of sessions in seconds.
///
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.activateAuthentication({
@ -479,7 +479,7 @@ extend(Controller.prototype, {
/// "Username or Password was wrong".
/// Both `onSuccess` and `onError` should take request and result as arguments.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.login('/login', {
@ -514,7 +514,7 @@ extend(Controller.prototype, {
/// Both `onSuccess` and `onError` should take request and result as arguments.
///
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.logout('/logout', {
@ -557,7 +557,7 @@ extend(Controller.prototype, {
/// (for example `admin`) use the option `defaultAttributes` which should be a hash
/// mapping attribute names to default values.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.register('/logout', {
@ -598,7 +598,7 @@ extend(Controller.prototype, {
/// "No session was found".
/// Both `onSuccess` and `onError` should take request and result as arguments.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.changePassword('/changePassword', {

View File

@ -46,7 +46,7 @@ var is = require("org/arangodb/is"),
/// following function (which is only internal, and not exported) you can create
/// an UrlObject with a given URL, a constraint and a method. For example:
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// internal.constructUrlObject('/lecker/gans', null, 'get');

View File

@ -48,7 +48,7 @@ var Model,
///
/// If you initialize a model, you can give it initial @FA{data} as an object.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// instance = new Model({
@ -171,7 +171,7 @@ _.extend(Model.prototype, {
///
/// Get the value of an attribute
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// instance = new Model({
@ -195,7 +195,7 @@ _.extend(Model.prototype, {
///
/// Set the value of an attribute or multiple attributes at once
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// instance = new Model({
@ -226,7 +226,7 @@ _.extend(Model.prototype, {
///
/// Returns true if the attribute is set to a non-null or non-undefined value.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// instance = new Model({

View File

@ -201,7 +201,7 @@ extend(RequestContext.prototype, {
///
/// You can also provide a description of this parameter.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.get("/foxx/:id", function {
@ -245,7 +245,7 @@ extend(RequestContext.prototype, {
/// You can also provide a description of this parameter, if it is required and
/// if you can provide the parameter multiple times.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.get("/foxx", function {
@ -363,7 +363,7 @@ extend(RequestContext.prototype, {
///
/// It also adds documentation for this error response to the generated documentation.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
///
@ -407,7 +407,7 @@ extend(RequestContext.prototype, {
/// not be executed. Provide an `errorResponse` to define the behavior in this case.
/// This can be used for authentication or authorization for example.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.get("/foxx", function {
@ -433,7 +433,7 @@ extend(RequestContext.prototype, {
/// the status code and the reason you provided (the route handler won't be called).
/// This will also add the according documentation for this route.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.get("/foxx", function {
@ -489,7 +489,7 @@ _.each([
/// Defines an `errorResponse` for all routes of this controller. For details on
/// `errorResponse` see the according method on routes.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.allroutes.errorResponse(FoxxyError, 303, "This went completely wrong. Sorry!");
@ -510,7 +510,7 @@ _.each([
/// Defines an `onlyIf` for all routes of this controller. For details on
/// `onlyIf` see the according method on routes.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.allroutes.onlyIf(myPersonalCheck);
@ -531,7 +531,7 @@ _.each([
/// Defines an `onlyIfAuthenticated` for all routes of this controller. For details on
/// `onlyIfAuthenticated` see the according method on routes.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// app.allroutes.onlyIfAuthenticated(401, "You need to be authenticated");

View File

@ -40,7 +40,7 @@ var TemplateMiddleware,
/// a set of helper functions.
/// Then use `before` to attach the initialized middleware to your Foxx.Controller
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// templateMiddleware = new TemplateMiddleware("templates", {
@ -73,7 +73,7 @@ TemplateMiddleware = function (templateCollection, helper) {
/// search by the path attribute. It will then render the template with the
/// given data.
///
/// @EXAMPLES
/// *Examples*
///
/// @code
/// response.render("high/way", {username: 'Application'})

View File

@ -103,7 +103,7 @@ var findOrCreateEdgeCollectionByName = function (name) {
///
/// Changes or sets the property @FA{name} an @FA{edges} to @FA{value}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-edge-set-property
////////////////////////////////////////////////////////////////////////////////
@ -140,7 +140,7 @@ Edge.prototype.setProperty = function (name, value) {
///
/// Returns a list of in- or outbound edges of the @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-edges
////////////////////////////////////////////////////////////////////////////////
@ -160,7 +160,7 @@ Vertex.prototype.edges = function () {
///
/// Returns a list of inbound edges of the @FA{vertex} with given label(s).
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-in-edges
////////////////////////////////////////////////////////////////////////////////
@ -185,7 +185,7 @@ Vertex.prototype.getInEdges = function () {
///
/// Returns a list of outbound edges of the @FA{vertex} with given label(s).
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-get-out-edges
////////////////////////////////////////////////////////////////////////////////
@ -232,7 +232,7 @@ Vertex.prototype.getEdges = function () {
///
/// Returns a list of inbound edges of the @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-inbound
////////////////////////////////////////////////////////////////////////////////
@ -252,7 +252,7 @@ Vertex.prototype.inbound = function () {
///
/// Returns a list of outbound edges of the @FA{vertex}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-outbound
////////////////////////////////////////////////////////////////////////////////
@ -272,7 +272,7 @@ Vertex.prototype.outbound = function () {
///
/// Changes or sets the property @FA{name} a @FA{vertex} to @FA{value}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-vertex-set-property
////////////////////////////////////////////////////////////////////////////////
@ -312,7 +312,7 @@ Vertex.prototype.setProperty = function (name, value) {
///
/// Returns a known graph.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-constructor
////////////////////////////////////////////////////////////////////////////////
@ -603,7 +603,7 @@ Graph.prototype._replaceEdge = function (edge_id, data) {
///
/// Returns the vertex identified by @FA{id} or @LIT{null}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-get-vertex
////////////////////////////////////////////////////////////////////////////////
@ -625,7 +625,7 @@ Graph.prototype.getVertex = function (id) {
/// Returns an iterator for all vertices of the graph. The iterator supports the
/// methods @FN{hasNext} and @FN{next}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-get-vertices
////////////////////////////////////////////////////////////////////////////////
@ -647,7 +647,7 @@ Graph.prototype.getVertices = function () {
///
/// Returns the edge identified by @FA{id} or @LIT{null}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-get-edge
////////////////////////////////////////////////////////////////////////////////
@ -682,7 +682,7 @@ Graph.prototype.getEdge = function (id) {
/// Returns an iterator for all edges of the graph. The iterator supports the
/// methods @FN{hasNext} and @FN{next}.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-get-edges
////////////////////////////////////////////////////////////////////////////////
@ -703,7 +703,7 @@ Graph.prototype.getEdges = function () {
///
/// Deletes the @FA{vertex} and all its edges.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-remove-vertex
////////////////////////////////////////////////////////////////////////////////
@ -735,7 +735,7 @@ Graph.prototype.removeVertex = function (vertex, waitForSync) {
///
/// Deletes the @FA{edge}. Note that the in and out vertices are left untouched.
///
/// @EXAMPLES
/// *Examples*
///
/// @verbinclude graph-graph-remove-edge
////////////////////////////////////////////////////////////////////////////////