The code is now an advanced POC - must revisit most of the code to make sure it is production quality
Statement parsing (when using named params in JDBC and any params in Mongo) - the usage of a state machine is very complicated. Could we maybe live with a regular expression and limitations on what can be in the statement (such as "no comments allowed in statements")? If not, The implementation must be done again and according to our code guidelines (and also a lot lot more readable)
Note (Tomas): State machine was rewritten to satisfy coding standards. Regular expression is equivalent to state machine and theoretically shall work for the same set of regular languages, but in this case it may not give us better solution.
Add all new modules to bom pom.xml
Core and Common
Find a good way to stream results to web server (see DbResultSupport in both examples)
Make sure all error states are correctly propagated to interceptors and to user
Note (Tomas): I did some checks of the code, but I'm still not 100 sure, especially about the interceptors in JDBC Client. Mongo seems to be OK, it does not swallow any exceptions.
Use a connection pool (see ConnectionPool interface, line 90) - and add appropriate documentation of configurable options
Implement support for mapping of DbRowResult (see mongoDB impl)
Document configuration properties of the JdbcDbProviderBuilder
Make sure the Flow API is correctly implemented
In MongoDbStatementDml - see TODO
Make sure the backpressure is correctly implemented in MongoDbStatementQuery
Rebased branch to master to have JDK 11 build.
Most of the tasks are already done. Adding few more things that came to my mind:
Start JDBC client with offline database
MongoDB client already supports this and there are real-life use-cases for such a feature.
Better health check support when DB is offline. Note: JDBC connection setup accepts HikariCP properties. initializationFailTimeout: -1 does the trick.
Update samples to cover typical use-cases Note: Currently there is just simple Pokemon entity with name and type String attributes.
I would like to use more complex schema from integration tests with M:N relation between Pokemon and Type entities. Imagine this relational model:
Pokemon (int id, String name)
Type (int id, String name) readonly list of pokemon types
PokeType(int pokemonId, int typeId)
DML: CUD on Pokemon
update: name/types of pokemon(s) with specific id or name