1.0.6 • Published 1 year ago

ayaya-lang-rewrite v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Actions

TAKE - Limiter

TAKE generic

TAKE number

ON - Table selector

ON table_name

MATCH - Data filter

MATCH field value

SHOW - Pick fields

SHOW generic

SHOW field

SHOW field1, field2, fieldN

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 present

  • Assume SHOW * if not present

  • Command ON is required

  • Command SHOW and COUNT cannot be in the same query

  • Command SORT and COUNT cannot be in the same query

Aggregation priority

  1. supermatch

  2. match

  3. sort

  4. limit

Examples

Description:

Get the age of the first 2 users named John

Query:

`TAKE 2 ON users MATCH name = 'John' SHOW 'age';`

Result:

`[ 24, 21 ]`

TODO:

  • Write tests
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago