Commit Graph

10 Commits

Author SHA1 Message Date
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
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
Asdine El Hrychy
c0861ed2c5 Add DROP SEQUENCE statement 2021-07-10 13:14:59 +04:00
Asdine El Hrychy
d5401cfe5d Decouple transaction from catalog
To avoid cyclic dependencies, we removed the Catalog from the
Transaction type and pass it around everywhere.
2021-07-02 15:55:58 +04:00
Asdine El Hrychy
da72d3eb39 Drop docid sequence upon table deletion 2021-06-29 00:33:06 +04:00
Asdine El Hrychy
3dcda73a47 Simplify catalog cache logic 2021-06-28 23:21:18 +04:00
Asdine El Hrychy
9009753d63 Create sequence for docids (#417)
Each table with no primary key now creates a sequence to manage docids
2021-06-28 22:45:50 +04:00
Asdine El Hrychy
7b4a02a770 Rename __genji_schema to __genji_catalog 2021-06-26 18:46:57 +04:00
Asdine El Hrychy
35b74ab2ad Merge __genji_tables and __genji_indexes into __genji_schema
Table and index information is now stored in a single public table
2021-06-20 17:22:26 +04:00
Asdine El Hrychy
7a98a2025f Move statements into their own package 2021-05-30 12:47:17 +04:00