jooq

Accessing H2 database schema

孤街醉人 提交于 2019-12-01 22:52:50
问题 Im currently accessing an embedded H2 database in java using jOOQ to generate table classes etc. I can currently execute queries such as create.select().from(TEST).fetch() in my code, return results etc. However I cant query the information schema. I can access it ok using the H2 console, and creating a view for a given information_schema table works fine. My question is how should I be accessing the information_schema eg to perform a query such as SELECT * FROM INFORMATION_SCHEMA.TABLES from

Accessing H2 database schema

我怕爱的太早我们不能终老 提交于 2019-12-01 20:55:40
Im currently accessing an embedded H2 database in java using jOOQ to generate table classes etc. I can currently execute queries such as create.select().from(TEST).fetch() in my code, return results etc. However I cant query the information schema. I can access it ok using the H2 console, and creating a view for a given information_schema table works fine. My question is how should I be accessing the information_schema eg to perform a query such as SELECT * FROM INFORMATION_SCHEMA.TABLES from within my java code? Do I have to create a view, can the schema be accessed through jooq-meta or some

Can JOOQ be used without code generation?

落花浮王杯 提交于 2019-12-01 15:00:26
问题 I am assessing JOOQ for use in a new system that is still under development. I would like to avoid code generation when the database is being developed along with the application and simply plays a role of a persistent storage for this application. So, the database schema definition is expected to be driven by Java code (table definitions in java). Is JOOQ appropriate for the above use case? Is there a java DSL for schema definition? 回答1: Is JOOQ appropriate for the above use case? Yes, many

What is Jooq Transaction isolation level? Can dirty read happen?

别等时光非礼了梦想. 提交于 2019-12-01 11:41:45
Based on comments in https://www.jooq.org/doc/3.6/manual/sql-execution/transaction-management/ changing isolation level doesn't seems possible with Jooq yet. However it is not clear what is the isolation level Jooq is setting, hence my question: what is the isolation level that Jooq is using? Especially, it looks like I am experiencing dirty reads, while I need the transaction to prevent that. Can someone confirm that dirty reads are prevented by Jooq transactions? Note: Using Jooq with Mysql. The DB is an AWS Aurora instance. jOOQ 3.9 doesn't support managing transaction isolation levels yet.

What is Jooq Transaction isolation level? Can dirty read happen?

我怕爱的太早我们不能终老 提交于 2019-12-01 11:21:48
问题 Based on comments in https://www.jooq.org/doc/3.6/manual/sql-execution/transaction-management/ changing isolation level doesn't seems possible with Jooq yet. However it is not clear what is the isolation level Jooq is setting, hence my question: what is the isolation level that Jooq is using? Especially, it looks like I am experiencing dirty reads, while I need the transaction to prevent that. Can someone confirm that dirty reads are prevented by Jooq transactions? Note: Using Jooq with Mysql

Jooq dynamically change db's schema in generated query

帅比萌擦擦* 提交于 2019-12-01 03:34:21
I have 2 similar schemas in simple database - "develop" and "stage". I have generated Java classes with Jooq for one of that schemas ("develop" for example). When jooq generates query to db, it implicitly add schema's name to all query's aliases select "develop"."image"."id", "develop"."image"."image_data" from "develop"."image" where "develop"."image"."id" = ? So my question is, whether there are the way to change jooq schema name (for "stage" as an example) in generated query without regenerating jooq's classes for "stage" schema? You have several options, which can even be combined: Use the

jOOQ - support for JSR310

◇◆丶佛笑我妖孽 提交于 2019-12-01 03:07:00
Does jOOQ provide support for JSR310 in combination with PostgreSQL? In particular, I am trying to use the following classes: java.time.Instant java.time.LocalDate java.time.LocalTime java.time.LocalDateTime I am storing in the following data types (as per http://www.postgresql.org/docs/9.1/static/datatype-datetime.html ): java.time.Instant : timestamp with timezone java.time.LocalDate : date java.time.LocalTime : time without timezone java.time.LocalDateTime : timestamp without timezone Are these data types correct? Does jOOQ support translation between java.sql.Timestamp , java.sql.Date and

Jooq dynamically change db's schema in generated query

[亡魂溺海] 提交于 2019-12-01 00:02:39
问题 I have 2 similar schemas in simple database - "develop" and "stage". I have generated Java classes with Jooq for one of that schemas ("develop" for example). When jooq generates query to db, it implicitly add schema's name to all query's aliases select "develop"."image"."id", "develop"."image"."image_data" from "develop"."image" where "develop"."image"."id" = ? So my question is, whether there are the way to change jooq schema name (for "stage" as an example) in generated query without

jOOQ - support for JSR310

我们两清 提交于 2019-11-30 22:10:35
问题 Does jOOQ provide support for JSR310 in combination with PostgreSQL? In particular, I am trying to use the following classes: java.time.Instant java.time.LocalDate java.time.LocalTime java.time.LocalDateTime I am storing in the following data types (as per http://www.postgresql.org/docs/9.1/static/datatype-datetime.html): java.time.Instant : timestamp with timezone java.time.LocalDate : date java.time.LocalTime : time without timezone java.time.LocalDateTime : timestamp without timezone Are

Slow compilation with jOOQ 3.6+, plain SQL, and the javac compiler [duplicate]

假装没事ソ 提交于 2019-11-30 20:21:30
This question already has an answer here: Troubleshoot slow compilation 3 answers The following bug was reported to the jOOQ user group . It really seems to be a bug in the javac compiler related to rather "complex" type inference work done by the compiler in the context of using an internal DSL like jOOQ is. Given the general nature of the bug, I'm documenting it here on Stack Overflow for others to help apply workarounds if they run into it. On a high level, it seems to be a compiler performance regression due to JEP 101: Generalized Target-Type Inference , which was introduced in Java 8 and