ayaya-lang-rewrite
v1.0.6
Published
TAKE [generic]
Readme
Actions
TAKE - Limiter
TAKE [generic]
TAKE [number]
ON - Table selector
ON [table_name]
MATCH - Data filter
MATCH [field] [operator] [value]
SHOW - Pick fields
SHOW [generic]
SHOW [field]
SHOW [field1], [field2], [fieldN]
COUNT - Counting fields
COUNT
COUNT [field]
SORT - Sort results
SORT [field] [sort]
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
