1

I have Spring boot app with JOOQ for working with PostrgesDB. This app must be running on Google cloud. If I deploy this as AppEngine Flex all works without problem.

Now I need deploy and run this app into the google run. Way for connect Cloud Run with PostgresDB is described https://cloud.google.com/sql/docs/postgres/connect-run#public-ip-default_1.

My problem is in combination using of JOOQ and com.google.cloud.sql.postgres.SocketFactory Do you have some solution?

Magnus
  • 2,016
  • 24
  • 32
Jan Tomek
  • 11
  • 2

1 Answers1

0

jOOQ offers means of executing queries via JDBC, and starting from jOOQ 3.15 via R2DBC. If your installation doesn't support a JDBC or R2DBC driver but requires more low level interaction, you can't use jOOQ to execute SQL directly, but you can still extract your SQL strings and bind variables from jOOQ queries and implement the glue code to your SocketFactory yourself. An example is provided here where jOOQ queries are executed on a JPA EntityManager:

// query is any jOOQ query
String sql = query.getSQL();
List<Object> binds = query.getBindValues();
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509