arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

[SQL] LIMIT does not accept parameters (for dynamic limits)

Open gramian opened this issue 10 months ago • 2 comments

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;

gramian avatar Feb 12 '25 09:02 gramian

The same holds for the SKIP field.

gramian avatar Apr 29 '25 08:04 gramian

Related to https://github.com/ArcadeData/arcadedb/issues/1842

gramian avatar Sep 15 '25 09:09 gramian