mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-20 19:17:55 +00:00
Compare commits
50
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c4b04a893 | ||
|
|
ee403bdb83 | ||
|
|
b18abe2221 | ||
|
|
d68f372d99 | ||
|
|
c8f769aa2a | ||
|
|
bde626fd45 | ||
|
|
b828b73b2c | ||
|
|
2795a8578f | ||
|
|
bd0a3c2303 | ||
|
|
21e50e9d00 | ||
|
|
88a47bf0a9 | ||
|
|
d9a45245f4 | ||
|
|
7be72df788 | ||
|
|
42685335e3 | ||
|
|
478a2be405 | ||
|
|
ebcac9a503 | ||
|
|
996239c29f | ||
|
|
caf2772fb3 | ||
|
|
1482c4c84f | ||
|
|
792d52b794 | ||
|
|
aa4ea4904f | ||
|
|
bab839fb38 | ||
|
|
dde2567ccd | ||
|
|
7e4d070b75 | ||
|
|
3151e3f82b | ||
|
|
c630aaff0e | ||
|
|
67ec848f15 | ||
|
|
57f0734381 | ||
|
|
cbd5bf23c9 | ||
|
|
5dc664a63f | ||
|
|
d9b53677f2 | ||
|
|
f55c2cf3b6 | ||
|
|
c98def7ab7 | ||
|
|
705e158a70 | ||
|
|
569e782e99 | ||
|
|
265b92fb12 | ||
|
|
74311fad0a | ||
|
|
1eded5682a | ||
|
|
ff21bfe1de | ||
|
|
86db7fadfd | ||
|
|
e48b327967 | ||
|
|
964b3ccf8e | ||
|
|
eb6906ad2b | ||
|
|
86e5ea3627 | ||
|
|
3a5e8290e0 | ||
|
|
929604e33d | ||
|
|
2eed68ad61 | ||
|
|
f705560b8b | ||
|
|
a35db6bdee | ||
|
|
3ab3f81fa3 |
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [GA,EA,23]
|
||||
java_version: [GA,EA]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-net-postgis-types</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -60,13 +60,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-config</artifactId>
|
||||
<version>3.12</version>
|
||||
<version>4.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -2019,6 +2019,11 @@ public interface DatabaseBuilder {
|
||||
@Deprecated
|
||||
DatabaseBuilder setQueryPlanTTLSeconds(int queryPlanTTLSeconds);
|
||||
|
||||
/**
|
||||
* Set the EXPLAIN (with options) to use for query plan capture.
|
||||
*/
|
||||
DatabaseBuilder queryPlanExplain(String queryPlanExplain);
|
||||
|
||||
/**
|
||||
* Create a new PlatformConfig based of the one held but with overridden properties by reading
|
||||
* properties with the given path and prefix.
|
||||
@@ -3044,6 +3049,11 @@ public interface DatabaseBuilder {
|
||||
*/
|
||||
int getQueryPlanTTLSeconds();
|
||||
|
||||
/**
|
||||
* Return the EXPLAIN (with options) to use for capturing query plans.
|
||||
*/
|
||||
String getQueryPlanExplain();
|
||||
|
||||
/**
|
||||
* Return mapping locations to search for xml mapping via class path search.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package io.ebean;
|
||||
|
||||
import jakarta.persistence.PersistenceException;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
/**
|
||||
* FutureMap represents the result of a background query execution that will
|
||||
* return a map of entities.
|
||||
* <p>
|
||||
* It extends the java.util.concurrent.Future with the ability to cancel the
|
||||
* query, check if it is finished and get the resulting list waiting for the
|
||||
* query to finish (ie. the standard features of java.util.concurrent.Future).
|
||||
* </p>
|
||||
* <p>
|
||||
* A simple example:
|
||||
* </p>
|
||||
* <pre>{@code
|
||||
*
|
||||
* // create a query to find all orders
|
||||
* Query<Long,Order> query = DB.find(Order.class)
|
||||
* .setMapKey("id");
|
||||
*
|
||||
* // execute the query in a background thread
|
||||
* // immediately returning the futureMap
|
||||
* FutureMap<Long,Order> futureMap = query.findFutureMap();
|
||||
*
|
||||
* // do something else ...
|
||||
*
|
||||
* if (!futureMap.isDone()){
|
||||
* // we can cancel the query execution. This will cancel
|
||||
* // the underlying query if that is supported by the JDBC
|
||||
* // driver and database
|
||||
* futureMap.cancel(true);
|
||||
* }
|
||||
*
|
||||
* if (!futureMap.isCancelled()){
|
||||
* // wait for the query to finish and return the map
|
||||
* Map<Long,Order> map = futureMap.get();
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* }</pre>
|
||||
*/
|
||||
public interface FutureMap<K, T> extends Future<Map<K, T>> {
|
||||
|
||||
/**
|
||||
* Return the query that is being executed by a background thread.
|
||||
*/
|
||||
Query<T> getQuery();
|
||||
|
||||
/**
|
||||
* Same as {@link #get()} but wraps InterruptedException and ExecutionException in the
|
||||
* unchecked PersistenceException.
|
||||
*
|
||||
* @return The query list result
|
||||
* @throws PersistenceException when a InterruptedException or ExecutionException occurs.
|
||||
*/
|
||||
Map<K, T> getUnchecked();
|
||||
|
||||
/**
|
||||
* Same as {@link #get(long, TimeUnit)} but wraps InterruptedException
|
||||
* and ExecutionException in the unchecked PersistenceException.
|
||||
*
|
||||
* @return The query list result
|
||||
* @throws TimeoutException if the wait timed out
|
||||
* @throws PersistenceException if a InterruptedException or ExecutionException occurs.
|
||||
*/
|
||||
Map<K, T> getUnchecked(long timeout, TimeUnit unit) throws TimeoutException;
|
||||
|
||||
}
|
||||
@@ -956,6 +956,16 @@ public interface QueryBuilder<SELF extends QueryBuilder<SELF, T>, T> extends Que
|
||||
*/
|
||||
FutureList<T> findFutureList();
|
||||
|
||||
/**
|
||||
* Execute find map query in a background thread.
|
||||
* <p>
|
||||
* This query will execute in it's own PersistenceContext and using its own transaction.
|
||||
* What that means is that it will not share any bean instances with other queries.
|
||||
*
|
||||
* @return a Future object for the map result of the query
|
||||
*/
|
||||
<K> FutureMap<K,T> findFutureMap();
|
||||
|
||||
/**
|
||||
* Return a PagedList for this query using firstRow and maxRows.
|
||||
* <p>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.ebean.cache;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -10,11 +11,11 @@ import java.util.Set;
|
||||
* the query cache entry is treated as invalid.
|
||||
* </p>
|
||||
*/
|
||||
public class QueryCacheEntry {
|
||||
public final class QueryCacheEntry {
|
||||
|
||||
private final Object value;
|
||||
private final Set<String> dependentTables;
|
||||
private final long timestamp;
|
||||
private final Instant timestamp;
|
||||
|
||||
/**
|
||||
* Create with dependent tables and timestamp.
|
||||
@@ -23,7 +24,7 @@ public class QueryCacheEntry {
|
||||
* @param dependentTables The extra tables the query is dependent on (joins to)
|
||||
* @param timestamp The timestamp that the query uses to check for modifications
|
||||
*/
|
||||
public QueryCacheEntry(Object value, Set<String> dependentTables, long timestamp) {
|
||||
public QueryCacheEntry(Object value, Set<String> dependentTables, Instant timestamp) {
|
||||
this.value = value;
|
||||
this.dependentTables = dependentTables;
|
||||
this.timestamp = timestamp;
|
||||
@@ -32,21 +33,21 @@ public class QueryCacheEntry {
|
||||
/**
|
||||
* Return the actual query result.
|
||||
*/
|
||||
public Object getValue() {
|
||||
public Object value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the tables the query result is dependent on.
|
||||
*/
|
||||
public Set<String> getDependentTables() {
|
||||
public Set<String> dependentTables() {
|
||||
return dependentTables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the timestamp used to check for modifications on the dependent tables.
|
||||
*/
|
||||
public long getTimestamp() {
|
||||
public Instant timestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
/**
|
||||
* The default batch size for lazy loading
|
||||
*/
|
||||
private int lazyLoadBatchSize = 10;
|
||||
private int lazyLoadBatchSize = 100;
|
||||
|
||||
/**
|
||||
* The default batch size for 'query joins'.
|
||||
@@ -481,6 +481,7 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
* Time to live for query plans - defaults to 5 minutes.
|
||||
*/
|
||||
private int queryPlanTTLSeconds = 60 * 5;
|
||||
private String queryPlanExplain;
|
||||
|
||||
/**
|
||||
* Set to true to globally disable L2 caching (typically for performance testing).
|
||||
@@ -2151,6 +2152,7 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
queryPlanCapturePeriodSecs = p.getLong("queryPlan.capturePeriodSecs", queryPlanCapturePeriodSecs);
|
||||
queryPlanCaptureMaxTimeMillis = p.getLong("queryPlan.captureMaxTimeMillis", queryPlanCaptureMaxTimeMillis);
|
||||
queryPlanCaptureMaxCount = p.getInt("queryPlan.captureMaxCount", queryPlanCaptureMaxCount);
|
||||
queryPlanExplain = p.get("queryPlan.explain", queryPlanExplain);
|
||||
docStoreOnly = p.getBoolean("docStoreOnly", docStoreOnly);
|
||||
disableL2Cache = p.getBoolean("disableL2Cache", disableL2Cache);
|
||||
localOnlyL2Cache = p.getBoolean("localOnlyL2Cache", localOnlyL2Cache);
|
||||
@@ -2402,6 +2404,17 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
return queryPlanTTLSeconds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQueryPlanExplain() {
|
||||
return queryPlanExplain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseBuilder queryPlanExplain(String queryPlanExplain) {
|
||||
this.queryPlanExplain = queryPlanExplain;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseConfig setQueryPlanTTLSeconds(int queryPlanTTLSeconds) {
|
||||
this.queryPlanTTLSeconds = queryPlanTTLSeconds;
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
package io.ebean.meta;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
* Initiate query plan collection for plans by their hash or all query plans.
|
||||
*/
|
||||
public class QueryPlanInit {
|
||||
|
||||
private final Map<String,Long> hashes = new HashMap<>();
|
||||
|
||||
private boolean all;
|
||||
|
||||
private Set<String> hashes = new HashSet<>();
|
||||
|
||||
private long thresholdMicros;
|
||||
private long defaultThresholdMicros;
|
||||
|
||||
/**
|
||||
* Return true if this initiates bind collection on all query plans.
|
||||
@@ -29,39 +30,74 @@ public class QueryPlanInit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the query execution time threshold which must be exceeded to initiate
|
||||
* Return the default query execution time threshold which must be exceeded to initiate
|
||||
* query plan collection.
|
||||
*/
|
||||
public long thresholdMicros() {
|
||||
return thresholdMicros;
|
||||
return defaultThresholdMicros;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the query execution time threshold which must be exceeded to initiate
|
||||
* Set the default query execution time threshold which must be exceeded to initiate
|
||||
* query plan collection.
|
||||
*/
|
||||
public void thresholdMicros(long thresholdMicros) {
|
||||
this.thresholdMicros = thresholdMicros;
|
||||
this.defaultThresholdMicros = thresholdMicros;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the query plan should be initiated based on it's hash.
|
||||
*/
|
||||
public boolean includeHash(String hash) {
|
||||
return all || hashes.contains(hash);
|
||||
return all || hashes.containsKey(hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the specific hashes that we want to collect query plans on.
|
||||
*
|
||||
* @param hash The hash of the query plan.
|
||||
* @param thresholdMicros The threshold in micros to use.
|
||||
*/
|
||||
public Set<String> hashes() {
|
||||
return hashes;
|
||||
public void add(String hash, long thresholdMicros) {
|
||||
requireNonNull(hash);
|
||||
if (!"all".equals(hash)) {
|
||||
hashes.put(hash, thresholdMicros);
|
||||
} else {
|
||||
all = true;
|
||||
if (thresholdMicros > 0) {
|
||||
defaultThresholdMicros = thresholdMicros;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the specific hashes that we want to collect query plans on.
|
||||
* Remove a hash from this request.
|
||||
*/
|
||||
public void hashes(Set<String> hashes) {
|
||||
this.hashes = hashes;
|
||||
public void remove(String hash) {
|
||||
hashes.remove(hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the threshold in micros to use for the given hash.
|
||||
*/
|
||||
public long thresholdMicros(String hash) {
|
||||
Long threshold = hashes.get(hash);
|
||||
return threshold == null || threshold < 1 ? defaultThresholdMicros : threshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if there are no registered hashes and not collect <em>All</em> plans.
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
return !all && hashes.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "QueryPlanInit{" +
|
||||
"all=" + all +
|
||||
", hashes=" + hashes +
|
||||
", thresholdMicros=" + defaultThresholdMicros +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,8 @@ class DatabaseConfigTest {
|
||||
props.setProperty("readOnlyDatabase", "true");
|
||||
props.setProperty("lengthCheck", "ON");
|
||||
props.setProperty("includeLabelInSql", "false");
|
||||
props.setProperty("lazyLoadBatchSize", "50");
|
||||
props.setProperty("queryBatchSize", "60");
|
||||
|
||||
props.setProperty("queryPlan.enable", "true");
|
||||
props.setProperty("queryPlan.thresholdMicros", "10000");
|
||||
@@ -84,6 +86,7 @@ class DatabaseConfigTest {
|
||||
props.setProperty("queryPlan.capturePeriodSecs", "42");
|
||||
props.setProperty("queryPlan.captureMaxTimeMillis", "560");
|
||||
props.setProperty("queryPlan.captureMaxCount", "7");
|
||||
props.setProperty("queryPlan.explain", "explain (verbose)");
|
||||
|
||||
config.loadFromProperties(props);
|
||||
|
||||
@@ -99,6 +102,8 @@ class DatabaseConfigTest {
|
||||
assertTrue(settings.readOnlyDatabase());
|
||||
assertFalse(settings.isIncludeLabelInSql());
|
||||
assertThat(settings.getLengthCheck()).isEqualTo(LengthCheck.ON);
|
||||
assertThat(settings.getLazyLoadBatchSize()).isEqualTo(50);
|
||||
assertThat(settings.getQueryBatchSize()).isEqualTo(60);
|
||||
|
||||
assertTrue(settings.isIdGeneratorAutomatic());
|
||||
assertFalse(settings.getPlatformConfig().isCaseSensitiveCollation());
|
||||
@@ -129,15 +134,18 @@ class DatabaseConfigTest {
|
||||
assertEquals(42, settings.getQueryPlanCapturePeriodSecs());
|
||||
assertEquals(560, settings.getQueryPlanCaptureMaxTimeMillis());
|
||||
assertEquals(7, settings.getQueryPlanCaptureMaxCount());
|
||||
assertEquals("explain (verbose)", settings.getQueryPlanExplain());
|
||||
|
||||
assertThat(settings.getMappingLocations()).containsExactly("classpath:/foo","bar");
|
||||
|
||||
config.persistBatch(PersistBatch.NONE)
|
||||
.persistBatchOnCascade(PersistBatch.NONE)
|
||||
.lengthCheck(LengthCheck.ON)
|
||||
.lengthCheck(LengthCheck.UTF8);
|
||||
.lengthCheck(LengthCheck.UTF8)
|
||||
.queryPlanExplain("explain (buffers)");
|
||||
|
||||
|
||||
assertThat(config.settings().getQueryPlanExplain()).isEqualTo("explain (buffers)");
|
||||
Properties props1 = new Properties();
|
||||
props1.setProperty("ebean.persistBatch", "ALL");
|
||||
props1.setProperty("ebean.persistBatchOnCascade", "ALL");
|
||||
@@ -175,6 +183,8 @@ class DatabaseConfigTest {
|
||||
assertTrue(config.getPlatformConfig().isCaseSensitiveCollation());
|
||||
assertTrue(config.isAutoLoadModuleInfo());
|
||||
assertTrue(config.isLoadModuleInfo());
|
||||
assertThat(config.getLazyLoadBatchSize()).isEqualTo(100);
|
||||
assertThat(config.getQueryBatchSize()).isEqualTo(100);
|
||||
|
||||
assertFalse(config.isQueryPlanEnable());
|
||||
assertEquals(Long.MAX_VALUE, config.getQueryPlanThresholdMicros());
|
||||
@@ -182,6 +192,7 @@ class DatabaseConfigTest {
|
||||
assertEquals(600, config.getQueryPlanCapturePeriodSecs());
|
||||
assertEquals(10000L, config.getQueryPlanCaptureMaxTimeMillis());
|
||||
assertEquals(10, config.getQueryPlanCaptureMaxCount());
|
||||
assertThat(config.getQueryPlanExplain()).isNull();
|
||||
assertThat(config.getLengthCheck()).isEqualTo(LengthCheck.OFF);
|
||||
assertTrue(config.isIncludeLabelInSql());
|
||||
|
||||
@@ -192,6 +203,10 @@ class DatabaseConfigTest {
|
||||
assertTrue(config.isAutoPersistUpdates());
|
||||
config.setSkipDataSourceCheck(true);
|
||||
assertTrue(config.skipDataSourceCheck());
|
||||
config.lazyLoadBatchSize(20);
|
||||
assertThat(config.getLazyLoadBatchSize()).isEqualTo(20);
|
||||
config.queryBatchSize(30);
|
||||
assertThat(config.getQueryBatchSize()).isEqualTo(30);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package io.ebean.meta;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class QueryPlanInitTest {
|
||||
|
||||
@Test
|
||||
void initialQueryPlanInit() {
|
||||
var init = new QueryPlanInit();
|
||||
assertThat(init.isEmpty()).isTrue();
|
||||
assertThat(init.isAll()).isFalse();
|
||||
assertThat(init.thresholdMicros()).isEqualTo(0L);
|
||||
}
|
||||
|
||||
@Test
|
||||
void add_all() {
|
||||
var init = new QueryPlanInit();
|
||||
init.add("all", 57L);
|
||||
|
||||
assertThat(init.isEmpty()).isFalse();
|
||||
assertThat(init.isAll()).isTrue();
|
||||
assertThat(init.thresholdMicros()).isEqualTo(57L);
|
||||
}
|
||||
|
||||
@Test
|
||||
void addWithThresholds() {
|
||||
var init = new QueryPlanInit();
|
||||
init.thresholdMicros(1000);
|
||||
init.add("xOne", 0);
|
||||
init.add("xTwo", 2000L);
|
||||
|
||||
assertThat(init.isEmpty()).isFalse();
|
||||
assertThat(init.isAll()).isFalse();
|
||||
assertThat(init.includeHash("xJunk")).isFalse();
|
||||
assertThat(init.includeHash("xOne")).isTrue();
|
||||
assertThat(init.includeHash("xTwo")).isTrue();
|
||||
assertThat(init.thresholdMicros("xJunk")).isEqualTo(1000L);
|
||||
assertThat(init.thresholdMicros("xOne")).isEqualTo(1000L);
|
||||
assertThat(init.thresholdMicros("xTwo")).isEqualTo(2000L);
|
||||
}
|
||||
}
|
||||
+26
-26
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,25 +89,25 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -125,13 +125,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -155,37 +155,37 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -193,79 +193,79 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+6
-6
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -159,21 +159,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -348,6 +348,8 @@ public interface SpiEbeanServer extends SpiServer, BeanCollectionLoader {
|
||||
|
||||
<T> FutureList<T> findFutureList(SpiQuery<T> query);
|
||||
|
||||
<K, T> FutureMap<K, T> findFutureMap(SpiQuery<T> query);
|
||||
|
||||
<T> PagedList<T> findPagedList(SpiQuery<T> query);
|
||||
|
||||
<T> Set<T> findSet(SpiQuery<T> query);
|
||||
|
||||
@@ -14,6 +14,7 @@ import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Extends Transaction with additional API required on server.
|
||||
@@ -95,7 +96,7 @@ public interface SpiTransaction extends Transaction {
|
||||
/**
|
||||
* Return the start timestamp for the transaction (JVM side).
|
||||
*/
|
||||
long startNanoTime();
|
||||
Instant startTime();
|
||||
|
||||
/**
|
||||
* Return true if this transaction has updateAllLoadedProperties set.
|
||||
|
||||
@@ -14,6 +14,7 @@ import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Proxy for an underlying SpiTransaction (most of the API).
|
||||
@@ -28,8 +29,8 @@ public abstract class SpiTransactionProxy implements SpiTransaction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long startNanoTime() {
|
||||
return transaction.startNanoTime();
|
||||
public Instant startTime() {
|
||||
return transaction.startTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class DefaultServerQueryCache extends DefaultServerCache {
|
||||
|
||||
@Override
|
||||
protected Object unwrapEntry(CacheEntry entry) {
|
||||
return ((QueryCacheEntry) entry.getValue()).getValue();
|
||||
return ((QueryCacheEntry) entry.getValue()).value();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1249,66 +1249,55 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
}
|
||||
}
|
||||
|
||||
private <T> SpiQuery<T> configureForFuture(SpiQuery<T> query) {
|
||||
query.usingFuture();
|
||||
if (query.transaction() == null) {
|
||||
// use a current transaction if active
|
||||
query.usingTransaction(currentServerTransaction());
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> FutureRowCount<T> findFutureCount(SpiQuery<T> query) {
|
||||
SpiQuery<T> copy = query.copy();
|
||||
copy.usingFuture();
|
||||
boolean createdTransaction = false;
|
||||
SpiTransaction transaction = query.transaction();
|
||||
if (transaction == null) {
|
||||
transaction = currentServerTransaction();
|
||||
if (transaction == null) {
|
||||
transaction = (SpiTransaction) createTransaction();
|
||||
createdTransaction = true;
|
||||
}
|
||||
copy.usingTransaction(transaction);
|
||||
}
|
||||
var queryFuture = new QueryFutureRowCount<>(new CallableQueryCount<>(this, copy, createdTransaction));
|
||||
SpiQuery<T> copy = configureForFuture(query.copy());
|
||||
var queryFuture = new QueryFutureRowCount<>(new CallableQueryCount<>(this, copy));
|
||||
backgroundExecutor.execute(queryFuture.futureTask());
|
||||
return queryFuture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> FutureIds<T> findFutureIds(SpiQuery<T> query) {
|
||||
SpiQuery<T> copy = query.copy();
|
||||
copy.usingFuture();
|
||||
boolean createdTransaction = false;
|
||||
SpiTransaction transaction = query.transaction();
|
||||
if (transaction == null) {
|
||||
transaction = currentServerTransaction();
|
||||
if (transaction == null) {
|
||||
transaction = (SpiTransaction) createTransaction();
|
||||
createdTransaction = true;
|
||||
}
|
||||
copy.usingTransaction(transaction);
|
||||
}
|
||||
QueryFutureIds<T> queryFuture = new QueryFutureIds<>(new CallableQueryIds<>(this, copy, createdTransaction));
|
||||
SpiQuery<T> copy = configureForFuture(query.copy());
|
||||
final var queryFuture = new QueryFutureIds<T>(new CallableQueryIds<>(this, copy));
|
||||
backgroundExecutor.execute(queryFuture.futureTask());
|
||||
return queryFuture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> FutureList<T> findFutureList(SpiQuery<T> query) {
|
||||
SpiQuery<T> spiQuery = query.copy();
|
||||
spiQuery.usingFuture();
|
||||
// FutureList query always run in it's own persistence content
|
||||
SpiQuery<T> spiQuery = configureForFuture(query.copy());
|
||||
// FutureList query always run in its own persistence content
|
||||
spiQuery.setPersistenceContext(new DefaultPersistenceContext());
|
||||
if (!spiQuery.isDisableReadAudit()) {
|
||||
BeanDescriptor<T> desc = descriptorManager.descriptor(spiQuery.getBeanType());
|
||||
desc.readAuditFutureList(spiQuery);
|
||||
}
|
||||
// Create a new transaction solely to execute the findList() at some future time
|
||||
boolean createdTransaction = false;
|
||||
SpiTransaction transaction = query.transaction();
|
||||
if (transaction == null) {
|
||||
transaction = currentServerTransaction();
|
||||
if (transaction == null) {
|
||||
transaction = (SpiTransaction) createTransaction();
|
||||
createdTransaction = true;
|
||||
}
|
||||
spiQuery.usingTransaction(transaction);
|
||||
final var queryFuture = new QueryFutureList<T>(new CallableQueryList<>(this, spiQuery));
|
||||
backgroundExecutor.execute(queryFuture.futureTask());
|
||||
return queryFuture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <K, T> FutureMap<K, T> findFutureMap(SpiQuery<T> query) {
|
||||
SpiQuery<T> spiQuery = configureForFuture(query.copy());
|
||||
// FutureMap query always run in it's own persistence content
|
||||
spiQuery.setPersistenceContext(new DefaultPersistenceContext());
|
||||
if (!spiQuery.isDisableReadAudit()) {
|
||||
BeanDescriptor<T> desc = descriptorManager.descriptor(spiQuery.getBeanType());
|
||||
desc.readAuditFutureList(spiQuery);
|
||||
}
|
||||
QueryFutureList<T> queryFuture = new QueryFutureList<>(new CallableQueryList<>(this, spiQuery, createdTransaction));
|
||||
final var queryFuture = new QueryFutureMap<K, T>(new CallableQueryMap<>(this, spiQuery));
|
||||
backgroundExecutor.execute(queryFuture.futureTask());
|
||||
return queryFuture;
|
||||
}
|
||||
|
||||
@@ -585,27 +585,32 @@ public final class InternalConfiguration {
|
||||
return QueryPlanManager.NOOP;
|
||||
}
|
||||
long threshold = config.getQueryPlanThresholdMicros();
|
||||
return new CQueryPlanManager(transactionManager, threshold, queryPlanLogger(databasePlatform.platform()), extraMetrics);
|
||||
return new CQueryPlanManager(transactionManager, threshold, queryPlanLogger(databasePlatform.platform(), config), extraMetrics);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the logger to log query plans for the given platform.
|
||||
*/
|
||||
QueryPlanLogger queryPlanLogger(Platform platform) {
|
||||
QueryPlanLogger queryPlanLogger(Platform platform, DatabaseBuilder.Settings config) {
|
||||
switch (platform.base()) {
|
||||
case SQLSERVER:
|
||||
return new QueryPlanLoggerSqlServer();
|
||||
case ORACLE:
|
||||
return new QueryPlanLoggerOracle();
|
||||
case POSTGRES:
|
||||
return new QueryPlanLoggerExplain("explain (analyze, buffers) ");
|
||||
return new QueryPlanLoggerExplain(explain(config, "explain (analyze, costs, verbose, buffers) "));
|
||||
case YUGABYTE:
|
||||
return new QueryPlanLoggerExplain("explain (analyze, buffers, dist) ");
|
||||
return new QueryPlanLoggerExplain(explain(config,"explain (analyze, buffers, dist) "));
|
||||
default:
|
||||
return new QueryPlanLoggerExplain("explain ");
|
||||
return new QueryPlanLoggerExplain(explain(config,"explain "));
|
||||
}
|
||||
}
|
||||
|
||||
private static String explain(DatabaseBuilder.Settings config, String defaultExplain) {
|
||||
String explain = config.getQueryPlanExplain();
|
||||
return explain == null ? defaultExplain : explain + ' ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the DDL generator.
|
||||
*/
|
||||
|
||||
@@ -665,7 +665,7 @@ public final class OrmQueryRequest<T> extends BeanRequest implements SpiOrmQuery
|
||||
}
|
||||
|
||||
public void putToQueryCache(Object result) {
|
||||
beanDescriptor.queryCachePut(cacheKey, new QueryCacheEntry(result, dependentTables, transaction.startNanoTime()));
|
||||
beanDescriptor.queryCachePut(cacheKey, new QueryCacheEntry(result, dependentTables, transaction.startTime()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1471,7 +1471,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
void queryPlanInit(QueryPlanInit request, List<MetaQueryPlan> list) {
|
||||
for (CQueryPlan queryPlan : queryPlanCache.values()) {
|
||||
if (request.includeHash(queryPlan.hash())) {
|
||||
queryPlan.queryPlanInit(request.thresholdMicros());
|
||||
queryPlan.queryPlanInit(request.thresholdMicros(queryPlan.hash()));
|
||||
list.add(queryPlan.createMeta(null, null));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ final class BeanEmbeddedMetaFactory {
|
||||
}
|
||||
|
||||
private static int dbLength(Column override, BeanProperty source) {
|
||||
return (override != null && (override.length() != 255)) ? override.length() : source.dbLength();
|
||||
return (override != null && (override.length() != 0)) ? override.length() : source.dbLength();
|
||||
}
|
||||
|
||||
private static int dbScale(Column override, BeanProperty source) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.ebeaninternal.server.deploy;
|
||||
|
||||
import io.ebean.Query;
|
||||
import io.ebean.SqlUpdate;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.ValuePair;
|
||||
@@ -125,6 +124,10 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
// no imported or exported information
|
||||
} else if (!oneToOneExported) {
|
||||
importedId = createImportedId(this, targetDescriptor, tableJoin);
|
||||
if (importedId == null) {
|
||||
throw new PersistenceException("Cannot find imported id for " + fullName() + " from " + targetDescriptor
|
||||
+ ". If using native-image, possibly missing reflect-config for the Id property.");
|
||||
}
|
||||
if (importedId.isScalar()) {
|
||||
// limit JoinColumn mapping to the @Id / primary key
|
||||
TableJoinColumn[] columns = tableJoin.columns();
|
||||
|
||||
@@ -98,7 +98,7 @@ public abstract class AnnotationParser extends AnnotationBase {
|
||||
prop.setUnique(columnAnn.unique());
|
||||
if (columnAnn.precision() > 0) {
|
||||
prop.setDbLength(columnAnn.precision());
|
||||
} else if (columnAnn.length() != 255) {
|
||||
} else if (columnAnn.length() != 0) {
|
||||
// set default 255 on DbTypeMap
|
||||
prop.setDbLength(columnAnn.length());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.ebeaninternal.server.query;
|
||||
|
||||
import io.ebean.Transaction;
|
||||
import io.ebeaninternal.api.SpiEbeanServer;
|
||||
import io.ebeaninternal.api.SpiQuery;
|
||||
|
||||
@@ -11,11 +10,9 @@ abstract class CallableQuery<T> {
|
||||
|
||||
final SpiQuery<T> query;
|
||||
final SpiEbeanServer server;
|
||||
final Transaction transaction;
|
||||
|
||||
CallableQuery(SpiEbeanServer server, SpiQuery<T> query) {
|
||||
this.server = server;
|
||||
this.query = query;
|
||||
this.transaction = query.transaction();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,8 @@ import java.util.concurrent.Callable;
|
||||
*/
|
||||
public final class CallableQueryCount<T> extends CallableQuery<T> implements Callable<Integer> {
|
||||
|
||||
private final boolean createdTransaction;
|
||||
|
||||
/**
|
||||
* Note that the transaction passed in is always a new transaction solely to
|
||||
* find the row count so it must be cleaned up by this CallableQueryRowCount.
|
||||
*/
|
||||
public CallableQueryCount(SpiEbeanServer server, SpiQuery<T> query, boolean createdTransaction) {
|
||||
public CallableQueryCount(SpiEbeanServer server, SpiQuery<T> query) {
|
||||
super(server, query);
|
||||
this.createdTransaction = createdTransaction;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,13 +19,7 @@ public final class CallableQueryCount<T> extends CallableQuery<T> implements Cal
|
||||
*/
|
||||
@Override
|
||||
public Integer call() {
|
||||
try {
|
||||
return server.findCountWithCopy(query);
|
||||
} finally {
|
||||
if (createdTransaction) {
|
||||
transaction.end();
|
||||
}
|
||||
}
|
||||
return server.findCountWithCopy(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,28 +11,16 @@ import java.util.concurrent.Callable;
|
||||
*/
|
||||
public final class CallableQueryIds<T> extends CallableQuery<T> implements Callable<List<Object>> {
|
||||
|
||||
private final boolean createdTransaction;
|
||||
|
||||
public CallableQueryIds(SpiEbeanServer server, SpiQuery<T> query, boolean createdTransaction) {
|
||||
public CallableQueryIds(SpiEbeanServer server, SpiQuery<T> query) {
|
||||
super(server, query);
|
||||
this.createdTransaction = createdTransaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the find Id's query returning the list of Id's.
|
||||
*/
|
||||
@Override
|
||||
public List<Object> call() {
|
||||
// we have already made a copy of the query
|
||||
// this way the same query instance is available to the
|
||||
// QueryFutureIds (as so has access to the List before it is done)
|
||||
try {
|
||||
return server.findIdsWithCopy(query);
|
||||
} finally {
|
||||
if (createdTransaction) {
|
||||
transaction.end();
|
||||
}
|
||||
}
|
||||
return server.findIdsWithCopy(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,25 +11,13 @@ import java.util.concurrent.Callable;
|
||||
*/
|
||||
public final class CallableQueryList<T> extends CallableQuery<T> implements Callable<List<T>> {
|
||||
|
||||
private final boolean createdTransaction;
|
||||
|
||||
public CallableQueryList(SpiEbeanServer server, SpiQuery<T> query, boolean createdTransaction) {
|
||||
public CallableQueryList(SpiEbeanServer server, SpiQuery<T> query) {
|
||||
super(server, query);
|
||||
this.createdTransaction = createdTransaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the query returning the resulting List.
|
||||
*/
|
||||
@Override
|
||||
public List<T> call() {
|
||||
try {
|
||||
return server.findList(query);
|
||||
} finally {
|
||||
if (createdTransaction) {
|
||||
transaction.end();
|
||||
}
|
||||
}
|
||||
return server.findList(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.ebeaninternal.server.query;
|
||||
|
||||
import io.ebeaninternal.api.SpiEbeanServer;
|
||||
import io.ebeaninternal.api.SpiQuery;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
/**
|
||||
* Represent the findMap query as a Callable.
|
||||
*/
|
||||
public final class CallableQueryMap<K, T> extends CallableQuery<T> implements Callable<Map<K, T>> {
|
||||
|
||||
public CallableQueryMap(SpiEbeanServer server, SpiQuery<T> query) {
|
||||
super(server, query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, T> call() {
|
||||
return server.findMap(query);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -365,6 +365,11 @@ final class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T>, SpiQuery
|
||||
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <K> FutureMap<K,T> findFutureMap() {
|
||||
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PagedList<T> findPagedList() {
|
||||
throw new RuntimeException("EB102: Only select() and fetch() clause is allowed on FetchGroup");
|
||||
|
||||
@@ -23,10 +23,6 @@ public final class QueryFutureIds<T> extends BaseFuture<List<Object>> implements
|
||||
return futureTask;
|
||||
}
|
||||
|
||||
public Transaction transaction() {
|
||||
return call.transaction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> getQuery() {
|
||||
return call.query;
|
||||
|
||||
@@ -27,10 +27,6 @@ public final class QueryFutureList<T> extends BaseFuture<List<T>> implements Fut
|
||||
return futureTask;
|
||||
}
|
||||
|
||||
public Transaction transaction() {
|
||||
return call.transaction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> getQuery() {
|
||||
return call.query;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package io.ebeaninternal.server.query;
|
||||
|
||||
import io.ebean.FutureMap;
|
||||
import io.ebean.Query;
|
||||
import io.ebean.Transaction;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
/**
|
||||
* Default implementation for FutureMap.
|
||||
*/
|
||||
public final class QueryFutureMap<K, T> extends BaseFuture<Map<K, T>> implements FutureMap<K, T> {
|
||||
|
||||
private final CallableQueryMap<K, T> call;
|
||||
|
||||
public QueryFutureMap(CallableQueryMap<K, T> call) {
|
||||
super(new FutureTask<>(call));
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
public FutureTask<Map<K, T>> futureTask() {
|
||||
return futureTask;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<T> getQuery() {
|
||||
return call.query;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
call.query.cancel();
|
||||
return super.cancel(mayInterruptIfRunning);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, T> getUnchecked() {
|
||||
try {
|
||||
return get();
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
// restore the interrupted status (so client can check for that)
|
||||
Thread.currentThread().interrupt();
|
||||
throw new PersistenceException(e);
|
||||
|
||||
} catch (ExecutionException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<K, T> getUnchecked(long timeout, TimeUnit unit) throws TimeoutException {
|
||||
try {
|
||||
return get(timeout, unit);
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
// restore the interrupted status (so client can check for that)
|
||||
Thread.currentThread().interrupt();
|
||||
throw new PersistenceException(e);
|
||||
|
||||
} catch (ExecutionException e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,10 +21,6 @@ public final class QueryFutureRowCount<T> extends BaseFuture<Integer> implements
|
||||
return futureTask;
|
||||
}
|
||||
|
||||
public Transaction transaction() {
|
||||
return call.transaction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cancel(boolean mayInterruptIfRunning) {
|
||||
call.query.cancel();
|
||||
|
||||
@@ -76,6 +76,7 @@ final class SqlTreeNodeRoot extends SqlTreeNodeBean {
|
||||
|
||||
@Override
|
||||
public void dependentTables(Set<String> tables) {
|
||||
tables.add(baseTable);
|
||||
for (SqlTreeNode child : children) {
|
||||
child.dependentTables(tables);
|
||||
}
|
||||
|
||||
@@ -1614,6 +1614,11 @@ public class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<T> {
|
||||
return server.findFutureList(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <K> FutureMap<K, T> findFutureMap() {
|
||||
return server.findFutureMap(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final FutureRowCount<T> findFutureCount() {
|
||||
return server.findFutureCount(this);
|
||||
|
||||
+4
-3
@@ -14,6 +14,7 @@ import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -58,6 +59,7 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
private SpiPersistenceContext persistenceContext;
|
||||
private Object tenantId;
|
||||
private Map<String, Object> userObjects;
|
||||
private final Instant startTime = Instant.now();
|
||||
private final long startNanos;
|
||||
private ProfileLocation profileLocation;
|
||||
|
||||
@@ -89,9 +91,8 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
}
|
||||
|
||||
@Override
|
||||
public long startNanoTime() {
|
||||
// not used on read only transaction
|
||||
return startNanos;
|
||||
public Instant startTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@ import jakarta.persistence.PersistenceException;
|
||||
import jakarta.persistence.RollbackException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@@ -91,6 +92,7 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
DocStoreTransaction docStoreTxn;
|
||||
private ProfileStream profileStream;
|
||||
private ProfileLocation profileLocation;
|
||||
private final Instant startTime = Instant.now();
|
||||
private final long startNanos;
|
||||
private boolean autoPersistUpdates;
|
||||
|
||||
@@ -141,8 +143,8 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long startNanoTime() {
|
||||
return startNanos;
|
||||
public final Instant startTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Placeholder for use with SUPPORTS and NEVER transactional when there really isn't a transaction.
|
||||
@@ -56,9 +57,9 @@ final class NoTransaction implements SpiTransaction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public long startNanoTime() {
|
||||
public Instant startTime() {
|
||||
// not used
|
||||
return System.nanoTime();
|
||||
return Instant.now();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.ebean.cache.QueryCacheEntryValidate;
|
||||
import io.ebean.cache.ServerCacheNotification;
|
||||
import io.ebean.cache.ServerCacheNotify;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -23,7 +24,7 @@ public final class TableModState implements QueryCacheEntryValidate, ServerCache
|
||||
|
||||
private static final System.Logger log = AppLog.getLogger("io.ebean.cache.TABLEMOD");
|
||||
|
||||
private final Map<String, Long> tableModStamp = new ConcurrentHashMap<>();
|
||||
private final Map<String, Instant> tableModStamp = new ConcurrentHashMap<>();
|
||||
|
||||
public TableModState() {
|
||||
}
|
||||
@@ -32,22 +33,22 @@ public final class TableModState implements QueryCacheEntryValidate, ServerCache
|
||||
* Set the modified timestamp on the tables that have been touched.
|
||||
*/
|
||||
void touch(Set<String> touchedTables) {
|
||||
long modNanoTime = System.nanoTime();
|
||||
final var modTime = Instant.now();
|
||||
for (String tableName : touchedTables) {
|
||||
tableModStamp.put(tableName, modNanoTime);
|
||||
tableModStamp.put(tableName, modTime);
|
||||
}
|
||||
if (log.isLoggable(DEBUG)) {
|
||||
log.log(DEBUG, "TableModState updated - touched:{0} modNanoTime:{1}", touchedTables, modNanoTime);
|
||||
log.log(DEBUG, "TableModState updated - touched:{0} modTime:{1}", touchedTables, modTime);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if all the tables are valid based on timestamp comparison.
|
||||
*/
|
||||
boolean isValid(Set<String> tables, long sinceNanoTime) {
|
||||
boolean isValid(Set<String> tables, Instant sinceTime) {
|
||||
for (String tableName : tables) {
|
||||
Long modTime = tableModStamp.get(tableName);
|
||||
if (modTime != null && modTime >= sinceNanoTime) {
|
||||
final var modTime = tableModStamp.get(tableName);
|
||||
if (modTime != null && !modTime.isBefore(sinceTime)) {
|
||||
if (log.isLoggable(TRACE)) {
|
||||
log.log(TRACE, "Invalidate on table:{0}", tableName);
|
||||
}
|
||||
@@ -59,9 +60,9 @@ public final class TableModState implements QueryCacheEntryValidate, ServerCache
|
||||
|
||||
@Override
|
||||
public boolean isValid(QueryCacheEntry entry) {
|
||||
Set<String> dependentTables = entry.getDependentTables();
|
||||
Set<String> dependentTables = entry.dependentTables();
|
||||
if (dependentTables != null && !dependentTables.isEmpty()) {
|
||||
return isValid(dependentTables, entry.getTimestamp());
|
||||
return isValid(dependentTables, entry.timestamp());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.transaction;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -9,24 +10,23 @@ import java.util.Set;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class TableModStateTest {
|
||||
class TableModStateTest {
|
||||
|
||||
private TableModState tableModState = new TableModState();
|
||||
private final TableModState tableModState = new TableModState();
|
||||
|
||||
@Test
|
||||
public void isValid() {
|
||||
|
||||
long before = System.nanoTime();
|
||||
void isValid() {
|
||||
Instant before = Instant.now();
|
||||
|
||||
tableModState.touch(setOf("one", "two", "three"));
|
||||
|
||||
long after = System.nanoTime();
|
||||
Instant after = Instant.now();
|
||||
|
||||
// empty
|
||||
assertTrue(tableModState.isValid(Collections.emptySet(), 12L));
|
||||
assertTrue(tableModState.isValid(Collections.emptySet(), before));
|
||||
|
||||
// no entry
|
||||
assertTrue(tableModState.isValid(setOf("noEntry"), 12L));
|
||||
assertTrue(tableModState.isValid(setOf("noEntry"), before));
|
||||
|
||||
// later timestamp
|
||||
assertTrue(tableModState.isValid(setOf("one"), after));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean net postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ ebean:
|
||||
postgis:
|
||||
containerName: ebeanbuild_postgis2
|
||||
port: 9433
|
||||
image: ghcr.io/baosystems/postgis:15
|
||||
image: ghcr.io/baosystems/postgis:16
|
||||
# extensions: postgis
|
||||
# url: jdbc:postgresql_lwgis://localhost:6432/mygisapp
|
||||
# driver: org.postgis.DriverWrapperLW
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ ebean:
|
||||
postgis:
|
||||
containerName: ebeanbuild_postgis
|
||||
port: 9432
|
||||
image: ghcr.io/baosystems/postgis:15
|
||||
image: ghcr.io/baosystems/postgis:16
|
||||
# extensions: postgis
|
||||
# url: jdbc:postgresql_lwgis://localhost:6432/mygisapp
|
||||
# driver: org.postgis.DriverWrapperLW
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -856,6 +856,11 @@ public abstract class QueryBean<T, R extends QueryBean<T, R>> implements IQueryB
|
||||
return query.findFutureList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <K> FutureMap<K,T> findFutureMap() {
|
||||
return query.findFutureMap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final PagedList<T> findPagedList() {
|
||||
return query.findPagedList();
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -29,35 +29,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.ebean.redis;
|
||||
|
||||
import io.ebean.cache.ServerCache;
|
||||
import io.ebean.cache.ServerCacheStatistics;
|
||||
import io.ebean.meta.MetricVisitor;
|
||||
import io.ebeaninternal.server.cache.DefaultServerCache;
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ final class RedisCacheFactory implements ServerCacheFactory {
|
||||
public void invalidateKeys(String cacheKey, Set<Object> keySet) {
|
||||
try {
|
||||
sendMessage(messageInvalidateKeys(cacheKey, keySet));
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(ERROR, "failed to transmit invalidateKeys() message", e);
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ final class RedisCacheFactory implements ServerCacheFactory {
|
||||
public void invalidateKey(String cacheKey, Object id) {
|
||||
try {
|
||||
sendMessage(messageInvalidateKey(cacheKey, id));
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(ERROR, "failed to transmit invalidateKeys() message", e);
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ final class RedisCacheFactory implements ServerCacheFactory {
|
||||
public void invalidateClear(String cacheKey) {
|
||||
try {
|
||||
sendMessage(messageInvalidateClear(cacheKey));
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(ERROR, "failed to transmit invalidateKeys() message", e);
|
||||
}
|
||||
}
|
||||
@@ -422,7 +422,7 @@ final class RedisCacheFactory implements ServerCacheFactory {
|
||||
throw new IllegalStateException("Unexpected message type ? " + msgType);
|
||||
}
|
||||
|
||||
} catch (IOException | ClassNotFoundException e) {
|
||||
} catch (Exception e) {
|
||||
logger.log(ERROR, "failed to decode near cache message [" + SafeEncoder.encode(message) + "] for cache:" + cacheKey, e);
|
||||
if (cacheKey != null) {
|
||||
nearCacheInvalidateClear(cacheKey);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -33,20 +33,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -149,14 +149,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.10.0</version>
|
||||
<version>16.0.0-rc1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class PostgisSetup implements PlatformSetup {
|
||||
}
|
||||
config.setExtensions("hstore,pgcrypto,postgis");
|
||||
config.setDockerContainerName("ut_postgis");
|
||||
config.setDockerVersion("14-3.2");
|
||||
config.setDockerVersion("16-3.5");
|
||||
return config.getDockerProperties();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class PostgresSetup implements PlatformSetup {
|
||||
if (!config.isUseDocker()) {
|
||||
return new Properties();
|
||||
}
|
||||
config.setDockerVersion("14");
|
||||
config.setDockerVersion("16");
|
||||
config.setExtensions("hstore,pgcrypto");
|
||||
return config.getDockerProperties();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.ebean.xtest;
|
||||
|
||||
import io.avaje.config.Config;
|
||||
import io.ebean.CacheMode;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Database;
|
||||
@@ -71,6 +72,12 @@ public abstract class BaseTestCase {
|
||||
String propsFile = System.getProperty("props.file");
|
||||
System.out.println("BaseTestCase: -Dprops.file=" + propsFile); // help debug CI
|
||||
// First try, if we get the default server. If this fails, all tests will fail.
|
||||
String dsName = Config.getNullable("datasource.default");
|
||||
System.out.println("config: datasource.default " + dsName);
|
||||
System.out.println("config: username " + Config.getNullable("datasource." + dsName + ".username"));
|
||||
System.out.println("config: password " + Config.getNullable("datasource." + dsName + ".password"));
|
||||
System.out.println("config: url " + Config.getNullable("datasource." + dsName + ".url"));
|
||||
|
||||
DB.getDefault();
|
||||
} catch (Throwable e) {
|
||||
logger.error("Fatal error while getting ebean-server. Exiting...", e);
|
||||
|
||||
@@ -653,6 +653,11 @@ public class TDSpiEbeanServer extends TDSpiServer implements SpiEbeanServer {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <K, T> FutureMap<K, T> findFutureMap(SpiQuery<T> query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> PagedList<T> findPagedList(SpiQuery<T> query) {
|
||||
return null;
|
||||
|
||||
+11
-60
@@ -2,99 +2,50 @@ package io.ebean.xtest.internal.server.query;
|
||||
|
||||
import io.ebean.*;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebeaninternal.server.query.QueryFutureIds;
|
||||
import io.ebeaninternal.server.query.QueryFutureList;
|
||||
import io.ebeaninternal.server.query.QueryFutureRowCount;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class TestFutureRowCountErrorHandling extends BaseTestCase {
|
||||
class TestFutureRowCountErrorHandling extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void testFutureRowCount() throws InterruptedException {
|
||||
|
||||
void testFutureRowCount() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Database server = DB.getDefault();
|
||||
|
||||
Query<Customer> query = server.createQuery(Customer.class)
|
||||
Query<Customer> query = DB.find(Customer.class)
|
||||
.where().eq("doesNotExist", "this will fail")
|
||||
.query();
|
||||
|
||||
FutureRowCount<Customer> futureRowCount = query.findFutureCount();
|
||||
|
||||
QueryFutureRowCount<Customer> internalRowCount = (QueryFutureRowCount<Customer>) futureRowCount;
|
||||
Transaction t = internalRowCount.transaction();
|
||||
|
||||
try {
|
||||
futureRowCount.get();
|
||||
fail("never get here as the SQL is invalid");
|
||||
|
||||
} catch (ExecutionException e) {
|
||||
// Confirm the Transaction has been rolled back
|
||||
assertFalse(t.isActive());
|
||||
}
|
||||
|
||||
assertThrows(ExecutionException.class, futureRowCount::get);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFutureIds() throws InterruptedException {
|
||||
|
||||
void testFutureIds() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Database server = DB.getDefault();
|
||||
|
||||
Query<Customer> query = server.createQuery(Customer.class)
|
||||
Query<Customer> query = DB.find(Customer.class)
|
||||
.where().eq("doesNotExist", "this will fail")
|
||||
.query();
|
||||
|
||||
FutureIds<Customer> futureIds = query.findFutureIds();
|
||||
|
||||
QueryFutureIds<Customer> internalFuture = (QueryFutureIds<Customer>) futureIds;
|
||||
Transaction t = internalFuture.transaction();
|
||||
|
||||
try {
|
||||
internalFuture.get();
|
||||
fail("never get here as the SQL is invalid");
|
||||
|
||||
} catch (ExecutionException e) {
|
||||
// Confirm the Transaction has been rolled back
|
||||
assertFalse(t.isActive());
|
||||
}
|
||||
|
||||
assertThrows(ExecutionException.class, futureIds::get);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testFutureList() throws InterruptedException {
|
||||
|
||||
void testFutureList() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Database server = DB.getDefault();
|
||||
|
||||
Query<Customer> query = server.createQuery(Customer.class)
|
||||
Query<Customer> query = DB.createQuery(Customer.class)
|
||||
.where().eq("doesNotExist", "this will fail")
|
||||
.query();
|
||||
|
||||
FutureList<Customer> futureList = query.findFutureList();
|
||||
|
||||
QueryFutureList<Customer> internalFuture = (QueryFutureList<Customer>) futureList;
|
||||
Transaction t = internalFuture.transaction();
|
||||
|
||||
try {
|
||||
internalFuture.get();
|
||||
fail("never get here as the SQL is invalid");
|
||||
|
||||
} catch (ExecutionException e) {
|
||||
// Confirm the Transaction has been rolled back
|
||||
assertFalse(t.isActive());
|
||||
}
|
||||
|
||||
assertThrows(ExecutionException.class, futureList::get);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package misc.migration.v1_0;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
@@ -11,6 +12,7 @@ public class CKeyDetail {
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
@Column(length = 255)
|
||||
String something;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package org.tests.cache;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.xtest.ForPlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.cache.EColAB;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestQueryCacheConcurrent extends BaseTestCase {
|
||||
|
||||
private volatile boolean running;
|
||||
private volatile boolean failed;
|
||||
private volatile int step;
|
||||
|
||||
@ForPlatform(Platform.POSTGRES) // H2 isn't good enough for this test
|
||||
@Test
|
||||
public void testConcurrent() throws InterruptedException {
|
||||
|
||||
Thread t1 = new Thread(() -> {
|
||||
while (running) {
|
||||
while (step <1) {
|
||||
if (!running) return;
|
||||
}
|
||||
System.out.println("T1 BEFORE Insert");
|
||||
new EColAB("01", "20").save();
|
||||
System.out.println("T1 AFTER Insert");
|
||||
step = 2;
|
||||
while (step < 3) {
|
||||
if (!running) return;
|
||||
}
|
||||
System.out.println("-------------------------");
|
||||
step = 1;
|
||||
}
|
||||
});
|
||||
|
||||
Thread t2 = new Thread(() -> {
|
||||
while (running) {
|
||||
while (step < 1) {
|
||||
if (!running) return;
|
||||
}
|
||||
System.out.println("T2 before FIND1");
|
||||
List<EColAB> list = DB.find(EColAB.class)
|
||||
.setUseQueryCache(true)
|
||||
.where()
|
||||
.eq("columnA", "01")
|
||||
.eq("columnB", "20")
|
||||
.findList();
|
||||
System.out.println("T2 FIND1: " + list.size());
|
||||
while (step < 2) {
|
||||
if (!running) return;
|
||||
}
|
||||
System.out.println("T2 before FIND2");
|
||||
list = DB.find(EColAB.class)
|
||||
.setUseQueryCache(true)
|
||||
.where()
|
||||
.eq("columnA", "01")
|
||||
.eq("columnB", "20")
|
||||
.findList();
|
||||
System.out.println("T2 FIND2: " + list.size());
|
||||
if (list.isEmpty()) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
list = DB.find(EColAB.class)
|
||||
.setUseQueryCache(true)
|
||||
.where()
|
||||
.eq("columnA", "01")
|
||||
.eq("columnB", "20")
|
||||
.findList();
|
||||
System.out.println("After 1s: in cache" + list);
|
||||
System.out.println("... in DB" + DB.find(EColAB.class).findOne());
|
||||
}
|
||||
if (list.isEmpty()) {
|
||||
failed = true;
|
||||
}
|
||||
DB.find(EColAB.class).delete();
|
||||
step = 3;
|
||||
}
|
||||
});
|
||||
|
||||
running = true;
|
||||
t1.start();
|
||||
t2.start();
|
||||
step = 1;
|
||||
Thread.sleep(1000);
|
||||
running = false;
|
||||
t1.join();
|
||||
t2.join();
|
||||
assertThat(failed).isFalse();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class Pview {
|
||||
private String name;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(length = 100, nullable = false)
|
||||
@Column(length = 255, nullable = false)
|
||||
private String value;
|
||||
|
||||
@JoinTable(name = "pp_to_ww", joinColumns = {@JoinColumn(name = "pp_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "ww_id", referencedColumnName = "id")})
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
package org.tests.query;
|
||||
|
||||
import io.ebean.FutureMap;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.FutureList;
|
||||
import io.ebean.Transaction;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Order;
|
||||
import org.tests.model.basic.Product;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class TestQueryFindFutureList extends BaseTestCase {
|
||||
class TestQueryFindFutureList extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test_cancel() throws InterruptedException {
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
void test_cancel() throws InterruptedException {
|
||||
ResetBasicData.reset();
|
||||
|
||||
// warm the connection pool
|
||||
@@ -41,8 +45,7 @@ public class TestQueryFindFutureList extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_findFutureList() throws InterruptedException {
|
||||
|
||||
void test_findFutureList() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
FutureList<Order> futureList = DB.find(Order.class).findFutureList();
|
||||
@@ -54,17 +57,48 @@ public class TestQueryFindFutureList extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_findFutureListWithTimeout() throws InterruptedException, TimeoutException {
|
||||
|
||||
void test_findFutureListWithTimeout() throws TimeoutException {
|
||||
ResetBasicData.reset();
|
||||
|
||||
FutureList<Order> futureList = DB.find(Order.class).findFutureList();
|
||||
FutureList<Product> futureList2 = DB.find(Product.class).findFutureList();
|
||||
|
||||
// wait for it to complete
|
||||
List<Order> orders = futureList.getUnchecked(1, TimeUnit.SECONDS);
|
||||
List<Product> products2 = futureList2.getUnchecked(1, TimeUnit.SECONDS);
|
||||
|
||||
assertEquals(DB.find(Order.class).findCount(), orders.size());
|
||||
assertThat(products2).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
void test_findFutureMap_defaultIdAsKey() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
FutureMap<Integer, Order> futureMap = DB.find(Order.class)
|
||||
.findFutureMap();
|
||||
|
||||
// wait for it to complete
|
||||
Map<Integer, Order> orders = futureMap.getUnchecked();
|
||||
|
||||
assertEquals(DB.find(Order.class).findCount(), orders.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void test_findFutureMap() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
FutureMap<String, Product> futureMap = DB.find(Product.class)
|
||||
.setMapKey("sku")
|
||||
.findFutureMap();
|
||||
|
||||
// wait for it to complete
|
||||
Map<String, Product> products = futureMap.getUnchecked();
|
||||
Product desk = products.get("DSK1");
|
||||
assertThat(desk).isNotNull();
|
||||
assertThat(desk.getName()).isEqualTo("Desk");
|
||||
assertEquals(DB.find(Product.class).findCount(), products.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -131,17 +131,17 @@ datasource.hsqldb.url=jdbc:hsqldb:mem:tests
|
||||
# Set caseSensitiveCollation to false when using
|
||||
# MySql with case insensitive collation
|
||||
#ebean.mysql.caseSensitiveCollation=false
|
||||
datasource.mysql.username=unit
|
||||
datasource.mysql.password=unit
|
||||
datasource.mysql.url=jdbc:mysql://127.0.0.1:4306/unit
|
||||
datasource.mysql.username=test_ebean
|
||||
datasource.mysql.password=test
|
||||
datasource.mysql.url=jdbc:mysql://127.0.0.1:4306/test_ebean
|
||||
#datasource.mysql.username=test_ebean
|
||||
#datasource.mysql.password=test
|
||||
#datasource.mysql.url=jdbc:mysql://127.0.0.1:4306/test_ebean
|
||||
#datasource.mysql.driver=com.mysql.cj.jdbc.Driver
|
||||
|
||||
datasource.mariadb.username=unit
|
||||
datasource.mariadb.password=unit
|
||||
datasource.mariadb.url=jdbc:mariadb://localhost:5306/unit?useLegacyDatetimeCode=false
|
||||
datasource.mariadb.password=test
|
||||
datasource.mariadb.url=jdbc:mariadb://localhost:14307/unit?useLegacyDatetimeCode=false
|
||||
|
||||
datasource.cockroach.username=root
|
||||
datasource.cockroach.password=
|
||||
@@ -152,6 +152,10 @@ datasource.yugabyte.username=unit
|
||||
datasource.yugabyte.password=test
|
||||
datasource.yugabyte.url=jdbc:postgresql://localhost:6433/unit?sslmode=disable
|
||||
|
||||
datasource.postgres.username=unit
|
||||
datasource.postgres.password=test
|
||||
datasource.postgres.url=jdbc:postgresql://localhost:6432/unit
|
||||
|
||||
datasource.oracle.username=test_eb
|
||||
datasource.oracle.password=test
|
||||
datasource.oracle.url=jdbc:oracle:thin:@localhost:1521:XE
|
||||
@@ -191,8 +195,8 @@ datasource.nuodb.password=test
|
||||
datasource.nuodb.url=jdbc:com.nuodb://localhost/testdb
|
||||
#datasource.nuodb.driver=com.nuodb.jdbc.Driver
|
||||
|
||||
datasource.db2.username=unit
|
||||
datasource.db2.password=test
|
||||
datasource.db2.username=admin
|
||||
datasource.db2.password=admin
|
||||
datasource.db2.url=jdbc:db2://127.0.0.1:50000/unit
|
||||
#datasource.db2.driver=com.ibm.db2.jcc.DB2Driver
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ create table migtest_ckey_assoc (
|
||||
|
||||
create table migtest_ckey_detail (
|
||||
id integer generated by default as identity not null,
|
||||
something varchar,
|
||||
something varchar(255),
|
||||
constraint pk_migtest_ckey_detail primary key (id)
|
||||
);
|
||||
|
||||
|
||||
@@ -174,6 +174,7 @@ update migtest_e_history6 set test_number1 = 42 where test_number1 is null;
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column "select" varchar;
|
||||
alter table "table" add column textfield2 varchar;
|
||||
alter table migtest_ckey_detail alter column something type varchar;
|
||||
alter table migtest_ckey_detail add column one_key integer;
|
||||
alter table migtest_ckey_detail add column two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column assoc_id integer;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
479024598, 1.0__initial.sql
|
||||
51162323, 1.1.sql
|
||||
-1873582099, 1.0__initial.sql
|
||||
-105047402, 1.1.sql
|
||||
856096334, 1.2__dropsFor_1.1.sql
|
||||
-1876375912, 1.3.sql
|
||||
-1416035730, 1.4__dropsFor_1.3.sql
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
</createTable>
|
||||
<createTable name="migtest_ckey_detail" pkName="pk_migtest_ckey_detail">
|
||||
<column name="id" type="integer" primaryKey="true"/>
|
||||
<column name="something" type="varchar"/>
|
||||
<column name="something" type="varchar(255)"/>
|
||||
</createTable>
|
||||
<createTable name="migtest_ckey_parent" pkName="pk_migtest_ckey_parent">
|
||||
<column name="one_key" type="integer" primaryKey="true"/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
|
||||
<changeSet type="apply">
|
||||
<alterColumn columnName="something" tableName="migtest_ckey_detail" type="varchar" currentType="varchar(255)" currentNotnull="false"/>
|
||||
<addColumn tableName="migtest_ckey_detail">
|
||||
<column name="one_key" type="integer"/>
|
||||
<column name="two_key" type="varchar(127)"/>
|
||||
|
||||
@@ -8,7 +8,7 @@ create table migtest_ckey_assoc (
|
||||
|
||||
create table migtest_ckey_detail (
|
||||
id integer generated by default as identity not null,
|
||||
something varchar,
|
||||
something varchar(255),
|
||||
constraint pk_migtest_ckey_detail primary key (id)
|
||||
);
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ drop view table_with_history;
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column if not exists "select" varchar;
|
||||
alter table "table" add column if not exists textfield2 varchar;
|
||||
alter table migtest_ckey_detail alter column something type varchar using something::varchar;
|
||||
alter table migtest_ckey_detail add column if not exists one_key integer;
|
||||
alter table migtest_ckey_detail add column if not exists two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column if not exists assoc_id integer;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
284266403, 1.0__initial.sql
|
||||
2064479644, 1.1.sql
|
||||
542280208, 1.0__initial.sql
|
||||
-235555338, 1.1.sql
|
||||
-328303888, 1.2__dropsFor_1.1.sql
|
||||
-1996146206, 1.3.sql
|
||||
-1371008923, 1.4__dropsFor_1.3.sql
|
||||
|
||||
@@ -8,7 +8,7 @@ create table migtest_ckey_assoc (
|
||||
|
||||
create table migtest_ckey_detail (
|
||||
id serial not null,
|
||||
something varchar,
|
||||
something varchar(255),
|
||||
constraint pk_migtest_ckey_detail primary key (id)
|
||||
);
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ drop view table_with_history;
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column if not exists "select" varchar;
|
||||
alter table "table" add column if not exists textfield2 varchar;
|
||||
alter table migtest_ckey_detail alter column something type varchar using something::varchar;
|
||||
alter table migtest_ckey_detail add column if not exists one_key integer;
|
||||
alter table migtest_ckey_detail add column if not exists two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column if not exists assoc_id integer;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
514058702, 1.0__initial.sql
|
||||
571906717, 1.1.sql
|
||||
-1894519595, 1.0__initial.sql
|
||||
2074012688, 1.1.sql
|
||||
-328303888, 1.2__dropsFor_1.1.sql
|
||||
477371035, 1.3.sql
|
||||
-1371008923, 1.4__dropsFor_1.3.sql
|
||||
|
||||
@@ -8,7 +8,7 @@ create table migtest_ckey_assoc (
|
||||
|
||||
create table migtest_ckey_detail (
|
||||
id integer generated by default as identity not null,
|
||||
something varchar,
|
||||
something varchar(255),
|
||||
constraint pk_migtest_ckey_detail primary key (id)
|
||||
);
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ drop view table_with_history;
|
||||
alter table "table" alter column textfield drop not null;
|
||||
alter table "table" add column if not exists "select" varchar;
|
||||
alter table "table" add column if not exists textfield2 varchar;
|
||||
alter table migtest_ckey_detail alter column something type varchar using something::varchar;
|
||||
alter table migtest_ckey_detail add column if not exists one_key integer;
|
||||
alter table migtest_ckey_detail add column if not exists two_key varchar(127);
|
||||
alter table migtest_ckey_parent add column if not exists assoc_id integer;
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
-774059250, 1.0__initial.sql
|
||||
-878073832, 1.1.sql
|
||||
-1522959794, 1.0__initial.sql
|
||||
-2041267516, 1.1.sql
|
||||
-328303888, 1.2__dropsFor_1.1.sql
|
||||
-778024154, 1.3.sql
|
||||
-1371008923, 1.4__dropsFor_1.3.sql
|
||||
|
||||
@@ -3,6 +3,6 @@ ebean.test.dbName=unit
|
||||
# we need admin user to call the procedure SYSPROC.ADMIN_MOVE_TABLE
|
||||
ebean.test.username=admin
|
||||
ebean.test.password=admin
|
||||
datasource.default=db2-11
|
||||
ebean.db2-11.databasePlatformName=db2luw
|
||||
datasource.default=db2
|
||||
ebean.db2.databasePlatformName=db2luw
|
||||
ebean.lengthCheck=utf8
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ebean.test.platform=mariadb
|
||||
ebean.test.dbName=test_ebean
|
||||
ebean.test.dbName=unit
|
||||
ebean.test.mariadb.version=10.6
|
||||
ebean.test.mariadb.containerName=ut_mariadb-10-6
|
||||
ebean.test.mariadb.port=14307
|
||||
datasource.default=mariadb-106
|
||||
datasource.default=mariadb
|
||||
ebean.lengthCheck=on
|
||||
|
||||
@@ -3,5 +3,5 @@ ebean.test.platform=mysql
|
||||
ebean.test.dbName=test_ebean
|
||||
# note: do not conflict with mariadb port
|
||||
#ebean.test.mysql.port=4306
|
||||
datasource.default=mysql-docker
|
||||
datasource.default=mysql
|
||||
ebean.lengthCheck=on
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ebean.test.platform=postgres
|
||||
datasource.default=postgres
|
||||
ebean.test.dbName=unit
|
||||
ebean.test.postgres.version=15
|
||||
ebean.test.postgres.version=16
|
||||
ebean.lengthCheck=on
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
ebean.test.platform=sqlserver
|
||||
ebean.test.dbName=test_ebean
|
||||
ebean.test.sqlserver.version=2017-CU28-ubuntu-16.04
|
||||
ebean.test.sqlserver.version=2017-CU31-ubuntu-18.04
|
||||
ebean.test.sqlserver.containerName=local_sqlserver2017
|
||||
ebean.test.sqlserver.collation=LATIN1_GENERAL_100_CS_AS_SC
|
||||
ebean.test.sqlserver.port=9435
|
||||
ebean.test.sqlserver.url=jdbc:sqlserver://localhost:9435;databaseName=test_ebean;sendTimeAsDateTime=false;integratedSecurity=false;trustServerCertificate=true
|
||||
|
||||
datasource.default=sqlserver2017
|
||||
datasource.default=sqlserver
|
||||
ebean.sqlserver2017.databasePlatformName=sqlserver17
|
||||
ebean.lengthCheck=on
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user