mirror of https://gitee.com/bigwinds/arangodb
Feature 3.4/relax aql limit grammar (#6361)
This commit is contained in:
parent
9a6cf18f8b
commit
a21d6bda62
|
@ -1557,6 +1557,12 @@ ExecutionNode* ExecutionPlan::fromNodeLimit(ExecutionNode* previous,
|
|||
|
||||
auto offset = node->getMember(0);
|
||||
auto count = node->getMember(1);
|
||||
|
||||
if (offset->type != NODE_TYPE_VALUE || count->type != NODE_TYPE_VALUE) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(
|
||||
TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE,
|
||||
"LIMIT offset/count values must be constant numeric values");
|
||||
}
|
||||
|
||||
TRI_ASSERT(offset->type == NODE_TYPE_VALUE);
|
||||
TRI_ASSERT(count->type == NODE_TYPE_VALUE);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -903,12 +903,12 @@ sort_direction:
|
|||
;
|
||||
|
||||
limit_statement:
|
||||
T_LIMIT simple_value {
|
||||
T_LIMIT expression {
|
||||
auto offset = parser->ast()->createNodeValueInt(0);
|
||||
auto node = parser->ast()->createNodeLimit(offset, $2);
|
||||
parser->ast()->addOperation(node);
|
||||
}
|
||||
| T_LIMIT simple_value T_COMMA simple_value {
|
||||
| T_LIMIT expression T_COMMA expression {
|
||||
auto node = parser->ast()->createNodeLimit($2, $4);
|
||||
parser->ast()->addOperation(node);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue