Commit Graph

20 Commits

Author SHA1 Message Date
Asdine El Hrychy
a60e2f33e1 use single quotes for text 2025-09-21 11:28:55 +05:30
Asdine El Hrychy
5095097a0a cleanup: delete assert package 2024-02-18 11:31:26 +04:00
Asdine El Hrychy
fc051f7cf9 db: only strict schemas 2024-02-17 14:27:02 +04:00
Asdine El Hrychy
edcb91d4c5 chore: rename genji to chai 2023-12-02 11:25:56 +04:00
Asdine El Hrychy
3c9e4fca3f chore: move packages to internal 2023-12-01 20:56:24 +04:00
Asdine El Hrychy
d981a577c0 db: introduce row type 2023-12-01 20:39:23 +04:00
Asdine El Hrychy
2d4df658e4 Treat all NULL values differently in UNIQUE indexes
SQL standard can be interpreted differently:
either NULL values are all unique (SQLite, PostgreSQL, ... and now Genji)
or they are considered equal (SQL Server, ...).
2021-12-13 09:32:22 +05:30
Asdine El Hrychy
0327fe9407 Normalize stream environment 2021-11-19 16:25:43 +01:00
Asdine El Hrychy
6dd3de11f9 Add new sqltests package 2021-10-30 16:13:30 +04:00
Asdine El Hrychy
524e633049 Add Union operator 2021-10-03 12:42:08 +04:00
Jean Hadrien Chabran
4a6e68439a Refactor to handle errors with internal/errors (#432)
All new error handling code now rely on internal/errors package
which provides a compilation time toggle that enables to capture
stacktraces for easier debugging while developing.

It also comes with a new testutil/assert package which replaces the require
package when it comes to checking or comparing errors and printing the
stack traces if needed.

Finally, the test target of the Makefile uses the debug build tag by default. 
A testnodebug target is also provided for convenience and to make sure no
tests are broken due to not having used the internal/errors or testutil/assert package.

See #431 for more details
2021-08-22 11:47:54 +03:00
Asdine El Hrychy
daf4f79e9f Fix field name when using alias (#424)
This fixes a bug where using AS wouldn't rename the field
2021-07-24 18:31:53 +04:00
Asdine El Hrychy
f966172cee Introduce Value interface (#422)
This replaces the Value struct by an interface to allow us to override some
values behavior in the future.
It also introduces a new package types, which contains type definitions, comparison,
and arithmetics.
Concerning encoding, Genji now only uses on type of encoding for values. This simplifies
indexing logic as well as table access in general.
2021-07-21 22:05:44 +04:00
Jean Hadrien Chabran
e556fc3048 Add functions packages support (#419)
* Add packaged functions support

* Add tests for math.floor func

* Export FunctionsTable

* Extract func stuff into its own package

* Rename stuff

* Fix tests

* Move doc package to cmd/genji

* Adjust naming, typos
2021-07-17 13:07:16 +02:00
Jean Hadrien Chabran
c829fc8e5c Fix typo: litteral -> literal (#420) 2021-07-10 08:58:49 +04:00
Asdine El Hrychy
6af0a6f114 Add new environment package 2021-07-02 18:59:20 +04:00
Asdine El Hrychy
6fff623cd1 Stringify unquoted document keys when possible 2021-05-23 23:10:44 +04:00
Asdine El Hrychy
f402374ca3 Move parser to internal package 2021-05-23 21:03:11 +04:00
Asdine El Hrychy
3cd2ef59f7 Remove buffered literal expr from parser
This was used to buffer parsed expressions to be used as keys in the
projected documents.
This is no longer necessary, as every expression can now be stringified.
2021-05-23 12:36:36 +04:00
Asdine El Hrychy
37ebf47ea8 Move packages under internal package
These packages are not part of the public API and can break at any time.
2021-05-23 11:05:41 +04:00