This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes: https://github.com/NexesJS/NQL-Lang/issues/9 This adds relative date expressions in the form now-1d. These are translated into absolute dates inside the NQL parser The output format then contains a standard gt/lt type date expression This is because mongo queries don't support relative dates without using $expr and knex doesn't support them at all. We'd have to change a lot of stuff to support relative queries to the DB / to JSON but this solves the immediate problem simply. This has meant introducing state into the lexer, which is new to me. This done so that we can correctly interpret the -/+ symbols in two different "states". This could be used to improve the lexer further. This is quite a complex addition to the language, but it reduces complexity everywhere else.
- Loading branch information
Showing
8 changed files
with
488 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.