3

Try to find any SQL builder library that support CockroachDb and work well with spring-boot-webflux, spring-data-r2dbc. Or at least library that will just write dynamic SQL statement as string for me that I will provide to database client executor.

Native spring-data-r2dbc DatabaseClient API don't support join statements (https://docs.spring.io/spring-data/r2dbc/docs/1.0.x/reference/html/#r2dbc.datbaseclient.fluent-api.select) that's why I need another way how to write non-plain dynamic SQL.

JOOQ don't support CockroachDB yet(https://github.com/jOOQ/jOOQ/issues/8545).

Is there any library that will fit to my expectations?

Viktor M.
  • 4,393
  • 9
  • 40
  • 71

1 Answers1

4

PM at Cockroach here. We are working with the team at jOOQ to provide a CockroachDB support in the next few months. In the meantime, you can use pgjdbc with something like JDBI to do query bindings. We are also working on a CockroachDB dialect for Hibernate but you can use the current Postgres dialect as well.

Andy Woods
  • 41
  • 1
  • Found some solutions - using jooq only as dynamic SQL composer, howere jooq requires jdbc connection + a bit heavy just for composing SQL statement as string. Another option - using SqlBuilder library that only compose SQL statement as string, light library, not require any jdbc connection. Composed SQL string I provide to spring data database client executor. – Viktor M. Jan 15 '20 at 08:57