arcadedb
arcadedb copied to clipboard
[SQL] LIMIT does not accept parameters (for dynamic limits)
ArcadeDB Version 25.1.1
Using a parameter inside the LIMIT field of a SELECT query causes an error:
Error on command execution (PostCommandHandler): com.arcadedb.query.sql.parser.ParseException: Encountered <SELECT> "SELECT" at line 2, column 1.
Was expecting one of:
<WHILE> ...
<IF> ...
<FOREACH> ...
";" ...
This can be reproduced by the SQLscript:
CREATE DOCUMENT TYPE doc;
LET $t = 5;
SELECT FROM doc LIMIT $t;
The same holds for the SKIP field.
Related to https://github.com/ArcadeData/arcadedb/issues/1842