1.0.6 • Published 3 years ago
ayaya-lang-rewrite v1.0.6
Actions
TAKE - Limiter
TAKE generic
TAKE number
ON - Table selector
ON table_name
MATCH - Data filter
SHOW - Pick fields
SHOW generic
SHOW field
COUNT - Counting fields
COUNT
COUNT field
SORT - Sort results
SORT field
OPERATORS
=, >, <, like, and, or
GENERIC
*, all, any, every
NUMBER
single, 1, 2, ...
SORT
asc, des
Rules
Assume
TAKE *if not presentAssume
SHOW *if not presentCommand
ONis requiredCommand
SHOWandCOUNTcannot be in the same queryCommand
SORTandCOUNTcannot be in the same query
Aggregation priority
supermatch
match
sort
limit
Examples
Description:
Get the age of the first 2 users named JohnQuery:
`TAKE 2 ON users MATCH name = 'John' SHOW 'age';`Result:
`[ 24, 21 ]`TODO:
- Write tests