mirror of https://gitee.com/bigwinds/arangodb
updated keywords list
This commit is contained in:
parent
d572f3ed03
commit
6c1717ec90
11
CHANGELOG
11
CHANGELOG
|
@ -1,6 +1,17 @@
|
||||||
v2.8.0 (XXXX-XX-XX)
|
v2.8.0 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* added AQL keywords `GRAPH`, `OUTBOUND`, `INBOUND` and `ANY` for use in graph
|
||||||
|
traversals
|
||||||
|
|
||||||
|
Usage of these keywords as collection names, variable names or attribute names
|
||||||
|
in AQL queries will not be possible without quoting. For example, the following
|
||||||
|
AQL query will still work as it uses a quoted collection name and a quoted
|
||||||
|
attribute name:
|
||||||
|
|
||||||
|
FOR doc IN `OUTBOUND`
|
||||||
|
RETURN doc.`any`
|
||||||
|
|
||||||
* issue #1593: added AQL `POW` function for exponentation
|
* issue #1593: added AQL `POW` function for exponentation
|
||||||
|
|
||||||
* added cluster execution site info in explain output for AQL queries
|
* added cluster execution site info in explain output for AQL queries
|
||||||
|
|
|
@ -113,6 +113,11 @@ The current list of keywords is:
|
||||||
- TRUE
|
- TRUE
|
||||||
- FALSE
|
- FALSE
|
||||||
- DISTINCT
|
- DISTINCT
|
||||||
|
- GRAPH
|
||||||
|
- OUTBOUND
|
||||||
|
- INBOUND
|
||||||
|
- ANY
|
||||||
|
- ALL
|
||||||
|
|
||||||
Additional keywords may be added in future versions of ArangoDB.
|
Additional keywords may be added in future versions of ArangoDB.
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||||
|
|
||||||
/* Bison interface for Yacc-like parsers in C
|
/* Bison interface for Yacc-like parsers in C
|
||||||
|
|
||||||
Copyright (C) 1984, 1989-1990, 2000-2015 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -102,22 +102,23 @@ extern int Aqldebug;
|
||||||
T_OUTBOUND = 311,
|
T_OUTBOUND = 311,
|
||||||
T_INBOUND = 312,
|
T_INBOUND = 312,
|
||||||
T_ANY = 313,
|
T_ANY = 313,
|
||||||
T_NIN = 314,
|
T_ALL = 314,
|
||||||
UMINUS = 315,
|
T_NIN = 315,
|
||||||
UPLUS = 316,
|
UMINUS = 316,
|
||||||
FUNCCALL = 317,
|
UPLUS = 317,
|
||||||
REFERENCE = 318,
|
FUNCCALL = 318,
|
||||||
INDEXED = 319,
|
REFERENCE = 319,
|
||||||
EXPANSION = 320
|
INDEXED = 320,
|
||||||
|
EXPANSION = 321
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Value type. */
|
/* Value type. */
|
||||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
|
typedef union YYSTYPE YYSTYPE;
|
||||||
union YYSTYPE
|
union YYSTYPE
|
||||||
{
|
{
|
||||||
#line 17 "arangod/Aql/grammar.y" /* yacc.c:1915 */
|
#line 17 "arangod/Aql/grammar.y" /* yacc.c:1909 */
|
||||||
|
|
||||||
triagens::aql::AstNode* node;
|
triagens::aql::AstNode* node;
|
||||||
struct {
|
struct {
|
||||||
|
@ -127,10 +128,8 @@ union YYSTYPE
|
||||||
bool boolval;
|
bool boolval;
|
||||||
int64_t intval;
|
int64_t intval;
|
||||||
|
|
||||||
#line 131 "arangod/Aql/grammar.hpp" /* yacc.c:1915 */
|
#line 132 "arangod/Aql/grammar.hpp" /* yacc.c:1909 */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union YYSTYPE YYSTYPE;
|
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -129,6 +129,8 @@ void Aqlerror (YYLTYPE* locp,
|
||||||
%token T_INBOUND "inbound direction"
|
%token T_INBOUND "inbound direction"
|
||||||
%token T_ANY "any direction"
|
%token T_ANY "any direction"
|
||||||
|
|
||||||
|
%token T_ALL "all modifier"
|
||||||
|
|
||||||
/* define operator precedence */
|
/* define operator precedence */
|
||||||
%left T_COMMA
|
%left T_COMMA
|
||||||
%left T_DISTINCT
|
%left T_DISTINCT
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -161,6 +161,10 @@ namespace triagens {
|
||||||
return T_ANY;
|
return T_ANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(?i:ALL) {
|
||||||
|
return T_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------
|
/* ---------------------------------------------------------------------------
|
||||||
* predefined type literals
|
* predefined type literals
|
||||||
* --------------------------------------------------------------------------- */
|
* --------------------------------------------------------------------------- */
|
||||||
|
|
|
@ -350,7 +350,7 @@ function printTraversalDetails (traversals) {
|
||||||
function processQuery (query, explain) {
|
function processQuery (query, explain) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var nodes = { },
|
var nodes = { },
|
||||||
parents = { },
|
parents = { },
|
||||||
rootNode = null,
|
rootNode = null,
|
||||||
maxTypeLen = 0,
|
maxTypeLen = 0,
|
||||||
maxSiteLen = 0,
|
maxSiteLen = 0,
|
||||||
|
@ -794,6 +794,8 @@ function processQuery (query, explain) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var postHandle = function (node) {
|
var postHandle = function (node) {
|
||||||
|
var isLeafNode = ! parents.hasOwnProperty(node.id);
|
||||||
|
|
||||||
if ([ "EnumerateCollectionNode",
|
if ([ "EnumerateCollectionNode",
|
||||||
"EnumerateListNode",
|
"EnumerateListNode",
|
||||||
"IndexRangeNode",
|
"IndexRangeNode",
|
||||||
|
@ -801,7 +803,7 @@ function processQuery (query, explain) {
|
||||||
"SubqueryNode" ].indexOf(node.type) !== -1) {
|
"SubqueryNode" ].indexOf(node.type) !== -1) {
|
||||||
level++;
|
level++;
|
||||||
}
|
}
|
||||||
else if (node.type === "ReturnNode" && subqueries.length > 0) {
|
else if (isLeafNode && subqueries.length > 0) {
|
||||||
level = subqueries.pop();
|
level = subqueries.pop();
|
||||||
}
|
}
|
||||||
else if (node.type === "SingletonNode") {
|
else if (node.type === "SingletonNode") {
|
||||||
|
|
|
@ -88,7 +88,7 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||||
var AqlHighlightRules = function() {
|
var AqlHighlightRules = function() {
|
||||||
|
|
||||||
var keywords = (
|
var keywords = (
|
||||||
"for|return|filter|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|outbound|inbound|any|graph"
|
"for|return|filter|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|outbound|inbound|any|all"
|
||||||
);
|
);
|
||||||
|
|
||||||
var builtinFunctions = (
|
var builtinFunctions = (
|
||||||
|
|
Loading…
Reference in New Issue