1.0.4 • Published 1 year ago

ayaya-lang-rewrite-v2 v1.0.4

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

Actions

MORE of sql

Limit - Limiter

limit generic

limit number

FROM - Table selector

FROM table_name

WHERE - Data filter

WHERE field value

SELECT fields

SELECT generic

SELECT field

SELECT field1, field2, fieldN

COUNT - Counting fields

COUNT Generic

COUNT field

Order - Sort results

ORDER field

OPERATORS

=, >, <, like, and, or

GENERIC

*, all, any, every

NUMBER

single, 1, 2, ...

SORT

asc, des

Rules

  • Assume Limit * if not present

  • Assume SELECT * if not present

  • Command FROM is required

  • Command SELECT and COUNT cannot be in the same query

  • Command ORDER 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:

`LIMIT 2 FROM users WHERE name = 'John' SELECT 'age';`

Result:

`[ 24, 21 ]`

TODO:

  • Write tests
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago