Unified SQL syntax by removing "RETURNING" statement, which is specific for PG.
Used HugSQL feature of .getGeneratedKeys in combination with custom method.
Method names were left with YeSQL syntax using <! in order to somehow mark that the caller should keep in mind returning value.
Introduced *db-type* based on JDBC connection string which can be used for SQL-dialect specific purposes.
Added H2 support and files
Migrations are based on PG migrations. Most changes just remove PG specific calls.
For SQL compabibility of calls of array_agg, ArrayAggregator was added to code (Java).
Extended interface on required classes for reading parameters.
Adjusted project/main file to support different migration schema. PG set as default one.
Added some text to readme about H2.
Tested functionalities with PG and H2.
If it comes to full text search, H2 support is somewhat limited (no weighting support). I intentionally left out wildcard support (has some performance issues) and used native search engine. But otherwise, H2 is nice for more lightweight use cases.
This PR adds H2 DB support and closes #7.
Roughly, following was done:
.getGeneratedKeys
in combination with custom method.<!
in order to somehow mark that the caller should keep in mind returning value.*db-type*
based on JDBC connection string which can be used for SQL-dialect specific purposes.array_agg
,ArrayAggregator
was added to code (Java).If it comes to full text search, H2 support is somewhat limited (no weighting support). I intentionally left out wildcard support (has some performance issues) and used native search engine. But otherwise, H2 is nice for more lightweight use cases.