mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
34cd589908
|
@ -8,6 +8,10 @@ As an example you can start with a set of vertices, select their direct neighbor
|
|||
The result of this query will be the set of outgoing edges.
|
||||
For each part of the query it is possible to further refine the resulting set of elements by giving examples for them.
|
||||
|
||||
!SECTION Definition of examples
|
||||
|
||||
@startDocuBlock JSF_general_graph_example_description
|
||||
|
||||
!SECTION Starting Points
|
||||
|
||||
This section describes the entry points for the fluent interface.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +1,19 @@
|
|||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||
# define YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED
|
||||
/* Enabling traces. */
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
|
@ -40,119 +40,105 @@
|
|||
extern int Ahuacatldebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
T_END = 0,
|
||||
T_FOR = 258,
|
||||
T_LET = 259,
|
||||
T_FILTER = 260,
|
||||
T_RETURN = 261,
|
||||
T_COLLECT = 262,
|
||||
T_SORT = 263,
|
||||
T_LIMIT = 264,
|
||||
T_ASC = 265,
|
||||
T_DESC = 266,
|
||||
T_IN = 267,
|
||||
T_INTO = 268,
|
||||
T_WITH = 269,
|
||||
T_REMOVE = 270,
|
||||
T_INSERT = 271,
|
||||
T_UPDATE = 272,
|
||||
T_REPLACE = 273,
|
||||
T_NULL = 274,
|
||||
T_TRUE = 275,
|
||||
T_FALSE = 276,
|
||||
T_STRING = 277,
|
||||
T_QUOTED_STRING = 278,
|
||||
T_INTEGER = 279,
|
||||
T_DOUBLE = 280,
|
||||
T_PARAMETER = 281,
|
||||
T_ASSIGN = 282,
|
||||
T_NOT = 283,
|
||||
T_AND = 284,
|
||||
T_OR = 285,
|
||||
T_EQ = 286,
|
||||
T_NE = 287,
|
||||
T_LT = 288,
|
||||
T_GT = 289,
|
||||
T_LE = 290,
|
||||
T_GE = 291,
|
||||
T_PLUS = 292,
|
||||
T_MINUS = 293,
|
||||
T_TIMES = 294,
|
||||
T_DIV = 295,
|
||||
T_MOD = 296,
|
||||
T_EXPAND = 297,
|
||||
T_QUESTION = 298,
|
||||
T_COLON = 299,
|
||||
T_SCOPE = 300,
|
||||
T_RANGE = 301,
|
||||
T_COMMA = 302,
|
||||
T_OPEN = 303,
|
||||
T_CLOSE = 304,
|
||||
T_DOC_OPEN = 305,
|
||||
T_DOC_CLOSE = 306,
|
||||
T_LIST_OPEN = 307,
|
||||
T_LIST_CLOSE = 308,
|
||||
UPLUS = 309,
|
||||
UMINUS = 310,
|
||||
FUNCCALL = 311,
|
||||
REFERENCE = 312,
|
||||
INDEXED = 313
|
||||
};
|
||||
enum yytokentype
|
||||
{
|
||||
T_END = 0,
|
||||
T_FOR = 258,
|
||||
T_LET = 259,
|
||||
T_FILTER = 260,
|
||||
T_RETURN = 261,
|
||||
T_COLLECT = 262,
|
||||
T_SORT = 263,
|
||||
T_LIMIT = 264,
|
||||
T_ASC = 265,
|
||||
T_DESC = 266,
|
||||
T_IN = 267,
|
||||
T_INTO = 268,
|
||||
T_WITH = 269,
|
||||
T_REMOVE = 270,
|
||||
T_INSERT = 271,
|
||||
T_UPDATE = 272,
|
||||
T_REPLACE = 273,
|
||||
T_NULL = 274,
|
||||
T_TRUE = 275,
|
||||
T_FALSE = 276,
|
||||
T_STRING = 277,
|
||||
T_QUOTED_STRING = 278,
|
||||
T_INTEGER = 279,
|
||||
T_DOUBLE = 280,
|
||||
T_PARAMETER = 281,
|
||||
T_ASSIGN = 282,
|
||||
T_NOT = 283,
|
||||
T_AND = 284,
|
||||
T_OR = 285,
|
||||
T_EQ = 286,
|
||||
T_NE = 287,
|
||||
T_LT = 288,
|
||||
T_GT = 289,
|
||||
T_LE = 290,
|
||||
T_GE = 291,
|
||||
T_PLUS = 292,
|
||||
T_MINUS = 293,
|
||||
T_TIMES = 294,
|
||||
T_DIV = 295,
|
||||
T_MOD = 296,
|
||||
T_EXPAND = 297,
|
||||
T_QUESTION = 298,
|
||||
T_COLON = 299,
|
||||
T_SCOPE = 300,
|
||||
T_RANGE = 301,
|
||||
T_COMMA = 302,
|
||||
T_OPEN = 303,
|
||||
T_CLOSE = 304,
|
||||
T_DOC_OPEN = 305,
|
||||
T_DOC_CLOSE = 306,
|
||||
T_LIST_OPEN = 307,
|
||||
T_LIST_CLOSE = 308,
|
||||
UMINUS = 309,
|
||||
UPLUS = 310,
|
||||
FUNCCALL = 311,
|
||||
REFERENCE = 312,
|
||||
INDEXED = 313
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
union YYSTYPE
|
||||
{
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y"
|
||||
#line 26 "arangod/Ahuacatl/ahuacatl-grammar.y" /* yacc.c:1909 */
|
||||
|
||||
TRI_aql_node_t* node;
|
||||
char* strval;
|
||||
bool boolval;
|
||||
int64_t intval;
|
||||
|
||||
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 124 "arangod/Ahuacatl/ahuacatl-grammar.h"
|
||||
} YYSTYPE;
|
||||
#line 121 "arangod/Ahuacatl/ahuacatl-grammar.h" /* yacc.c:1909 */
|
||||
};
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
/* Location type. */
|
||||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
|
||||
typedef struct YYLTYPE
|
||||
typedef struct YYLTYPE YYLTYPE;
|
||||
struct YYLTYPE
|
||||
{
|
||||
int first_line;
|
||||
int first_column;
|
||||
int last_line;
|
||||
int last_column;
|
||||
} YYLTYPE;
|
||||
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
|
||||
};
|
||||
# define YYLTYPE_IS_DECLARED 1
|
||||
# define YYLTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int Ahuacatlparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int Ahuacatlparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
|
||||
int Ahuacatlparse (TRI_aql_context_t* const context);
|
||||
#else
|
||||
int Ahuacatlparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_AHUACATL_ARANGOD_AHUACATL_AHUACATL_GRAMMAR_H_INCLUDED */
|
||||
|
|
|
@ -1001,7 +1001,7 @@ int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) {
|
|||
context->_context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
||||
|
||||
// run tests
|
||||
char const* input = "require(\"test_runner\").runCommandLineTests();";
|
||||
char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();";
|
||||
TRI_ExecuteJavaScriptString(context->_context, v8::String::New(input), name, true);
|
||||
|
||||
if (tryCatch.HasCaught()) {
|
||||
|
|
|
@ -882,8 +882,8 @@ DocumentMarker::DocumentMarker (TRI_voc_tick_t databaseId,
|
|||
m->_shape = shapedJson->_sid;
|
||||
|
||||
m->_offsetKey = sizeof(document_marker_t); // start position of key
|
||||
m->_offsetLegend = m->_offsetKey + alignedSize(key.size() + 1);
|
||||
m->_offsetJson = m->_offsetLegend + alignedSize(legend.getSize());
|
||||
m->_offsetLegend = static_cast<uint16_t>(m->_offsetKey + alignedSize(key.size() + 1));
|
||||
m->_offsetJson = static_cast<uint32_t>(m->_offsetLegend + alignedSize(legend.getSize()));
|
||||
|
||||
storeSizedString(m->_offsetKey, key);
|
||||
|
||||
|
@ -1016,10 +1016,10 @@ EdgeMarker::EdgeMarker (TRI_voc_tick_t databaseId,
|
|||
m->_offsetKey = sizeof(edge_marker_t); // start position of key
|
||||
m->_toCid = edge->_toCid;
|
||||
m->_fromCid = edge->_fromCid;
|
||||
m->_offsetToKey = m->_offsetKey + alignedSize(key.size() + 1);
|
||||
m->_offsetFromKey = m->_offsetToKey + alignedSize(strlen(edge->_toKey) + 1);
|
||||
m->_offsetLegend = m->_offsetFromKey + alignedSize(strlen(edge->_fromKey) + 1);
|
||||
m->_offsetJson = m->_offsetLegend + alignedSize(legend.getSize());
|
||||
m->_offsetToKey = static_cast<uint16_t>(m->_offsetKey + alignedSize(key.size() + 1));
|
||||
m->_offsetFromKey = static_cast<uint16_t>(m->_offsetToKey + alignedSize(strlen(edge->_toKey) + 1));
|
||||
m->_offsetLegend = static_cast<uint16_t>(m->_offsetFromKey + alignedSize(strlen(edge->_fromKey) + 1));
|
||||
m->_offsetJson = static_cast<uint32_t>(m->_offsetLegend + alignedSize(legend.getSize()));
|
||||
|
||||
// store keys
|
||||
storeSizedString(m->_offsetKey, key.c_str());
|
||||
|
|
|
@ -1589,7 +1589,7 @@ static bool RunUnitTests (v8::Handle<v8::Context> context) {
|
|||
context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
||||
|
||||
// run tests
|
||||
char const* input = "require(\"test_runner\").runCommandLineTests();";
|
||||
char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();";
|
||||
v8::Local<v8::String> name(v8::String::New("(arangosh)"));
|
||||
TRI_ExecuteJavaScriptString(context, v8::String::New(input), name, true);
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ mv ${PREFIX}.hpp ${PREFIX}.h || exit 1
|
|||
|
||||
sed -e 's:\.hpp:.h:' < ${OUTPUT} \
|
||||
| sed -e 's:# if YYENABLE_NLS:# if defined(YYENABLE_NLS) \&\& YYENABLE_NLS:' \
|
||||
| sed -e 's:__attribute__((__unused__)):' \
|
||||
> ${OUTPUT}.tmp
|
||||
|
||||
# give some information
|
||||
|
|
|
@ -53,6 +53,26 @@
|
|||
return result;
|
||||
},
|
||||
|
||||
gitInfo: function (key) {
|
||||
var result;
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "GET",
|
||||
async: false, // sequential calls!
|
||||
url: "/_admin/aardvark/foxxes/gitinfo/"+key,
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function(data) {
|
||||
result = data;
|
||||
},
|
||||
error: function(data) {
|
||||
result = data;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
purgeFoxx: function (key) {
|
||||
var msg, url = "/_admin/aardvark/foxxes/purge/"+key;
|
||||
$.ajax({
|
||||
|
|
|
@ -183,6 +183,22 @@ var wrapCollection = function(col) {
|
|||
return wrapper;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_example_description
|
||||
///
|
||||
/// For many of the following functions *examples* can be passed in as a parameter.
|
||||
/// *Examples* are used to filter the result set for objects that match the conditions.
|
||||
/// These *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all found results are valid.
|
||||
/// * A string, only the result having this value as it's *_id* is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only results having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All results matching at least one of the elements in the list are returned.
|
||||
///
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var transformExample = function(example) {
|
||||
if (example === undefined) {
|
||||
|
@ -404,16 +420,16 @@ AQLGenerator.prototype._edges = function(edgeExample, options) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_edges
|
||||
/// Select all edges for the vertices selected before.
|
||||
/// `graph_query.edges(examples)`
|
||||
/// *Select all edges for the vertices selected before.*
|
||||
///
|
||||
/// `graph-query.edges(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all edges for each of the vertices selected
|
||||
/// in the step before.
|
||||
/// This will include *inbound* as well as *outbound* edges.
|
||||
/// The resulting set of edges can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
/// * *examples*: See #definition_of_examples
|
||||
///
|
||||
/// * Empty, there is no matching executed all edges are valid.
|
||||
/// * A string, only the edge having this value as it's id is returned.
|
||||
|
@ -461,9 +477,9 @@ AQLGenerator.prototype.edges = function(example) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_outEdges
|
||||
/// Select all outbound edges for the vertices selected before.
|
||||
/// `graph_query.outEdges(examples)`
|
||||
/// *Select all outbound edges for the vertices selected before.*
|
||||
///
|
||||
/// `graph-query.outEdges(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all *outbound* edges for each of the vertices selected
|
||||
/// in the step before.
|
||||
|
|
|
@ -40,6 +40,14 @@
|
|||
)
|
||||
];
|
||||
var buttonInfoConfig = [
|
||||
window.modalView.createDeleteButton(
|
||||
"Remove", this.confirmRemovalSingle.bind(this)
|
||||
),
|
||||
window.modalView.createSuccessButton(
|
||||
"Install", this.installDialog.bind(this)
|
||||
)
|
||||
];
|
||||
var buttonInfoConfigUpdate = [
|
||||
window.modalView.createDeleteButton(
|
||||
"Remove", this.confirmRemovalSingle.bind(this)
|
||||
),
|
||||
|
@ -51,6 +59,17 @@
|
|||
)
|
||||
];
|
||||
var buttonInfoMultipleVersionsConfig = [
|
||||
window.modalView.createDeleteButton(
|
||||
"Remove All", this.confirmRemovalAll.bind(this)
|
||||
),
|
||||
window.modalView.createDeleteButton(
|
||||
"Remove", this.confirmRemovalSingle.bind(this)
|
||||
),
|
||||
window.modalView.createSuccessButton(
|
||||
"Install", this.installDialog.bind(this)
|
||||
)
|
||||
];
|
||||
var buttonInfoMultipleVersionsConfigUpdate = [
|
||||
window.modalView.createDeleteButton(
|
||||
"Remove All", this.confirmRemovalAll.bind(this)
|
||||
),
|
||||
|
@ -78,12 +97,24 @@
|
|||
"Application Settings",
|
||||
buttonInfoConfig
|
||||
);
|
||||
this.showInfoModUpdate = window.modalView.show.bind(
|
||||
window.modalView,
|
||||
"modalTable.ejs",
|
||||
"Application Settings",
|
||||
buttonInfoConfigUpdate
|
||||
);
|
||||
this.showInfoMultipleVersionsMod = window.modalView.show.bind(
|
||||
window.modalView,
|
||||
"modalTable.ejs",
|
||||
"Application Settings",
|
||||
buttonInfoMultipleVersionsConfig
|
||||
);
|
||||
this.showInfoMultipleVersionsModUpdate = window.modalView.show.bind(
|
||||
window.modalView,
|
||||
"modalTable.ejs",
|
||||
"Application Settings",
|
||||
buttonInfoMultipleVersionsConfigUpdate
|
||||
);
|
||||
this.showSystemInfoMod = window.modalView.show.bind(
|
||||
window.modalView,
|
||||
"modalTable.ejs",
|
||||
|
@ -267,7 +298,15 @@
|
|||
},
|
||||
|
||||
infoDialog: function(event) {
|
||||
var versions, isSystem = false;
|
||||
var name = this.model.get("name"),
|
||||
mountinfo = this.model.collection.gitInfo(name),
|
||||
versions, isSystem = false, isGit;
|
||||
|
||||
if (mountinfo.git === true) {
|
||||
this.model.set("isGit", mountinfo.git);
|
||||
this.model.set("gitUrl", mountinfo.url);
|
||||
}
|
||||
|
||||
if (this.model.get("isSystem")) {
|
||||
isSystem = true;
|
||||
} else {
|
||||
|
@ -275,14 +314,21 @@
|
|||
}
|
||||
|
||||
versions = this.model.get("versions");
|
||||
isGit = this.model.get("isGit");
|
||||
|
||||
event.stopPropagation();
|
||||
if (isSystem === false && !versions) {
|
||||
if (isSystem === false && !versions && !isGit) {
|
||||
this.showInfoMod(this.fillInfoValues());
|
||||
}
|
||||
else if (isSystem === false && versions) {
|
||||
else if (isSystem === false && !versions && isGit) {
|
||||
this.showInfoModUpdate(this.fillInfoValues());
|
||||
}
|
||||
else if (isSystem === false && versions && !isGit) {
|
||||
this.showInfoMultipleVersionsMod(this.fillInfoValues());
|
||||
}
|
||||
else if (isSystem === false && versions && isGit) {
|
||||
this.showInfoMultipleVersionsModUpdate(this.fillInfoValues());
|
||||
}
|
||||
else {
|
||||
this.showSystemInfoMod(this.fillInfoValues());
|
||||
}
|
||||
|
@ -301,9 +347,9 @@
|
|||
},
|
||||
|
||||
update: function() {
|
||||
var url = this.model.get("git"),
|
||||
name = '',
|
||||
var url = this.model.get("gitUrl"),
|
||||
version = 'master',
|
||||
name = '',
|
||||
result;
|
||||
|
||||
if (url === undefined || url === '') {
|
||||
|
@ -311,7 +357,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
result = this.collection.installFoxxFromGithub(url, name, version);
|
||||
result = this.model.collection.installFoxxFromGithub(url, name, version);
|
||||
if (result === true) {
|
||||
window.modalView.hide();
|
||||
window.App.applicationsView.reload();
|
||||
|
|
|
@ -183,6 +183,22 @@ var wrapCollection = function(col) {
|
|||
return wrapper;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_example_description
|
||||
///
|
||||
/// For many of the following functions *examples* can be passed in as a parameter.
|
||||
/// *Examples* are used to filter the result set for objects that match the conditions.
|
||||
/// These *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all found results are valid.
|
||||
/// * A string, only the result having this value as it's *_id* is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only results having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All results matching at least one of the elements in the list are returned.
|
||||
///
|
||||
/// @endDocuBlock
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var transformExample = function(example) {
|
||||
if (example === undefined) {
|
||||
|
@ -404,23 +420,16 @@ AQLGenerator.prototype._edges = function(edgeExample, options) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_edges
|
||||
/// Select all edges for the vertices selected before.
|
||||
/// `graph_query.edges(examples)`
|
||||
/// *Select all edges for the vertices selected before.*
|
||||
///
|
||||
/// `graph-query.edges(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all edges for each of the vertices selected
|
||||
/// in the step before.
|
||||
/// This will include *inbound* as well as *outbound* edges.
|
||||
/// The resulting set of edges can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all edges are valid.
|
||||
/// * A string, only the edge having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only edges having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All edges matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -461,22 +470,15 @@ AQLGenerator.prototype.edges = function(example) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_outEdges
|
||||
/// Select all outbound edges for the vertices selected before.
|
||||
/// `graph_query.outEdges(examples)`
|
||||
/// *Select all outbound edges for the vertices selected before.*
|
||||
///
|
||||
/// `graph-query.outEdges(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all *outbound* edges for each of the vertices selected
|
||||
/// in the step before.
|
||||
/// The resulting set of edges can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all edges are valid.
|
||||
/// * A string, only the edge having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only edges having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All edges matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -517,22 +519,15 @@ AQLGenerator.prototype.outEdges = function(example) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_inEdges
|
||||
/// Select all inbound edges for the vertices selected before.
|
||||
/// `graph_query.inEdges(examples)`
|
||||
/// *Select all inbound edges for the vertices selected before.*
|
||||
///
|
||||
/// `graph-query.inEdges(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all *inbound* edges for each of the vertices selected
|
||||
/// in the step before.
|
||||
/// The resulting set of edges can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all edges are valid.
|
||||
/// * A string, only the edge having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only edges having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All edges matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -603,23 +598,16 @@ AQLGenerator.prototype._vertices = function(example, options) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_vertices
|
||||
/// Select all vertices connected to the edges selected before.
|
||||
/// `graph_query.vertices(examples)`
|
||||
/// *Select all vertices connected to the edges selected before.*
|
||||
///
|
||||
/// `graph-query.vertices(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all vertices for each of the edges selected
|
||||
/// in the step before.
|
||||
/// This includes all vertices contained in *_from* as well as *_to* attribute of the edges.
|
||||
/// The resulting set of vertices can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all vertices are valid.
|
||||
/// * A string, only the vertex having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only vertices having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All vertices matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -673,23 +661,16 @@ AQLGenerator.prototype.vertices = function(example) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_fromVertices
|
||||
/// Select all vertices where the edges selected before start.
|
||||
/// `graph_query.vertices(examples)`
|
||||
/// *Select all vertices where the edges selected before start.*
|
||||
///
|
||||
/// `graph-query.vertices(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select the set of vertices where the edges selected
|
||||
/// in the step before start at.
|
||||
/// This includes all vertices contained in *_from* attribute of the edges.
|
||||
/// The resulting set of vertices can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all vertices are valid.
|
||||
/// * A string, only the vertex having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only vertices having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All vertices matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -741,23 +722,16 @@ AQLGenerator.prototype.fromVertices = function(example) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_toVertices
|
||||
/// Select all vertices targeted by the edges selected before.
|
||||
/// `graph_query.vertices(examples)`
|
||||
/// *Select all vertices targeted by the edges selected before.*
|
||||
///
|
||||
/// `graph-query.vertices(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select the set of vertices where the edges selected
|
||||
/// in the step before end in.
|
||||
/// This includes all vertices contained in *_to* attribute of the edges.
|
||||
/// The resulting set of vertices can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all vertices are valid.
|
||||
/// * A string, only the vertex having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only vertices having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All vertices matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -826,7 +800,8 @@ AQLGenerator.prototype.getLastVar = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_path
|
||||
/// The result of the query is the path to all elements.
|
||||
/// `graph_query.path()`
|
||||
/// *The result of the query is the path to all elements.*
|
||||
///
|
||||
/// By defaut the result of the generated AQL query is the set of elements passing the last matches.
|
||||
/// So having a `vertices()` query as the last step the result will be set of vertices.
|
||||
|
@ -879,35 +854,25 @@ AQLGenerator.prototype.pathEdges = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_neighbors
|
||||
/// Select all neighbors of the vertices selected in the step before.
|
||||
/// `graph_query.neighbors(examples, options)`
|
||||
/// *Select all neighbors of the vertices selected in the step before.*
|
||||
///
|
||||
/// `graph-query.neighbors(examples)`
|
||||
///
|
||||
/// Creates an AQL statement to select all neighbors for each of the vertices selected
|
||||
/// in the step before.
|
||||
/// The resulting set of vertices can be filtered by defining one or more *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * Empty, there is no matching executed all vertices are valid.
|
||||
/// * A string, only the vertex having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only vertices having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All vertices matching at least one of the elements in the list are returned.
|
||||
/// Possible options and there defaults:
|
||||
/// * String *direction* : The direction of the
|
||||
/// edges. Possible values are *outbound*, *inbound* and *any* (default).
|
||||
/// * String|Object|Array *edgeExamples* : A filter example
|
||||
/// for the edges to the neighbors (see below).
|
||||
/// * String|Array *edgeCollectionRestriction* : One or multiple
|
||||
/// edge collections that should be considered.
|
||||
/// * String|Array *vertexCollectionRestriction* : One or multiple
|
||||
/// vertex collections that should be considered.
|
||||
/// * Number *minDepth* : Defines the minimal
|
||||
/// depth a path to a neighbor must have to be returned (default is 1).
|
||||
/// * Number *maxDepth* : Defines the maximal
|
||||
/// depth a path to a neighbor must have to be returned (default is 1).
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
/// * *options* (optional): An object defining further options. Can have the following values:
|
||||
/// Possible options and their defaults:
|
||||
/// * *direction*: The direction of the edges. Possible values are *outbound*, *inbound* and *any* (default).
|
||||
/// * *edgeExamples*: See [Definition of examples](#definition_of_examples)
|
||||
/// * *edgeCollectionRestriction* : One or a list of edge-collection names that should be
|
||||
/// considered to be on the path.
|
||||
/// * *vertexCollectionRestriction* : One or a list of vertex-collection names that should be
|
||||
/// considered on the intermediate vertex steps.
|
||||
/// * *minDepth*: Defines the minimal number of intermediate steps to neighbors (default is 1).
|
||||
/// * *maxDepth*: Defines the maximal number of intermediate steps to neighbors (default is 1).
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -990,10 +955,10 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_restrict
|
||||
/// Restricts the last statement in the chain to return
|
||||
/// only elements of a specified set of collections
|
||||
/// `graph_query.restrict(restrictions)`
|
||||
/// *Restricts the last statement in the chain to return
|
||||
/// only elements of a specified set of collections*
|
||||
///
|
||||
/// `graph-query.restrict(restrictions)`
|
||||
///
|
||||
/// By default all collections in the graph are searched for matching elements
|
||||
/// whenever vertices and edges are requested.
|
||||
|
@ -1002,12 +967,8 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() {
|
|||
/// Restriction is only applied to this one part of the query.
|
||||
/// It does not effect earlier or later statements.
|
||||
///
|
||||
/// *restrictions* can have the following values:
|
||||
///
|
||||
/// * A string defining the name of one specific collection in the graph.
|
||||
/// Only elements from this collection are used for matching
|
||||
/// * A list of strings defining a set of collection names.
|
||||
/// Elements from all collections in this set are used for matching
|
||||
/// * *restrictions*: Define either one or a list of collections in the graph.
|
||||
/// Only elements from these collections are taken into account for the result.
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1071,20 +1032,13 @@ AQLGenerator.prototype.restrict = function(restrictions) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_filter
|
||||
/// Filter the result of the query
|
||||
///
|
||||
/// `graph-query.filter(examples)`
|
||||
/// `graph_query.filter(examples)`
|
||||
/// *Filter the result of the query*
|
||||
///
|
||||
/// This can be used to further specfiy the expected result of the query.
|
||||
/// The result set is reduced to the set of elements that matches the given *examples*.
|
||||
///
|
||||
/// *examples* can have the following values:
|
||||
///
|
||||
/// * A string, only the elements having this value as it's id is returned.
|
||||
/// * An example object, defining a set of attributes.
|
||||
/// Only elements having these attributes are matched.
|
||||
/// * A list containing example objects and/or strings.
|
||||
/// All elements matching at least one of the elements in the list are returned.
|
||||
/// * *examples*: See [Definition of examples](#definition_of_examples)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1171,9 +1125,9 @@ AQLGenerator.prototype.execute = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_toArray
|
||||
/// Returns an array containing the complete result.
|
||||
/// `graph_query.toArray()`
|
||||
/// *Returns an array containing the complete result.*
|
||||
///
|
||||
/// `graph-query.toArray()`
|
||||
///
|
||||
/// This function executes the generated query and returns the
|
||||
/// entire result as one array.
|
||||
|
@ -1203,9 +1157,8 @@ AQLGenerator.prototype.toArray = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_count
|
||||
/// Returns the number of returned elements if the query is executed.
|
||||
///
|
||||
/// `graph-query.count()`
|
||||
/// `graph_query.count()`
|
||||
/// *Returns the number of returned elements if the query is executed.*
|
||||
///
|
||||
/// This function determines the amount of elements to be expected within the result of the query.
|
||||
/// It can be used at the beginning of execution of the query
|
||||
|
@ -1234,9 +1187,8 @@ AQLGenerator.prototype.count = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_hasNext
|
||||
/// Checks if the query has further results.
|
||||
///
|
||||
/// `graph-query.neighbors(examples)`
|
||||
/// `graph_query.neighbors(examples)`
|
||||
/// *Checks if the query has further results.*
|
||||
///
|
||||
/// The generated statement maintains a cursor for you.
|
||||
/// If this cursor is already present *hasNext()* will
|
||||
|
@ -1275,9 +1227,8 @@ AQLGenerator.prototype.hasNext = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_fluent_aql_next
|
||||
/// Request the next element in the result.
|
||||
///
|
||||
/// `graph-query.next()`
|
||||
/// `graph_query.next()`
|
||||
/// *Request the next element in the result.*
|
||||
///
|
||||
/// The generated statement maintains a cursor for you.
|
||||
/// If this cursor is already present *next()* will
|
||||
|
@ -1325,8 +1276,7 @@ AQLGenerator.prototype.next = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_undirectedRelation
|
||||
///
|
||||
/// `general-graph._undirectedRelation(relationName, vertexCollections)`
|
||||
/// `graph_module._undirectedRelation(relationName, vertexCollections)`
|
||||
/// *Define an undirected relation.*
|
||||
///
|
||||
/// Defines an undirected relation with the name *relationName* using the
|
||||
|
@ -1334,6 +1284,11 @@ AQLGenerator.prototype.next = function() {
|
|||
/// edges in any direction between any pair of vertices within the
|
||||
/// *vertexCollections*.
|
||||
///
|
||||
/// * *relationName*: The name of the edge collection where the edges should be stored.
|
||||
/// Will be created if it does not yet exist.
|
||||
/// * *vertexCollections*: One or a list of collection names for which connections are allowed.
|
||||
/// Will be created if they do not exist.
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
/// To define simple relation with only one vertex collection:
|
||||
|
@ -1385,13 +1340,9 @@ var _undirectedRelation = function (relationName, vertexCollections) {
|
|||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Define an directed relation.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_directedRelation
|
||||
///
|
||||
/// `general-graph._directedRelation(relationName, fromVertexCollections, toVertexCollections)`
|
||||
/// `graph_module._directedRelation(relationName, fromVertexCollections, toVertexCollections)`
|
||||
/// *Define a directed relation.*
|
||||
///
|
||||
/// The *relationName* defines the name of this relation and references to the underlying edge collection.
|
||||
|
@ -1400,6 +1351,13 @@ var _undirectedRelation = function (relationName, vertexCollections) {
|
|||
/// Relations are only allowed in the direction from any collection in *fromVertexCollections*
|
||||
/// to any collection in *toVertexCollections*.
|
||||
///
|
||||
/// * *relationName*: The name of the edge collection where the edges should be stored.
|
||||
/// Will be created if it does not yet exist.
|
||||
/// * *fromVertexCollections*: One or a list of collection names. Source vertices for the edges
|
||||
/// have to be stored in these collections. Collections will be created if they do not exist.
|
||||
/// * *toVertexCollections*: One or a list of collection names. Target vertices for the edges
|
||||
/// have to be stored in these collections. Collections will be created if they do not exist.
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphDirectedRelationDefinition}
|
||||
|
@ -1452,17 +1410,13 @@ var _directedRelation = function (
|
|||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_list_call
|
||||
/// `general-graph._list()`
|
||||
/// @startDocuBlock JSF_general_graph_list
|
||||
/// `general_graph._list()`
|
||||
/// *List all graphs.*
|
||||
/// @endDocuBlock
|
||||
///
|
||||
/// @startDocuBlock JSF_general_graph_list_info
|
||||
//
|
||||
/// Lists all graph names stored in this database.
|
||||
///
|
||||
/// *Examples*
|
||||
/// @endDocuBlock
|
||||
/// @startDocuBlock JSF_general_graph_list_examples
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphList}
|
||||
/// var graph = require("org/arangodb/general-graph");
|
||||
|
@ -1481,14 +1435,19 @@ var _list = function() {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_definitions
|
||||
/// `graph_module._edgeDefinitions(relation1, relation2, ..., relationN)`
|
||||
/// *Create a list of edge definitions to construct a graph.*
|
||||
///
|
||||
/// The edge definitions for a graph is an array containing arbitrary many directed
|
||||
/// and/or undirected relations as defined below.
|
||||
/// 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*
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *relationX*: An object representing a definition of one relation in the graph
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitions}
|
||||
/// var graph = require("org/arangodb/general-graph");
|
||||
|
@ -1515,10 +1474,17 @@ var _edgeDefinitions = function () {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_extend_edge_definitions
|
||||
/// `graph_module._extendEdgeDefinitions(edgeDefinitions, relation1, relation2, ..., relationN)`
|
||||
/// *Extend the list of edge definitions to construct a graph.*
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *edgeDefinitions*: An list of relation definition objects.
|
||||
/// * *relationX*: An object representing a definition of one relation in the graph
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphEdgeDefinitionsExtend}
|
||||
|
@ -1552,7 +1518,7 @@ var _extendEdgeDefinitions = function (edgeDefinition) {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_create
|
||||
/// `general-graph._create(graph-name, edge-definitions, orphan-collections)`
|
||||
/// `graph_module._create(graphName, edgeDefinitions, orphanCollections)`
|
||||
/// *Create a graph*
|
||||
///
|
||||
///
|
||||
|
@ -1563,9 +1529,11 @@ var _extendEdgeDefinitions = function (edgeDefinition) {
|
|||
/// These collections are refered to as orphan collections within this chapter.
|
||||
/// All collections used within the creation process are created if they do not exist.
|
||||
///
|
||||
/// * *graph-name*: string - unique identifier of the graph
|
||||
/// * *edge-definitions*: array - list of edge definition objects
|
||||
/// * *orphan-collections*: array - list of additonal vertex collection names
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *graphName*: Unique identifier of the graph
|
||||
/// * *edgeDefinitions* (optional): List of relation definition objects
|
||||
/// * *orphanCollections* (optional): List of additonal vertex collection names
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1896,16 +1864,14 @@ var updateBindCollections = function(graph) {
|
|||
bindVertexCollections(graph, graph.__orphanCollections);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief constructor.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_collection_save
|
||||
/// Creates and saves a new vertex in collection *vertexCollectionName*
|
||||
/// `graph.vertexCollectionName.save(data)`
|
||||
/// *Create a new vertex in vertexCollectionName*
|
||||
///
|
||||
/// `general-graph.vertexCollectionName.save(data)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *data*: json - data of vertex
|
||||
/// * *data*: Json data of vertex.
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1920,13 +1886,14 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_collection_replace
|
||||
/// Replaces the data of a vertex in collection *vertexCollectionName*
|
||||
/// `graph.vertexCollectionName.replace(vertexId, data, options)`
|
||||
/// *Replaces the data of a vertex in collection vertexCollectionName*
|
||||
///
|
||||
/// `general-graph.vertexCollectionName.replace(vertexId, data, options)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *vertexId*: string - id of the vertex
|
||||
/// *data*: json - data of vertex
|
||||
/// *options*: json - (optional) - see collection documentation
|
||||
/// * *vertexId*: *_id* attribute of the vertex
|
||||
/// * *data*: Json data of vertex.
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1942,13 +1909,14 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_collection_update
|
||||
/// Updates the data of a vertex in collection *vertexCollectionName*
|
||||
/// `graph.vertexCollectionName.update(vertexId, data, options)`
|
||||
/// *Updates the data of a vertex in collection vertexCollectionName*
|
||||
///
|
||||
/// `general-graph.vertexCollectionName.update(vertexId, data, options)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *vertexId*: string - id of the vertex
|
||||
/// *data*: json - data of vertex
|
||||
/// *options*: json - (optional) - see collection documentation
|
||||
/// * *vertexId*: *_id* attribute of the vertex
|
||||
/// * *data*: Json data of vertex.
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -1964,13 +1932,18 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_collection_remove
|
||||
/// `graph.vertexCollectionName.remove(vertexId, options)`
|
||||
/// Removes a vertex in collection *vertexCollectionName*
|
||||
///
|
||||
/// `general-graph.vertexCollectionName.remove(vertexId, options)`
|
||||
///
|
||||
/// Additionally removes all ingoing and outgoing edges of the vertex recursively
|
||||
/// (see [edge remove](#edge.remove)).
|
||||
///
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *vertexId*: *_id* attribute of the vertex
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_OUTPUT{generalGraphVertexCollectionRemove}
|
||||
|
@ -1987,14 +1960,15 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_collection_save
|
||||
/// Creates and saves a new edge from vertex *from* to vertex *to* in
|
||||
/// collection *edgeCollectionName*
|
||||
/// `graph.edgeCollectionName.save(from, to, data, options)`
|
||||
/// *Creates an edge from vertex *from* to vertex *to* in collection edgeCollectionName*
|
||||
///
|
||||
/// `general-graph.edgeCollectionName.save(from, to, data)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *from*: string - id of outgoing vertex
|
||||
/// *to*: string - of ingoing vertex
|
||||
/// *data*: json - data of edge
|
||||
/// * *from*: *_id* attribute of the source vertex
|
||||
/// * *to*: *_id* attribute of the target vertex
|
||||
/// * *data*: Json data of the edge
|
||||
/// * *options* (optional): See [collection documentation](../Edges/EdgeMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -2018,13 +1992,14 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_collection_replace
|
||||
/// `graph.edgeCollectionName.replace(edgeId, data, options)`
|
||||
/// Replaces the data of an edge in collection *edgeCollectionName*
|
||||
///
|
||||
/// `general-graph.edgeCollectionName.replace(edgeId, data, options)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *edgeId*: string - id of the edge
|
||||
/// *data*: json - data of edge
|
||||
/// *options*: json - (optional) - see collection documentation
|
||||
/// * *edgeId*: *_id* attribute of the edge
|
||||
/// * *data*: Json data of the edge
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -2040,13 +2015,14 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_collection_update
|
||||
/// Updates the data of an edge in collection *edgeCollectionName*
|
||||
/// `graph.edgeCollectionName.update(edgeId, data, options)`
|
||||
/// *Updates the data of an edge in collection edgeCollectionName*
|
||||
///
|
||||
/// `general-graph.edgeCollectionName.update(edgeId, data, options)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// *edgeId*: string - id of the edge
|
||||
/// *data*: json - data of edge
|
||||
/// *options*: json - (optional) - see collection documentation
|
||||
/// * *edgeId*: *_id* attribute of the edge
|
||||
/// * *data*: Json data of the edge
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
@ -2062,9 +2038,13 @@ var updateBindCollections = function(graph) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_collection_remove
|
||||
/// Removes an edge in collection *edgeCollectionName*
|
||||
/// `graph.edgeCollectionName.remove(edgeId, options)`
|
||||
/// *Removes an edge in collection edgeCollectionName*
|
||||
///
|
||||
/// `general-graph.edgeCollectionName.remove(edgeId, options)`
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *edgeId*: *_id* attribute of the edge
|
||||
/// * *options* (optional): See [collection documentation](../Documents/DocumentMethods.md)
|
||||
///
|
||||
/// If this edge is used as a vertex by another edge, the other edge will be removed (recursively).
|
||||
///
|
||||
|
@ -2103,12 +2083,14 @@ var Graph = function(graphName, edgeDefinitions, vertexCollections, edgeCollecti
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_graph
|
||||
/// `general-graph._graph(graph-name)`
|
||||
/// `graph_module._graph(graphName)`
|
||||
/// *Load a graph*
|
||||
///
|
||||
/// A graph can be loaded by its name.
|
||||
///
|
||||
/// * *graph-name*: string - unique identifier of the graph
|
||||
/// *Parameter*
|
||||
///
|
||||
/// * *graphName*: Unique identifier of the graph
|
||||
///
|
||||
/// *Examples*
|
||||
///
|
||||
|
|
|
@ -1080,7 +1080,7 @@ exports.mount = function (appId, mount, options) {
|
|||
}
|
||||
catch (err2) {
|
||||
markAsIllegal(doc, err2);
|
||||
throw err;
|
||||
throw err2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue