[Space Lua] LIQ: Add using ... support to order by

* support for custom comparators in LIQ `order by` clauses via the
  `using` keyword.

* `using` is mutually exclusive with `asc`/`desc` and accepts either
  a *named function* or an *inline anonymous function*. The comparator
  receives two values and returns true if the first should come before the
  second.

* `nulls first`/ `nulls last` works independently of `using`.

* `using` is now a reserved keyword (`kw`; this cannot be avoided but
  the chance to collide with user scripts is negligable),

* documentation updated + polished a little

Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
This commit is contained in:
Matouš Jan Fialka
2026-03-03 14:47:28 +01:00
parent 82f10fa59f
commit 01dd7c1db4
9 changed files with 400 additions and 55 deletions
+16 -16
View File
@@ -20,19 +20,19 @@ export const
WhereClause = 65,
OrderByClause = 67,
OrderBy = 70,
SelectClause = 76,
LimitClause = 78,
GroupByClause = 80,
HavingClause = 82,
IfStatement = 89,
ForStatement = 94,
ForNumeric = 96,
ForGeneric = 97,
NameList = 98,
ExpList = 100,
FuncName = 102,
VarList = 106,
AttNameList = 108,
AttName = 109,
Attrib = 110,
ReturnStatement = 111
SelectClause = 77,
LimitClause = 79,
GroupByClause = 81,
HavingClause = 83,
IfStatement = 90,
ForStatement = 95,
ForNumeric = 97,
ForGeneric = 98,
NameList = 99,
ExpList = 101,
FuncName = 103,
VarList = 107,
AttNameList = 109,
AttName = 110,
Attrib = 111,
ReturnStatement = 112