Compare commits

...
Author SHA1 Message Date
Rob Bygrave b6b666013e ClickHouse: Support optimised inserts for ClickHouse 2024-04-17 22:50:28 +12:00
Rob Bygrave e51d9ba2ab Fix test test-java16 using maven.compiler.release 2024-04-14 22:26:20 +12:00
Rob BygraveandGitHub 1b1dce90ed Merge pull request #3385 from ebean-orm/feature/rename-tqrootbean
Rename TQRootBean to QueryBean
2024-04-12 22:47:07 +12:00
Rob BygraveandGitHub 405834fa45 Merge branch 'master' into feature/rename-tqrootbean 2024-04-12 22:46:55 +12:00
Rob BygraveandGitHub 7720229af9 Merge pull request #3389 from ebean-orm/feature/bump-datasource-2
Bump ebean-datasource, ebean-test-containers, ebean-agent
2024-04-12 21:51:51 +12:00
Rob Bygrave 89a294414e Bump ebean-agent 14.2.1 2024-04-12 21:49:56 +12:00
Rob Bygrave 7bbfc00b86 Bump ebean-datasource and ebean-test-containers
ebean-datasource 8.14 has experimental lambda mode
ebean-test-containers has helper method to create S3Client for Localstack
2024-04-11 23:20:37 +12:00
Rob BygraveandGitHub d6c76de0a2 Merge pull request #3387 from ebean-orm/feature/bump-parent-4_1-byteBuddy
Bump parent to 4.1 with Byte-Buddy net.bytebuddy.experimental=true
2024-04-09 21:32:32 +12:00
Rob Bygrave 36f3986689 Bump avaje junit composite and bytebuddy to 1.14.13 2024-04-09 21:06:52 +12:00
Rob Bygrave f0f4f13ec6 Bump parent to 4.1 with Byte-Buddy net.bytebuddy.experimental=true
Uses maven-surefire-plugin with:
<argLine>-XX:+EnableDynamicAgentLoading -Dnet.bytebuddy.experimental=true</argLine>
2024-04-09 21:03:59 +12:00
Rob Bygrave 08466d42e9 Fix test TestLazyLoadMany with orderBy on query 2024-04-05 22:56:05 +13:00
Rob Bygrave 1f841982a5 Rename TQRootBean to QueryBean 2024-04-05 22:08:26 +13:00
Rob Bygrave b34704a1fa Fix kotlin test to use latest kotlin-querybean-generator 2024-04-05 00:29:17 +13:00
Rob Bygrave 0128d64841 Version 14.1.0 2024-04-04 22:54:23 +13:00
Rob Bygrave 68b313f778 Update ebean-agent to 14.1.0
This version allows for removal of query bean setRoot() which is no longer needed.
2024-04-04 22:42:06 +13:00
Rob BygraveandGitHub fad32c58d8 Merge pull request #3384 from ebean-orm/feature/rename-iquerybean
Rename QueryBean interface to IQueryBean (because we want to rename TQRootBean)
2024-04-04 22:36:59 +13:00
Rob Bygrave 8f1ebdb89a Rename QueryBean interface to IQueryBean (because we want to rename TQRootBean)
We want to rename TQRootBean to QueryBean. I can't do that right now because we need to make ebean-agent aware of that first. So yes, perhaps not ideal with IQueryBean but I think it will make sense once TQRootBean is renamed to QueryBean.
2024-04-04 22:35:55 +13:00
Rob BygraveandGitHub f7703efde2 Merge pull request #3383 from ebean-orm/feature/orderById
#3379 Followup, Move orderById() to common QueryBuilder interface
2024-04-04 22:09:34 +13:00
Rob BygraveandGitHub c5ffccb649 Merge pull request #3382 from ebean-orm/fix/3381-pc-clear
Fix for #3381 - Empty OneToMany when overflowing LazyLoadBatchSize an…
2024-04-04 22:08:57 +13:00
Rob Bygrave 3e65705bf9 #3379 Followup, Move orderById() to common QueryBuilder interface
Effectively this adds it to QueryBeans (where it was missing)
2024-04-04 22:05:17 +13:00
Rob Bygrave 7469a38bbc #3375 Followup, Temporarily add back setRoot() method to allow time for IntelliJ plugin to be released
Adding this means that it will work with an old ebean-agent. It takes a few days to get a new IntelliJ plugin released and we can't wait due to wanting to release the bug fix for #3381
2024-04-04 21:53:18 +13:00
93 changed files with 2171 additions and 1797 deletions
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -22,13 +22,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -47,19 +47,19 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgis-types</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -42,13 +42,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -17,13 +17,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -41,7 +41,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -60,13 +60,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>composites</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean api</name>
@@ -510,14 +510,6 @@ public interface Query<T> extends CancelableQuery, QueryBuilder<Query<T>, T> {
*/
QueryType getQueryType();
/**
* Controls, if paginated queries should always append an 'order by id' statement at the end to
* guarantee a deterministic sort result. This may affect performance.
* If this is not enabled, and an orderBy is set on the query, it's up to the programmer that
* this query provides a deterministic result.
*/
Query<T> orderById(boolean orderById);
/**
* Set the profile location of this query. This is used to relate query execution metrics
* back to a location like a specific line of code.
@@ -466,6 +466,14 @@ public interface QueryBuilder<SELF, T> extends QueryBuilderProjection<SELF, T> {
*/
SELF setOrderBy(OrderBy<T> orderBy);
/**
* Controls, if paginated queries should always append an 'order by id' statement at the end to
* guarantee a deterministic sort result. This may affect performance.
* If this is not enabled, and an orderBy is set on the query, it's up to the programmer that
* this query provides a deterministic result.
*/
SELF orderById(boolean orderById);
/**
* Execute the query with the given lock type and WAIT.
* <p>
@@ -199,12 +199,21 @@ public class DatabasePlatform {
protected SqlExceptionTranslator exceptionTranslator = new SqlCodeTranslator();
protected InsertSqlSyntaxExtension insertSqlSyntaxExtension = new StandardInsertSqlSyntax();
/**
* Instantiates a new database platform.
*/
public DatabasePlatform() {
}
/**
* Return the Insert SQL syntax helper.
*/
public InsertSqlSyntaxExtension insertSqlSyntaxExtension() {
return insertSqlSyntaxExtension;
}
/**
* Translate the SQLException into a specific persistence exception if possible.
*/
@@ -0,0 +1,32 @@
package io.ebean.config.dbplatform;
/**
* Insert SQL syntax to allow support for ClickHouse type optimisation for inserts.
*/
public interface InsertSqlSyntaxExtension {
/**
* Start the columns.
*/
String startColumns();
/**
* End of the columns.
*/
String endColumns();
/**
* Return true for insert to use standard binding.
*/
boolean useBinding();
/**
* Start types for non-standard binding (e.g. ClickHouse).
*/
String startTypes();
/**
* End types for non-standard binding (e.g. ClickHouse).
*/
String endTypes();
}
@@ -0,0 +1,32 @@
package io.ebean.config.dbplatform;
/**
* Standard Insert SQL syntax.
*/
public final class StandardInsertSqlSyntax implements InsertSqlSyntaxExtension {
@Override
public String startColumns() {
return " (";
}
@Override
public String endColumns() {
return ") values (";
}
@Override
public boolean useBinding() {
return true;
}
@Override
public String startTypes() {
throw new IllegalStateException();
}
@Override
public String endTypes() {
throw new IllegalStateException();
}
}
+26 -26
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean bom</name>
@@ -89,25 +89,25 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -125,13 +125,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -155,37 +155,37 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>kotlin-querybean-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-redis</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-spring-txn</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<!-- platforms -->
@@ -193,79 +193,79 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-clickhouse</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-db2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-hana</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mariadb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mysql</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-nuodb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-oracle</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgis</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgis-types</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlite</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlserver</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>ebean-core-type</artifactId>
@@ -16,7 +16,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
+6 -6
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>ebean-core</artifactId>
@@ -22,7 +22,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -46,7 +46,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -159,21 +159,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -5,6 +5,7 @@ import io.ebean.DatabaseBuilder;
import io.ebean.Model;
import io.ebean.RawSqlBuilder;
import io.ebean.annotation.ConstraintMode;
import io.ebean.annotation.Platform;
import io.ebean.bean.BeanCollection;
import io.ebean.bean.EntityBean;
import io.ebean.config.*;
@@ -632,6 +633,8 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
}
private void registerDescriptor(DeployBeanInfo<?> info) {
platformUsesColumnDefinitions(info);
BeanDescriptor<?> desc = new BeanDescriptor<>(this, info.getDescriptor());
descMap.put(desc.type().getName(), desc);
if (desc.isDocStoreMapped()) {
@@ -644,6 +647,23 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
}
}
private void platformUsesColumnDefinitions(DeployBeanInfo<?> info) {
if (databasePlatform.isPlatform(Platform.CLICKHOUSE) && !DbOffline.isGenerateMigration()) {
// ClickHouse uses column definition to optimise JDBC bulk inserts
DbPlatformTypeMapping typeMapping = databasePlatform.dbTypeMap();
for (DeployBeanProperty property : info.getDescriptor().propertiesAll()) {
if (property.getDbColumnDefn() == null) {
DbPlatformType dbPlatformType = typeMapping.get(property.getDbType());
String columnDefn = dbPlatformType.renderType(property.getDbLength(), property.getDbScale());
if (property.isNullable()) {
columnDefn = "Nullable(" + columnDefn + ")";
}
property.setDbColumnDefn(columnDefn);
}
}
}
}
/**
* Read the initial deployment information for the entities.
* <p>
@@ -43,6 +43,11 @@ public interface ImportedId {
*/
void dmlAppend(GenerateDmlRequest request);
/**
* Append column and type for Insert (ClickHouse).
*/
void dmlType(GenerateDmlRequest request);
/**
* Bind the value from the bean.
*/
@@ -66,6 +66,16 @@ public final class ImportedIdEmbedded implements ImportedId {
}
}
@Override
public void dmlType(GenerateDmlRequest request) {
boolean update = request.isUpdate();
for (ImportedIdSimple anImported : imported) {
if (anImported.isInclude(update)) {
anImported.dmlType(request);
}
}
}
@Override
public String importedIdClause() {
StringBuilder sb = new StringBuilder();
@@ -37,6 +37,7 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
final BeanPropertyAssoc<?> owner;
final String localDbColumn;
private final String localColumnDefn;
private final String localSqlFormula;
final BeanProperty foreignProperty;
private final int position;
@@ -49,6 +50,7 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
this.localDbColumn = InternString.intern(localDbColumn);
this.localSqlFormula = InternString.intern(localSqlFormula);
this.foreignProperty = foreignProperty;
this.localColumnDefn = foreignProperty.dbColumnDefn();
this.position = position;
this.insertable = insertable;
this.updateable = updateable;
@@ -143,6 +145,11 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
request.appendColumn(localDbColumn);
}
@Override
public void dmlType(GenerateDmlRequest request) {
request.appendColumnDefn(localDbColumn, localColumnDefn);
}
@Override
public String importedIdClause() {
return localDbColumn + " = ?";
@@ -15,14 +15,26 @@ public final class GenerateDmlRequest {
private String prefix2;
private int insertMode;
private int bindColumnCount;
private boolean hasColumnDefn;
GenerateDmlRequest append(String s) {
sb.append(s);
return this;
}
/**
* Append column and type for Insert (ClickHouse).
*/
public void appendColumnDefn(String columnName, String columnDefn) {
if (hasColumnDefn) {
sb.append(", ");
} else {
hasColumnDefn = true;
}
sb.append(columnName).append(' ').append(columnDefn);
}
public void appendColumn(String column) {
//String bind = (insertMode > 0) ? "?" : "=?";
appendColumn(column, "?");
}
@@ -4,6 +4,7 @@ import io.ebean.InsertOptions;
import io.ebean.annotation.Platform;
import io.ebean.bean.EntityBean;
import io.ebean.config.dbplatform.DatabasePlatform;
import io.ebean.config.dbplatform.InsertSqlSyntaxExtension;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeaninternal.server.deploy.InheritInfo;
@@ -37,10 +38,13 @@ final class InsertMeta {
private final Bindable shadowFKey;
private final String[] identityDbColumns;
private final Platform platform;
private final InsertSqlSyntaxExtension insertMetaSql;
private final InsertMetaOptions options;
InsertMeta(DatabasePlatform dbPlatform, BeanDescriptor<?> desc, Bindable shadowFKey, BindableId id, BindableList all) {
this.platform = dbPlatform.platform();
this.insertMetaSql = dbPlatform.insertSqlSyntaxExtension();
this.options = InsertMetaPlatform.create(platform, desc, this);
this.discriminator = discriminator(desc);
this.id = id;
@@ -174,7 +178,7 @@ final class InsertMeta {
request.append(defaultValues());
return;
}
request.append(" (");
request.append(insertMetaSql.startColumns());
if (!nullId) {
id.dmlAppend(request);
}
@@ -189,9 +193,28 @@ final class InsertMeta {
} else {
allExcludeDraftOnly.dmlAppend(request);
}
request.append(") values (");
request.append(request.insertBindBuffer());
request.append(")");
request.append(insertMetaSql.endColumns());
if (insertMetaSql.useBinding()) {
request.append(request.insertBindBuffer());
request.append(")");
} else {
request.append(insertMetaSql.startTypes());
if (!nullId) {
id.dmlType(request);
}
if (shadowFKey != null) {
shadowFKey.dmlType(request);
}
if (discriminator != null) {
discriminator.dmlType(request);
}
if (draftTable) {
all.dmlType(request);
} else {
allExcludeDraftOnly.dmlType(request);
}
request.append(insertMetaSql.endTypes());
}
}
private String defaultValues() {
@@ -33,6 +33,11 @@ public interface Bindable {
*/
void dmlAppend(GenerateDmlRequest request);
/**
* Append column and type for Insert (ClickHouse).
*/
void dmlType(GenerateDmlRequest request);
/**
* Bind given the request and bean. The bean could be the oldValues bean
* when binding a update or delete where clause with ALL concurrency mode.
@@ -40,6 +40,11 @@ class BindableAssocOne implements Bindable {
importedId.dmlAppend(request);
}
@Override
public void dmlType(GenerateDmlRequest request) {
importedId.dmlType(request);
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
EntityBean assocBean = (EntityBean) assocOne.getValue(bean);
@@ -39,6 +39,11 @@ public final class BindableDiscriminator implements Bindable {
request.appendColumn(columnName);
}
@Override
public void dmlType(GenerateDmlRequest request) {
throw new IllegalArgumentException("Not supported");
}
@Override
public void dmlBind(BindableRequest bindRequest, EntityBean bean) throws SQLException {
bindRequest.bind(discValue, sqlType);
@@ -35,6 +35,13 @@ final class BindableEmbedded implements Bindable {
}
}
@Override
public void dmlType(GenerateDmlRequest request) {
for (Bindable item : items) {
item.dmlType(request);
}
}
@Override
public void addToUpdate(PersistRequestBean<?> request, List<Bindable> list) {
if (request.isAddToUpdate(embProp)) {
@@ -41,6 +41,11 @@ final class BindableEncryptedProperty implements Bindable {
request.appendColumn(prop.dbColumn(), prop.dbBind());
}
@Override
public void dmlType(GenerateDmlRequest request) {
request.appendColumnDefn(prop.dbColumn(), prop.dbColumnDefn());
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = null;
@@ -81,6 +81,13 @@ final class BindableIdEmbedded implements BindableId {
}
}
@Override
public void dmlType(GenerateDmlRequest request) {
for (BeanProperty prop : props) {
request.appendColumn(prop.dbColumnDefn());
}
}
@Override
public boolean deriveConcatenatedId(PersistRequestBean<?> persist) {
if (matches == null) {
@@ -28,6 +28,11 @@ final class BindableIdEmpty implements BindableId {
// nothing
}
@Override
public void dmlType(GenerateDmlRequest request) {
// nothing
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) {
// nothing
@@ -58,17 +58,18 @@ final class BindableIdScalar implements BindableId {
@Override
public void dmlAppend(GenerateDmlRequest request) {
request.appendColumn(uidProp.dbColumn());
}
@Override
public void dmlType(GenerateDmlRequest request) {
request.appendColumnDefn(uidProp.dbColumn(), uidProp.dbColumnDefn());
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
Object value = uidProp.getValue(bean);
request.bind(value, uidProp);
// used for summary logging
request.setIdValue(value);
}
@@ -60,6 +60,13 @@ public final class BindableList implements Bindable {
}
}
@Override
public void dmlType(GenerateDmlRequest request) {
for (Bindable item : items) {
item.dmlType(request);
}
}
@Override
public void dmlBind(BindableRequest bindRequest, EntityBean bean) throws SQLException {
for (Bindable item : items) {
@@ -36,6 +36,11 @@ class BindableProperty implements Bindable {
request.appendColumn(prop.dbColumn());
}
@Override
public void dmlType(GenerateDmlRequest request) {
request.appendColumnDefn(prop.dbColumn(), prop.dbColumnDefn());
}
/**
* Normal binding of a property value from the bean.
*/
@@ -41,6 +41,11 @@ final class BindablePropertyVersion implements Bindable {
request.appendColumn(prop.dbColumn());
}
@Override
public void dmlType(GenerateDmlRequest request) {
request.appendColumnDefn(prop.dbColumn(), prop.dbColumnDefn());
}
/**
* Normal binding of a property value from the bean.
*/
@@ -45,6 +45,11 @@ public final class BindableUnidirectional implements Bindable {
importedId.dmlAppend(request);
}
@Override
public void dmlType(GenerateDmlRequest request) {
importedId.dmlType(request);
}
@Override
public void dmlBind(BindableRequest request, EntityBean bean) throws SQLException {
PersistRequestBean<?> persistRequest = request.persistRequest();
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean ddl generation</name>
@@ -28,14 +28,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -65,7 +65,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -5,6 +5,7 @@ import io.ebean.config.dbplatform.DatabasePlatform;
import io.ebeaninternal.dbmigration.ddlgeneration.DdlBuffer;
import io.ebeaninternal.dbmigration.ddlgeneration.DdlHandler;
import io.ebeaninternal.dbmigration.ddlgeneration.DdlOptions;
import io.ebeaninternal.dbmigration.migration.Column;
public class ClickHouseDdl extends PlatformDdl {
@@ -17,6 +18,16 @@ public class ClickHouseDdl extends PlatformDdl {
this.columnNotNull = null;
}
@Override
protected String columnDefn(Column column) {
String defn = super.columnDefn(column);
if (isTrue(column.isNotnull()) || isTrue(column.isPrimaryKey())) {
return defn;
} else {
return "Nullable(" + defn + ")";
}
}
@Override
public DdlHandler createDdlHandler(DatabaseBuilder.Settings config) {
return new ClickHouseDdlHandler(config, this);
@@ -230,13 +230,13 @@ public class PlatformDdl {
* Write the column definition to the create table statement.
*/
protected void writeColumnDefinition(DdlBuffer buffer, Column column, DdlIdentity identity) {
String columnDefn = convert(column.getType());
buffer.append(" ");
buffer.append(quote(column.getName()), 29);
String columnDefn = columnDefn(column);
if (identity.useIdentity() && isTrue(column.isPrimaryKey())) {
columnDefn = asIdentityColumn(columnDefn, identity);
}
buffer.append(" ");
buffer.append(quote(column.getName()), 29);
buffer.append(columnDefn);
if (!Boolean.TRUE.equals(column.isPrimaryKey())) {
String defaultValue = convertDefaultValue(column.getDefaultValue());
@@ -251,6 +251,13 @@ public class PlatformDdl {
// so that the database can potentially provide a nice SQL error
}
/**
* Return the plaform specific column type definition.
*/
protected String columnDefn(Column column) {
return convert(column.getType());
}
/**
* Returns the check constraint.
*/
@@ -0,0 +1,28 @@
package io.ebeaninternal.dbmigration;
import io.ebean.platform.clickhouse.ClickHousePlatform;
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class ClickHousePlatformTest {
@Test
void testTypeConversion() {
PlatformDdl ddl = PlatformDdlBuilder.create(new ClickHousePlatform());
assertThat(ddl.convert("clob")).isEqualTo("String");
assertThat(ddl.convert("varchar(20)")).isEqualTo("String");
assertThat(ddl.convert("json")).isEqualTo("JSON");
assertThat(ddl.convert("jsonb")).isEqualTo("JSON");
assertThat(ddl.convert("decimal(10)")).isEqualTo("Decimal(10)");
assertThat(ddl.convert("decimal(8,4)")).isEqualTo("Decimal(8,4)");
assertThat(ddl.convert("decimal")).isEqualTo("Decimal(16,3)");
assertThat(ddl.convert("boolean")).isEqualTo("Bool");
assertThat(ddl.convert("bit")).isEqualTo("bit");
}
}
@@ -0,0 +1,56 @@
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
import io.ebean.platform.clickhouse.ClickHousePlatform;
import io.ebeaninternal.dbmigration.migration.Column;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class ClickHouseDdlTest {
private final ClickHouseDdl ddl = new ClickHouseDdl(new ClickHousePlatform());
@Test
void convert() {
assertThat(ddl.convert("boolean")).isEqualTo("Bool");
assertThat(ddl.convert("integer")).isEqualTo("UInt32");
assertThat(ddl.convert("bigint")).isEqualTo("UInt64");
assertThat(ddl.convert("decimal(20,3)")).isEqualTo("Decimal(20,3)");
assertThat(ddl.convert("varchar(20)")).isEqualTo("String");
assertThat(ddl.convert("hstore")).isEqualTo("Map(String,String)");
assertThat(ddl.convert("json")).isEqualTo("JSON");
assertThat(ddl.convert("varchar[]")).isEqualTo("Array(String)");
}
@Test
void columnDefnNullable() {
Column column = new Column();
column.setType("varchar(20)");
column.setNotnull(null);
assertThat(ddl.columnDefn(column)).isEqualTo("Nullable(String)");
}
@Test
void columnDefnNullable2() {
Column column = new Column();
column.setType("varchar(20)");
column.setNotnull(Boolean.FALSE);
assertThat(ddl.columnDefn(column)).isEqualTo("Nullable(String)");
}
@Test
void columnDefnNotNull() {
Column column = new Column();
column.setType("varchar(20)");
column.setNotnull(Boolean.TRUE);
assertThat(ddl.columnDefn(column)).isEqualTo("String");
}
@Test
void columnDefnNotNullPrimaryKey() {
Column column = new Column();
column.setType("varchar(20)");
column.setPrimaryKey(Boolean.TRUE);
assertThat(ddl.columnDefn(column)).isEqualTo("String");
}
}
+2 -2
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean postgis types</name>
@@ -19,14 +19,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<!-- provided scope -->
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -62,7 +62,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -86,7 +86,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.0.3</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean querybean</name>
@@ -17,7 +17,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -63,14 +63,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -84,7 +84,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -100,7 +100,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.0.3</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
@@ -0,0 +1,586 @@
package io.ebean.typequery;
import io.ebean.*;
import io.ebean.search.MultiMatch;
import io.ebean.search.TextCommonTerms;
import io.ebean.search.TextQueryString;
import io.ebean.search.TextSimple;
import java.util.Collection;
/**
* Query bean for strongly typed query construction and execution.
* <p>
* For each entity bean querybean-generator generates a query bean that implements QueryBean.
*
* <h2>Example - usage of QCustomer</h2>
* <pre>{@code
*
* Date fiveDaysAgo = ...
*
* List<Customer> customers =
* new QCustomer()
* .name.ilike("rob")
* .status.equalTo(Customer.Status.GOOD)
* .registered.after(fiveDaysAgo)
* .contacts.email.endsWith("@foo.com")
* .orderBy()
* .name.asc()
* .registered.desc()
* .findList();
*
* }</pre>
* <p>
* <h2>Resulting SQL where</h2>
* <pre>{@code
*
* where lower(t0.name) like ? and t0.status = ? and t0.registered > ? and u1.email like ?
* order by t0.name, t0.registered desc;
*
* --bind(rob,GOOD,Mon Jul 27 12:05:37 NZST 2015,%@foo.com)
*
* }</pre>
*
* @param <T> the entity bean type (normal entity bean type e.g. Customer)
* @param <R> the specific query bean type (e.g. QCustomer)
*/
public interface IQueryBean<T, R> extends QueryBuilder<R, T> {
/**
* Return the underlying query.
* <p>
* Generally it is not expected that you will need to do this but typically use
* the find methods available on this 'root query bean' instance like findList().
*/
Query<T> query();
/**
* Return the fetch group.
*/
FetchGroup<T> buildFetchGroup();
/**
* Specify the properties to be loaded on the 'main' root level entity bean.
* <p>
* The resulting entities with be "partially loaded" aka partial objects.
* <p>
* Alternatively we can use a {@link #select(FetchGroup)} to specify all properties
* to load on all parts of the graph.
*
* <pre>{@code
*
* // alias for the customer properties in select()
* QCustomer cust = QCustomer.alias();
*
* // alias for the contact properties in contacts.fetch()
* QContact contact = QContact.alias();
*
* List<Customer> customers =
* new QCustomer()
* // specify the parts of the graph we want to load
* .select(cust.id, cust.name)
* .contacts.fetch(contact.firstName, contact.lastName, contact.email)
*
* // predicates
* .id.gt(1)
* .findList();
*
* }</pre>
*
* @param properties the list of properties to fetch
*/
@SuppressWarnings("unchecked")
R select(TQProperty<R, ?>... properties);
/**
* Specify the properties to be loaded on the 'main' root level entity bean
* also allowing for functions to be used like {@link StdOperators#max(Query.Property)}.
*
* @param properties the list of properties to fetch
*/
R select(Query.Property<?>... properties);
/**
* Add an expression to the WHERE or HAVING clause.
*/
R add(Expression expression);
/**
* Add EXISTS sub-query predicate.
*/
R exists(Query<?> subQuery);
/**
* Add NOT EXISTS sub-query predicate.
*/
R notExists(Query<?> subQuery);
/**
* EXISTS using a SQL SubQuery.
*
* @param sqlSubQuery The SQL SubQuery
* @param bindValues Optional bind values if the SubQuery uses {@code ? } bind values.
*/
R exists(String sqlSubQuery, Object... bindValues);
/**
* Not EXISTS using a SQL SubQuery.
*
* @param sqlSubQuery The SQL SubQuery
* @param bindValues Optional bind values if the SubQuery uses {@code ? } bind values.
*/
R notExists(String sqlSubQuery, Object... bindValues);
/**
* Set the Id value to query. This is used with findOne().
* <p>
* You can use this to have further control over the query. For example adding fetch joins.
* <p>
* <pre>{@code
*
* Order order =
* new QOrder()
* .setId(1)
* .fetch("details")
* .findOne();
*
* // the order details were eagerly fetched
* List<OrderDetail> details = order.getDetails();
*
* }</pre>
*/
R setId(Object id);
/**
* Set a list of Id values to match.
* <p>
* <pre>{@code
*
* List<Order> orders =
* new QOrder()
* .setIdIn(42, 43, 44)
* .findList();
*
* }</pre>
*/
R setIdIn(Object... ids);
/**
* Set a collection of Id values to match.
* <p>
* <pre>{@code
*
* Collection<?> ids = ...
*
* List<Order> orders =
* new QOrder()
* .setIdIn(ids)
* .findList();
*
* }</pre>
*/
R setIdIn(Collection<?> ids);
/**
* Add raw expression with no parameters.
* <p>
* When properties in the clause are fully qualified as table-column names
* then they are not translated. logical property name names (not fully
* qualified) will still be translated to their physical name.
* <p>
* <pre>{@code
*
* raw("orderQty < shipQty")
*
* }</pre>
*
* <h4>Subquery example:</h4>
* <pre>{@code
*
* .raw("t0.customer_id in (select customer_id from customer_group where group_id = any(?::uuid[]))", groupIds)
*
* }</pre>
*/
R raw(String rawExpression);
/**
* Add raw expression with an array of parameters.
* <p>
* The raw expression should contain the same number of ? as there are
* parameters.
* <p>
* When properties in the clause are fully qualified as table-column names
* then they are not translated. logical property name names (not fully
* qualified) will still be translated to their physical name.
*/
R raw(String rawExpression, Object... bindValues);
/**
* Only add the raw expression if the values is not null or empty.
* <p>
* This is a pure convenience expression to make it nicer to deal with the pattern where we use
* raw() expression with a subquery and only want to add the subquery predicate when the collection
* of values is not empty.
*
* <h3>Without inOrEmpty()</h3>
* <pre>{@code
*
* QCustomer query = new QCustomer() // add some predicates
* .status.equalTo(Status.NEW);
*
* // common pattern - we can use rawOrEmpty() instead
* if (orderIds != null && !orderIds.isEmpty()) {
* query.raw("t0.customer_id in (select o.customer_id from orders o where o.id in (?1))", orderIds);
* }
*
* query.findList();
*
* }</pre>
*
* <h3>Using rawOrEmpty()</h3>
* Note that in the example below we use the <code>?1</code> bind parameter to get "parameter expansion"
* for each element in the collection.
*
* <pre>{@code
*
* new QCustomer()
* .status.equalTo(Status.NEW)
* // only add the expression if orderIds is not empty
* .rawOrEmpty("t0.customer_id in (select o.customer_id from orders o where o.id in (?1))", orderIds);
* .findList();
*
* }</pre>
*
* <h3>Postgres ANY</h3>
* With Postgres we would often use the SQL <code>ANY</code> expression and array parameter binding
* rather than <code>IN</code>.
*
* <pre>{@code
*
* new QCustomer()
* .status.equalTo(Status.NEW)
* .rawOrEmpty("t0.customer_id in (select o.customer_id from orders o where o.id = any(?))", orderIds);
* .findList();
*
* }</pre>
* <p>
* Note that we need to cast the Postgres array for UUID types like:
* </p>
* <pre>{@code
*
* " ... = any(?::uuid[])"
*
* }</pre>
*
* @param raw The raw expression that is typically a subquery
* @param values The values which is typically a list or set of id values.
*/
R rawOrEmpty(String raw, Collection<?> values);
/**
* Add raw expression with a single parameter.
* <p>
* The raw expression should contain a single ? at the location of the
* parameter.
* <p>
* When properties in the clause are fully qualified as table-column names
* then they are not translated. logical property name names (not fully
* qualified) will still be translated to their physical name.
* <p>
* <h4>Example:</h4>
* <pre>{@code
*
* // use a database function
* raw("add_days(orderDate, 10) < ?", someDate)
*
* }</pre>
*
* <h4>Subquery example:</h4>
* <pre>{@code
*
* .raw("t0.customer_id in (select customer_id from customer_group where group_id = any(?::uuid[]))", groupIds)
*
* }</pre>
*/
R raw(String rawExpression, Object bindValue);
/**
* In expression using multiple columns.
*/
R inTuples(InTuples inTuples);
/**
* Marker that can be used to indicate that the order by clause is defined after this.
* <p>
* <h2>Example: order by customer name, order date</h2>
* <pre>{@code
* List<Order> orders =
* new QOrder()
* .customer.name.ilike("rob")
* .orderBy()
* .customer.name.asc()
* .orderDate.asc()
* .findList();
*
* }</pre>
*/
R orderBy();
/**
* @deprecated migrate to {@link #orderBy()}.
*/
@Deprecated(since = "13.19", forRemoval = true)
R order();
/**
* @deprecated migrate to {@link #orderBy(String)}
*/
@Deprecated(since = "13.19", forRemoval = true)
R order(String orderByClause);
/**
* Begin a list of expressions added by 'OR'.
* <p>
* Use endOr() or endJunction() to stop added to OR and 'pop' to the parent expression list.
* <p>
* <h2>Example</h2>
* <p>
* This example uses an 'OR' expression list with an inner 'AND' expression list.
* </p>
* <pre>{@code
*
* List<Customer> customers =
* new QCustomer()
* .status.equalTo(Customer.Status.GOOD)
* .or()
* .id.greaterThan(1000)
* .and()
* .name.startsWith("super")
* .registered.after(fiveDaysAgo)
* .endAnd()
* .endOr()
* .orderBy().id.desc()
* .findList();
*
* }</pre>
* <h2>Resulting SQL where clause</h2>
* <pre>{@code sql
*
* where t0.status = ? and (t0.id > ? or (t0.name like ? and t0.registered > ? ) )
* order by t0.id desc;
*
* --bind(GOOD,1000,super%,Wed Jul 22 00:00:00 NZST 2015)
*
* }</pre>
*/
R or();
/**
* Begin a list of expressions added by 'AND'.
* <p>
* Use endAnd() or endJunction() to stop added to AND and 'pop' to the parent expression list.
* <p>
* Note that typically the AND expression is only used inside an outer 'OR' expression.
* This is because the top level expression list defaults to an 'AND' expression list.
*
* <h2>Example</h2>
* <p>
* This example uses an 'OR' expression list with an inner 'AND' expression list.
* </p>
* <pre>{@code
*
* List<Customer> customers =
* new QCustomer()
* .status.equalTo(Customer.Status.GOOD)
* .or() // OUTER 'OR'
* .id.greaterThan(1000)
* .and() // NESTED 'AND' expression list
* .name.startsWith("super")
* .registered.after(fiveDaysAgo)
* .endAnd()
* .endOr()
* .orderBy().id.desc()
* .findList();
*
* }</pre>
* <h2>Resulting SQL where clause</h2>
* <pre>{@code sql
*
* where t0.status = ? and (t0.id > ? or (t0.name like ? and t0.registered > ? ) )
* order by t0.id desc;
*
* --bind(GOOD,1000,super%,Wed Jul 22 00:00:00 NZST 2015)
*
* }</pre>
*/
R and();
/**
* Begin a list of expressions added by NOT.
* <p>
* Use endNot() or endJunction() to stop added to NOT and 'pop' to the parent expression list.
*/
R not();
/**
* Begin a list of expressions added by MUST.
* <p>
* This automatically makes this query a document store query.
* <p>
* Use endJunction() to stop added to MUST and 'pop' to the parent expression list.
*/
R must();
/**
* Begin a list of expressions added by MUST NOT.
* <p>
* This automatically makes this query a document store query.
* <p>
* Use endJunction() to stop added to MUST NOT and 'pop' to the parent expression list.
*/
R mustNot();
/**
* Begin a list of expressions added by SHOULD.
* <p>
* This automatically makes this query a document store query.
* <p>
* Use endJunction() to stop added to SHOULD and 'pop' to the parent expression list.
*/
R should();
/**
* End a list of expressions added by 'OR'.
*/
R endJunction();
/**
* End OR junction - synonym for endJunction().
*/
R endOr();
/**
* End AND junction - synonym for endJunction().
*/
R endAnd();
/**
* End NOT junction - synonym for endJunction().
*/
R endNot();
/**
* Add expression after this to the WHERE expression list.
* <p>
* For queries against the normal database (not the doc store) this has no effect.
* <p>
* This is intended for use with Document Store / ElasticSearch where expressions can be put into either
* the "query" section or the "filter" section of the query. Full text expressions like MATCH are in the
* "query" section but many expression can be in either - expressions after the where() are put into the
* "filter" section which means that they don't add to the relevance and are also cache-able.
*/
R where();
/**
* Begin added expressions to the 'Text' expression list.
* <p>
* This automatically makes the query a document store query.
* <p>
* For ElasticSearch expressions added to 'text' go into the ElasticSearch 'query context'
* and expressions added to 'where' go into the ElasticSearch 'filter context'.
*/
R text();
/**
* Add a Text Multi-match expression (document store only).
* <p>
* This automatically makes the query a document store query.
*/
R multiMatch(String query, MultiMatch multiMatch);
/**
* Add a Text Multi-match expression (document store only).
* <p>
* This automatically makes the query a document store query.
*/
R multiMatch(String query, String... properties);
/**
* Add a Text common terms expression (document store only).
* <p>
* This automatically makes the query a document store query.
*/
R textCommonTerms(String query, TextCommonTerms options);
/**
* Add a Text simple expression (document store only).
* <p>
* This automatically makes the query a document store query.
*/
R textSimple(String query, TextSimple options);
/**
* Add a Text query string expression (document store only).
* <p>
* This automatically makes the query a document store query.
*/
R textQueryString(String query, TextQueryString options);
/**
* Return the expression list that has been built for this query.
*/
ExpressionList<T> getExpressionList();
/**
* Start adding expressions to the having clause when using @Aggregation properties.
*
* <pre>{@code
*
* new QMachineUse()
* // where ...
* .date.inRange(fromDate, toDate)
*
* .having()
* .sumHours.greaterThan(1)
* .findList()
*
* // The sumHours property uses @Aggregation
* // e.g. @Aggregation("sum(hours)")
*
* }</pre>
*/
R having();
/**
* Return the underlying having clause to typically when using dynamic aggregation formula.
* <p>
* Note that after this we no longer have the query bean so typically we use this right
* at the end of the query.
*
* <pre>{@code
*
* // sum(distanceKms) ... is a "dynamic formula"
* // so we use havingClause() for it like:
*
* List<MachineUse> machineUse =
*
* new QMachineUse()
* .select("machine, sum(fuelUsed), sum(distanceKms)")
*
* // where ...
* .date.greaterThan(LocalDate.now().minusDays(7))
*
* .havingClause()
* .gt("sum(distanceKms)", 2)
* .findList();
*
* }</pre>
*/
ExpressionList<T> havingClause();
/**
* Set the profile location of this query. This is used to relate query execution metrics
* back to a location like a specific line of code.
*/
R setProfileLocation(ProfileLocation profileLocation);
}
File diff suppressed because it is too large Load Diff
@@ -46,7 +46,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association fetching all the properties.
*/
public final R fetch() {
((TQRootBean) _root).query().fetch(_name);
((QueryBean) _root).query().fetch(_name);
return _root;
}
@@ -54,7 +54,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association using a "query join".
*/
public final R fetchQuery() {
((TQRootBean) _root).query().fetchQuery(_name);
((QueryBean) _root).query().fetchQuery(_name);
return _root;
}
@@ -63,7 +63,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Cache misses are populated via fetchQuery().
*/
public final R fetchCache() {
((TQRootBean) _root).query().fetchCache(_name);
((QueryBean) _root).query().fetchCache(_name);
return _root;
}
@@ -71,7 +71,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Use lazy loading for fetching this association.
*/
public final R fetchLazy() {
((TQRootBean) _root).query().fetchLazy(_name);
((QueryBean) _root).query().fetchLazy(_name);
return _root;
}
@@ -79,7 +79,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association with the properties specified.
*/
public final R fetch(String properties) {
((TQRootBean) _root).query().fetch(_name, properties);
((QueryBean) _root).query().fetch(_name, properties);
return _root;
}
@@ -87,7 +87,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Eagerly fetch this association using a "query join" with the properties specified.
*/
public final R fetchQuery(String properties) {
((TQRootBean) _root).query().fetchQuery(_name, properties);
((QueryBean) _root).query().fetchQuery(_name, properties);
return _root;
}
@@ -96,7 +96,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
* Cache misses are populated via fetchQuery().
*/
public final R fetchCache(String properties) {
((TQRootBean) _root).query().fetchCache(_name, properties);
((QueryBean) _root).query().fetchCache(_name, properties);
return _root;
}
@@ -177,7 +177,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
}
private SpiQueryFetch spiQuery() {
return (SpiQueryFetch) ((TQRootBean) _root).query();
return (SpiQueryFetch) ((QueryBean) _root).query();
}
private Set<String> properties(TQProperty<?, ?>... props) {
@@ -41,7 +41,7 @@ public class TQProperty<R, T> implements Query.Property<T> {
* Internal method to return the underlying expression list.
*/
protected final ExpressionList<?> expr() {
return ((TQRootBean<?, ?>) _root).peekExprList();
return ((QueryBean<?, ?>) _root).peekExprList();
}
/**
@@ -1,899 +0,0 @@
package io.ebean.typequery;
import io.avaje.lang.NonNullApi;
import io.avaje.lang.Nullable;
import io.ebean.*;
import io.ebean.search.MultiMatch;
import io.ebean.search.TextCommonTerms;
import io.ebean.search.TextQueryString;
import io.ebean.search.TextSimple;
import io.ebean.service.SpiFetchGroupQuery;
import io.ebeaninternal.api.SpiQueryFetch;
import io.ebeaninternal.server.util.ArrayStack;
import java.sql.Connection;
import java.sql.Timestamp;
import java.util.*;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Stream;
/**
* Base root query bean providing common features for all root query beans.
* <p>
* For each entity bean querybean-generator generates a query bean that extends TQRootBean.
*
* <h2>Example - usage of QCustomer</h2>
* <pre>{@code
*
* Date fiveDaysAgo = ...
*
* List<Customer> customers =
* new QCustomer()
* .name.ilike("rob")
* .status.equalTo(Customer.Status.GOOD)
* .registered.after(fiveDaysAgo)
* .contacts.email.endsWith("@foo.com")
* .orderBy()
* .name.asc()
* .registered.desc()
* .findList();
*
* }</pre>
* <p>
* <h2>Resulting SQL where</h2>
* <p>
* <pre>{@code
*
* where lower(t0.name) like ? and t0.status = ? and t0.registered > ? and u1.email like ?
* order by t0.name, t0.registered desc;
*
* --bind(rob,GOOD,Mon Jul 27 12:05:37 NZST 2015,%@foo.com)
*
* }</pre>
*
* @param <T> the entity bean type (normal entity bean type e.g. Customer)
* @param <R> the specific root query bean type (e.g. QCustomer)
*/
@NonNullApi
public abstract class TQRootBean<T, R> implements QueryBean<T, R> {
/**
* The underlying query.
*/
private final Query<T> query;
/**
* The root query bean instance. Used to provide fluid query construction.
*/
private final R root;
/**
* The underlying expression lists held as a stack. Pushed and popped based on and/or (conjunction/disjunction).
*/
private ArrayStack<ExpressionList<T>> whereStack;
/**
* Stack of Text expressions ("query" section of ElasticSearch query rather than "filter" section).
*/
private ArrayStack<ExpressionList<T>> textStack;
/**
* When true expressions should be added to the "text" stack - ElasticSearch "query" section
* rather than the "where" stack.
*/
private boolean textMode;
/**
* Construct using the type of bean to query on and the default database.
*/
public TQRootBean(Class<T> beanType) {
this(beanType, DB.getDefault());
}
/**
* Construct using the type of bean to query on and a given database.
*/
public TQRootBean(Class<T> beanType, Database database) {
this(database.find(beanType));
}
/**
* Construct with a transaction.
*/
protected TQRootBean(Class<T> beanType, Transaction transaction) {
this(beanType);
query.usingTransaction(transaction);
}
/**
* Construct with a database and transaction.
*/
protected TQRootBean(Class<T> beanType, Database database, Transaction transaction) {
this(beanType, database);
query.usingTransaction(transaction);
}
/**
* Construct using a query.
*/
@SuppressWarnings("unchecked")
public TQRootBean(Query<T> query) {
this.query = query;
this.root = (R) this;
}
/**
* Construct for using as an 'Alias' to use the properties as known string
* values for select() and fetch().
*/
@SuppressWarnings("unchecked")
public TQRootBean(boolean aliasDummy) {
this.query = null;
this.root = (R) this;
}
/** Construct for FilterMany */
protected TQRootBean(ExpressionList<T> filter) {
this.query = null;
this.root = null;
this.whereStack = new ArrayStack<>();
whereStack.push(filter);
}
@Override
public FetchGroup<T> buildFetchGroup() {
return ((SpiFetchGroupQuery<T>) query()).buildFetchGroup();
}
@Override
public Query<T> query() {
return query;
}
@Override
public R select(String properties) {
query.select(properties);
return root;
}
@Override
public R select(FetchGroup<T> fetchGroup) {
query.select(fetchGroup);
return root;
}
@Override
@SafeVarargs
public final R select(TQProperty<R, ?>... properties) {
((SpiQueryFetch) query).selectProperties(properties(properties));
return root;
}
private Set<String> properties(Query.Property<?>[] properties) {
Set<String> props = new LinkedHashSet<>();
for (Query.Property<?> property : properties) {
props.add(property.toString());
}
return props;
}
@Override
public final R select(Query.Property<?>... properties) {
((SpiQueryFetch) query).selectProperties(properties(properties));
return root;
}
@Override
public final R fetch(String path) {
query.fetch(path);
return root;
}
@Override
public final R fetchQuery(String path) {
query.fetchQuery(path);
return root;
}
@Override
public final R fetchCache(String path) {
query.fetchCache(path);
return root;
}
@Override
public final R fetchQuery(String path, String properties) {
query.fetchQuery(path, properties);
return root;
}
@Override
public final R fetchCache(String path, String properties) {
query.fetchCache(path, properties);
return root;
}
@Override
public final R fetch(String path, String properties) {
query.fetch(path, properties);
return root;
}
@Override
public final R fetch(String path, String properties, FetchConfig fetchConfig) {
query.fetch(path, properties, fetchConfig);
return root;
}
@Override
public final R fetch(String path, FetchConfig fetchConfig) {
query.fetch(path, fetchConfig);
return root;
}
@Override
public R fetchLazy(String path, String fetchProperties) {
query.fetchLazy(path, fetchProperties);
return root;
}
@Override
public R fetchLazy(String path) {
query.fetchLazy(path);
return root;
}
@Override
public final R apply(FetchPath pathProperties) {
query.apply(pathProperties);
return root;
}
@Override
public final R alsoIf(BooleanSupplier predicate, Consumer<R> apply) {
if (predicate.getAsBoolean()) {
apply.accept(root);
}
return root;
}
@Override
public final R asOf(Timestamp asOf) {
query.asOf(asOf);
return root;
}
@Override
public final R asDraft() {
query.asDraft();
return root;
}
@Override
public final R setIncludeSoftDeletes() {
query.setIncludeSoftDeletes();
return root;
}
@Override
public final R add(Expression expression) {
peekExprList().add(expression);
return root;
}
@Override
public final R alias(String alias) {
query.alias(alias);
return root;
}
@Override
public final R setMaxRows(int maxRows) {
query.setMaxRows(maxRows);
return root;
}
@Override
public final R setFirstRow(int firstRow) {
query.setFirstRow(firstRow);
return root;
}
@Override
public final R setAllowLoadErrors() {
query.setAllowLoadErrors();
return root;
}
@Override
public final R setAutoTune(boolean autoTune) {
query.setAutoTune(autoTune);
return root;
}
@Override
public final R setBufferFetchSizeHint(int fetchSize) {
query.setBufferFetchSizeHint(fetchSize);
return root;
}
@Override
public final R setDistinct(boolean distinct) {
query.setDistinct(distinct);
return root;
}
@Override
public final R setDocIndexName(String indexName) {
query.setDocIndexName(indexName);
return root;
}
@Override
public final R setInheritType(Class<? extends T> type) {
query.setInheritType(type);
return root;
}
@Override
public final R setBaseTable(String baseTable) {
query.setBaseTable(baseTable);
return root;
}
@Override
public final R withLock(Query.LockType lockType) {
query.withLock(lockType);
return root;
}
@Override
public final R withLock(Query.LockType lockType, Query.LockWait lockWait) {
query.withLock(lockType, lockWait);
return root;
}
@Override
public final R exists(Query<?> subQuery) {
peekExprList().exists(subQuery);
return root;
}
@Override
public final R notExists(Query<?> subQuery) {
peekExprList().notExists(subQuery);
return root;
}
@Override
public final R exists(String sqlSubQuery, Object... bindValues) {
peekExprList().exists(sqlSubQuery, bindValues);
return root;
}
@Override
public final R notExists(String sqlSubQuery, Object... bindValues) {
peekExprList().notExists(sqlSubQuery, bindValues);
return root;
}
@Override
public final R forUpdate() {
query.forUpdate();
return root;
}
@Override
public final R forUpdateNoWait() {
query.forUpdateNoWait();
return root;
}
@Override
public final R forUpdateSkipLocked() {
query.forUpdateSkipLocked();
return root;
}
@Override
public final UpdateQuery<T> asUpdate() {
return query.asUpdate();
}
@Override
public final <D> DtoQuery<D> asDto(Class<D> dtoClass) {
return query.asDto(dtoClass);
}
@Override
public final R setId(Object id) {
query.setId(id);
return root;
}
@Override
public final R setIdIn(Object... ids) {
query.where().idIn(ids);
return root;
}
@Override
public final R setIdIn(Collection<?> ids) {
query.where().idIn(ids);
return root;
}
@Override
public final R setLabel(String label) {
query.setLabel(label);
return root;
}
@Override
public final R setHint(String hint) {
query.setHint(hint);
return root;
}
@Override
public final R setProfileLocation(ProfileLocation profileLocation) {
query.setProfileLocation(profileLocation);
return root;
}
@Override
public final R setLazyLoadBatchSize(int lazyLoadBatchSize) {
query.setLazyLoadBatchSize(lazyLoadBatchSize);
return root;
}
@Override
public final R setMapKey(String mapKey) {
query.setMapKey(mapKey);
return root;
}
@Override
public final R setPersistenceContextScope(PersistenceContextScope scope) {
query.setPersistenceContextScope(scope);
return root;
}
@Override
public R setCountDistinct(CountDistinctOrder orderBy) {
query.setCountDistinct(orderBy);
return root;
}
@Override
public final R setRawSql(RawSql rawSql) {
query.setRawSql(rawSql);
return root;
}
@Override
public final R setReadOnly(boolean readOnly) {
query.setReadOnly(readOnly);
return root;
}
@Override
public final R setBeanCacheMode(CacheMode beanCacheMode) {
query.setBeanCacheMode(beanCacheMode);
return root;
}
@Override
public final R setUseDocStore(boolean useDocStore) {
query.setUseDocStore(useDocStore);
return root;
}
@Override
public final R setDisableLazyLoading(boolean disableLazyLoading) {
query.setDisableLazyLoading(disableLazyLoading);
return root;
}
@Override
public final R setDisableReadAuditing() {
query.setDisableReadAuditing();
return root;
}
@Override
public final R setUseQueryCache(CacheMode cacheMode) {
query.setUseQueryCache(cacheMode);
return root;
}
@Override
public final R setTimeout(int secs) {
query.setTimeout(secs);
return root;
}
@Override
public final Set<String> validate() {
return query.validate();
}
@Override
public final R raw(String rawExpression) {
peekExprList().raw(rawExpression);
return root;
}
@Override
public final R raw(String rawExpression, Object... bindValues) {
peekExprList().raw(rawExpression, bindValues);
return root;
}
@Override
public final R rawOrEmpty(String raw, Collection<?> values) {
peekExprList().rawOrEmpty(raw, values);
return root;
}
@Override
public final R raw(String rawExpression, Object bindValue) {
peekExprList().raw(rawExpression, bindValue);
return root;
}
@Override
public final R inTuples(InTuples inTuples) {
peekExprList().inTuples(inTuples);
return root;
}
@Override
public final R orderBy() {
// Yes this does not actually do anything! We include it because style wise it makes
// the query nicer to read and suggests that order by definitions are added after this
return root;
}
@Override
@Deprecated(since = "13.19", forRemoval = true)
public final R order() {
return root;
}
@Override
public final R orderBy(String orderByClause) {
query.orderBy(orderByClause);
return root;
}
@Override
public R setOrderBy(OrderBy<T> orderBy) {
query.setOrderBy(orderBy);
return root;
}
@Override
@Deprecated(since = "13.19", forRemoval = true)
public final R order(String orderByClause) {
return orderBy(orderByClause);
}
@Override
public final R or() {
pushExprList(peekExprList().or());
return root;
}
@Override
public final R and() {
pushExprList(peekExprList().and());
return root;
}
@Override
public final R not() {
pushExprList(peekExprList().not());
return root;
}
@Override
public final R must() {
pushExprList(peekExprList().must());
return root;
}
@Override
public final R mustNot() {
return pushExprList(peekExprList().mustNot());
}
@Override
public final R should() {
return pushExprList(peekExprList().should());
}
@Override
public final R endJunction() {
if (textMode) {
textStack.pop();
} else {
whereStack.pop();
}
return root;
}
@Override
public final R endOr() {
return endJunction();
}
@Override
public final R endAnd() {
return endJunction();
}
@Override
public final R endNot() {
return endJunction();
}
/**
* Push the expression list onto the appropriate stack.
*/
private R pushExprList(ExpressionList<T> list) {
if (textMode) {
textStack.push(list);
} else {
whereStack.push(list);
}
return root;
}
@Override
public final R where() {
textMode = false;
return root;
}
@Override
public final R text() {
textMode = true;
return root;
}
@Override
public final R multiMatch(String query, MultiMatch multiMatch) {
peekExprList().multiMatch(query, multiMatch);
return root;
}
@Override
public final R multiMatch(String query, String... properties) {
peekExprList().multiMatch(query, properties);
return root;
}
@Override
public final R textCommonTerms(String query, TextCommonTerms options) {
peekExprList().textCommonTerms(query, options);
return root;
}
@Override
public final R textSimple(String query, TextSimple options) {
peekExprList().textSimple(query, options);
return root;
}
@Override
public final R textQueryString(String query, TextQueryString options) {
peekExprList().textQueryString(query, options);
return root;
}
@Override
public final R usingTransaction(Transaction transaction) {
query.usingTransaction(transaction);
return root;
}
@Override
public final R usingConnection(Connection connection) {
query.usingConnection(connection);
return root;
}
@Override
public R usingDatabase(Database database) {
query.usingDatabase(database);
return root;
}
@Override
public final R usingMaster() {
query.usingMaster();
return root;
}
@Override
public final boolean exists() {
return query.exists();
}
@Override
@Nullable
public final T findOne() {
return query.findOne();
}
@Override
public final Optional<T> findOneOrEmpty() {
return query.findOneOrEmpty();
}
@Override
public final List<T> findList() {
return query.findList();
}
@Override
public final Stream<T> findStream() {
return query.findStream();
}
@Override
public final Set<T> findSet() {
return query.findSet();
}
@Override
public final <A> List<A> findIds() {
return query.findIds();
}
@Override
public final <K> Map<K, T> findMap() {
return query.findMap();
}
@Override
public final QueryIterator<T> findIterate() {
return query.findIterate();
}
@Override
public final <A> List<A> findSingleAttributeList() {
return query.findSingleAttributeList();
}
@Override
public final <A> Set<A> findSingleAttributeSet() {
return query.findSingleAttributeSet();
}
@Override
@Nullable
public final <A> A findSingleAttribute() {
return query.findSingleAttribute();
}
@Override
public final <A> Optional<A> findSingleAttributeOrEmpty() {
return query.findSingleAttributeOrEmpty();
}
@Override
public final void findEach(Consumer<T> consumer) {
query.findEach(consumer);
}
@Override
public final void findEach(int batch, Consumer<List<T>> consumer) {
query.findEach(batch, consumer);
}
@Override
public final void findEachWhile(Predicate<T> consumer) {
query.findEachWhile(consumer);
}
@Override
public final List<Version<T>> findVersions() {
return query.findVersions();
}
@Override
public final List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end) {
return query.findVersionsBetween(start, end);
}
@Override
public final int findCount() {
return query.findCount();
}
@Override
public final FutureRowCount<T> findFutureCount() {
return query.findFutureCount();
}
@Override
public final FutureIds<T> findFutureIds() {
return query.findFutureIds();
}
@Override
public final FutureList<T> findFutureList() {
return query.findFutureList();
}
@Override
public final PagedList<T> findPagedList() {
return query.findPagedList();
}
@Override
public final int delete() {
return query.delete();
}
@Override
public final String getGeneratedSql() {
return query.getGeneratedSql();
}
@Override
public final Class<T> getBeanType() {
return query.getBeanType();
}
@Override
public final ExpressionList<T> getExpressionList() {
return query.where();
}
@Override
public final R having() {
if (whereStack == null) {
whereStack = new ArrayStack<>();
}
// effectively putting having expression list onto stack
// such that expression now add to the having clause
whereStack.push(query.having());
return root;
}
@Override
public final ExpressionList<T> havingClause() {
return query.having();
}
/**
* Return the current expression list that expressions should be added to.
*/
protected final ExpressionList<T> peekExprList() {
if (textMode) {
// return the current text expression list
return _peekText();
}
if (whereStack == null) {
whereStack = new ArrayStack<>();
whereStack.push(query.where());
}
// return the current expression list
return whereStack.peek();
}
protected final ExpressionList<T> _peekText() {
if (textStack == null) {
textStack = new ArrayStack<>();
// empty so push on the queries base expression list
textStack.push(query.text());
}
// return the current expression list
return textStack.peek();
}
}
@@ -79,6 +79,28 @@ class QOrderTest {
DB.delete(customer);
}
@Test
void orderById() {
Query<Order> query = new QOrder()
.select(QOrder.Alias.status)
.orderById(true).query();
query.findList();
String sql = query.getGeneratedSql();
assertThat(sql).contains("select /* QOrderTest.orderById:88 */ t0.id, t0.status from o_order t0 order by t0.id");
Query<Order> query2 = new QOrder()
.select(QOrder.Alias.status)
.orderById(true).orderBy().status.asc()
.query();
query2.findList();
String sql2 = query2.getGeneratedSql();
assertThat(sql2).contains("select /* QOrderTest.orderById:98 */ t0.id, t0.status from o_order t0 order by t0.status, t0.id");
}
@Test
void hint() {
LoggedSql.start();
+7 -7
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>ebean-redis</artifactId>
@@ -22,28 +22,28 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -57,7 +57,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -72,7 +72,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.0.3</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>ebean-spring-txn</artifactId>
@@ -28,7 +28,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -77,7 +77,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -99,7 +99,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.0.3</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
+9 -9
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>ebean test</name>
@@ -12,7 +12,7 @@
<artifactId>ebean-test</artifactId>
<properties>
<bytebuddy.version>1.14.12</bytebuddy.version>
<bytebuddy.version>1.14.13</bytebuddy.version>
<assertj.version>3.25.3</assertj.version>
</properties>
@@ -33,20 +33,20 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -149,14 +149,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -293,7 +293,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>junit</artifactId>
<version>1.4</version>
<version>1.5</version>
<scope>provided</scope>
</dependency>
@@ -309,7 +309,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:13.22.0</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
@@ -123,8 +123,8 @@ class DbTypeMapTest {
assertThat(dbTypeMap.lookup("varchar", true).renderType(20, 0)).isEqualTo("String");
assertThat(dbTypeMap.lookup("timestamp", false).renderType(0, 0)).isEqualTo("DateTime");
assertThat(dbTypeMap.lookup("localdatetime", false).renderType(0, 0)).isEqualTo("DateTime");
assertThat(dbTypeMap.lookup("json", false).renderType(0, 0)).isEqualTo("String");
assertThat(dbTypeMap.lookup("jsonb", false).renderType(0, 0)).isEqualTo("String");
assertThat(dbTypeMap.lookup("json", false).renderType(0, 0)).isEqualTo("JSON");
assertThat(dbTypeMap.lookup("jsonb", false).renderType(0, 0)).isEqualTo("JSON");
assertThat(dbTypeMap.lookup("jsonclob", false).renderType(0, 0)).isEqualTo("String");
assertThat(dbTypeMap.lookup("jsonblob", false).renderType(0, 0)).isEqualTo("blob");
assertThat(dbTypeMap.lookup("jsonvarchar", false).renderType(200, 0)).isEqualTo("String");
@@ -18,6 +18,7 @@ class TestLazyLoadMany extends BaseTestCase {
}
return m0;
}
@Test
void loadAfterPCCleared() {
@@ -31,6 +32,7 @@ class TestLazyLoadMany extends BaseTestCase {
List<COOne> children = DB.find(COOne.class)
.setLazyLoadBatchSize(2)
.where().startsWith("name", "tll-m")
.orderBy("name")
.findList();
assertThat(children).hasSize(3);
@@ -82,9 +82,9 @@
<!-- <logger name="io.ebean.DDL" level="DEBUG"/>-->
<logger name="io.ebean.SQL" level="TRACE"/>
<logger name="io.ebean.TXN" level="TRACE"/>
<logger name="io.ebean.SUM" level="TRACE"/>
<!-- <logger name="io.ebean.SQL" level="TRACE"/>-->
<!-- <logger name="io.ebean.TXN" level="TRACE"/>-->
<!-- <logger name="io.ebean.SUM" level="TRACE"/>-->
<!-- <logger name="io.ebean.cache" level="TRACE"/>-->
<!-- <logger name="io.ebean.cache.REGION" level="TRACE"/>-->
@@ -2,24 +2,24 @@
-- apply changes
create table migtest_ckey_assoc (
id UInt32,
assoc_one String
assoc_one Nullable(String)
) ENGINE = Log();
create table migtest_ckey_detail (
id UInt32,
something String
something Nullable(String)
) ENGINE = Log();
create table migtest_ckey_parent (
one_key UInt32,
two_key String,
name String,
name Nullable(String),
version UInt32
) ENGINE = Log();
create table migtest_fk_cascade (
id UInt64,
one_id UInt64
one_id Nullable(UInt64)
) ENGINE = Log();
create table migtest_fk_cascade_one (
@@ -28,12 +28,12 @@ create table migtest_fk_cascade_one (
create table migtest_fk_none (
id UInt64,
one_id UInt64
one_id Nullable(UInt64)
) ENGINE = Log();
create table migtest_fk_none_via_join (
id UInt64,
one_id UInt64
one_id Nullable(UInt64)
) ENGINE = Log();
create table migtest_fk_one (
@@ -42,73 +42,73 @@ create table migtest_fk_one (
create table migtest_fk_set_null (
id UInt64,
one_id UInt64
one_id Nullable(UInt64)
) ENGINE = Log();
create table migtest_e_basic (
id UInt32,
status String,
status Nullable(String),
status2 String default 'N',
name String,
description String,
description_file blob,
json_list String,
name Nullable(String),
description Nullable(String),
description_file Nullable(blob),
json_list Nullable(JSON),
a_lob String default 'X',
some_date DateTime,
old_boolean UInt8 default 0,
old_boolean2 UInt8,
eref_id UInt32,
indextest1 String,
indextest2 String,
indextest3 String,
indextest4 String,
indextest5 String,
indextest6 String,
some_date Nullable(DateTime),
old_boolean Bool default false,
old_boolean2 Nullable(Bool),
eref_id Nullable(UInt32),
indextest1 Nullable(String),
indextest2 Nullable(String),
indextest3 Nullable(String),
indextest4 Nullable(String),
indextest5 Nullable(String),
indextest6 Nullable(String),
user_id UInt32
) ENGINE = Log();
create table migtest_e_enum (
id UInt32,
test_status String
test_status Nullable(String)
) ENGINE = Log();
create table migtest_e_history (
id UInt32,
test_string String
test_string Nullable(String)
) ENGINE = Log();
create table migtest_e_history2 (
id UInt32,
test_string String,
obsolete_string1 String,
obsolete_string2 String
test_string Nullable(String),
obsolete_string1 Nullable(String),
obsolete_string2 Nullable(String)
) ENGINE = Log();
create table migtest_e_history3 (
id UInt32,
test_string String
test_string Nullable(String)
) ENGINE = Log();
create table migtest_e_history4 (
id UInt32,
test_number UInt32
test_number Nullable(UInt32)
) ENGINE = Log();
create table migtest_e_history5 (
id UInt32,
test_number UInt32
test_number Nullable(UInt32)
) ENGINE = Log();
create table migtest_e_history6 (
id UInt32,
test_number1 UInt32,
test_number1 Nullable(UInt32),
test_number2 UInt32
) ENGINE = Log();
create table "migtest_QuOtEd" (
id String,
status1 String,
status2 String
status1 Nullable(String),
status2 Nullable(String)
) ENGINE = Log();
create table migtest_e_ref (
@@ -118,35 +118,35 @@ create table migtest_e_ref (
create table migtest_e_softdelete (
id UInt32,
test_string String
test_string Nullable(String)
) ENGINE = Log();
create table "table" (
"index" String,
"from" String,
"to" String,
"varchar" String,
"foreign" String,
"from" Nullable(String),
"to" Nullable(String),
"varchar" Nullable(String),
"foreign" Nullable(String),
textfield String
) ENGINE = Log();
create table migtest_mtm_c (
id UInt32,
name String
name Nullable(String)
) ENGINE = Log();
create table migtest_mtm_m (
id UInt64,
name String
name Nullable(String)
) ENGINE = Log();
create table migtest_oto_child (
id UInt32,
name String
name Nullable(String)
) ENGINE = Log();
create table migtest_oto_master (
id UInt64,
name String
name Nullable(String)
) ENGINE = Log();
@@ -21,104 +21,104 @@ create table drop_ref_many (
create table drop_ref_one (
id UInt32,
parent_id UInt32
parent_id Nullable(UInt32)
) ENGINE = Log();
create table drop_ref_one_to_one (
id UInt32,
parent_id UInt32
parent_id Nullable(UInt32)
) ENGINE = Log();
create table migtest_e_test_binary (
id UInt32,
test_byte16 String,
test_byte256 String,
test_byte512 String,
test_byte1k String,
test_byte2k String,
test_byte4k String,
test_byte8k String,
test_byte16k String,
test_byte32k String,
test_byte64k String,
test_byte128k String,
test_byte256k String,
test_byte512k String,
test_byte1m String,
test_byte2m String,
test_byte4m String,
test_byte8m String,
test_byte16m String,
test_byte32m String
test_byte16 Nullable(String),
test_byte256 Nullable(String),
test_byte512 Nullable(String),
test_byte1k Nullable(String),
test_byte2k Nullable(String),
test_byte4k Nullable(String),
test_byte8k Nullable(String),
test_byte16k Nullable(String),
test_byte32k Nullable(String),
test_byte64k Nullable(String),
test_byte128k Nullable(String),
test_byte256k Nullable(String),
test_byte512k Nullable(String),
test_byte1m Nullable(String),
test_byte2m Nullable(String),
test_byte4m Nullable(String),
test_byte8m Nullable(String),
test_byte16m Nullable(String),
test_byte32m Nullable(String)
) ENGINE = Log();
create table migtest_e_test_json (
id UInt32,
json255 String,
json256 String,
json512 String,
json1k String,
json2k String,
json4k String,
json8k String,
json16k String,
json32k String,
json64k String,
json128k String,
json256k String,
json512k String,
json1m String,
json2m String,
json4m String,
json8m String,
json16m String,
json32m String
json255 Nullable(JSON),
json256 Nullable(JSON),
json512 Nullable(JSON),
json1k Nullable(JSON),
json2k Nullable(JSON),
json4k Nullable(JSON),
json8k Nullable(JSON),
json16k Nullable(JSON),
json32k Nullable(JSON),
json64k Nullable(JSON),
json128k Nullable(JSON),
json256k Nullable(JSON),
json512k Nullable(JSON),
json1m Nullable(JSON),
json2m Nullable(JSON),
json4m Nullable(JSON),
json8m Nullable(JSON),
json16m Nullable(JSON),
json32m Nullable(JSON)
) ENGINE = Log();
create table migtest_e_test_lob (
id UInt32,
lob255 String,
lob256 String,
lob512 String,
lob1k String,
lob2k String,
lob4k String,
lob8k String,
lob16k String,
lob32k String,
lob64k String,
lob128k String,
lob256k String,
lob512k String,
lob1m String,
lob2m String,
lob4m String,
lob8m String,
lob16m String,
lob32m String
lob255 Nullable(String),
lob256 Nullable(String),
lob512 Nullable(String),
lob1k Nullable(String),
lob2k Nullable(String),
lob4k Nullable(String),
lob8k Nullable(String),
lob16k Nullable(String),
lob32k Nullable(String),
lob64k Nullable(String),
lob128k Nullable(String),
lob256k Nullable(String),
lob512k Nullable(String),
lob1m Nullable(String),
lob2m Nullable(String),
lob4m Nullable(String),
lob8m Nullable(String),
lob16m Nullable(String),
lob32m Nullable(String)
) ENGINE = Log();
create table migtest_e_test_varchar (
id UInt32,
varchar255 String,
varchar256 String,
varchar512 String,
varchar1k String,
varchar2k String,
varchar4k String,
varchar8k String,
varchar16k String,
varchar32k String,
varchar64k String,
varchar128k String,
varchar256k String,
varchar512k String,
varchar1m String,
varchar2m String,
varchar4m String,
varchar8m String,
varchar16m String,
varchar32m String
varchar255 Nullable(String),
varchar256 Nullable(String),
varchar512 Nullable(String),
varchar1k Nullable(String),
varchar2k Nullable(String),
varchar4k Nullable(String),
varchar8k Nullable(String),
varchar16k Nullable(String),
varchar32k Nullable(String),
varchar64k Nullable(String),
varchar128k Nullable(String),
varchar256k Nullable(String),
varchar512k Nullable(String),
varchar1m Nullable(String),
varchar2m Nullable(String),
varchar4m Nullable(String),
varchar8m Nullable(String),
varchar16m Nullable(String),
varchar32m Nullable(String)
) ENGINE = Log();
create table migtest_e_user (
@@ -168,8 +168,8 @@ alter table migtest_e_basic alter column a_lob drop default;
alter table migtest_e_basic alter column a_lob set null;
alter table migtest_e_basic alter column user_id set null;
alter table migtest_e_basic add column new_string_field String default 'foo''bar';
alter table migtest_e_basic add column new_boolean_field UInt8 default 1;
alter table migtest_e_basic add column new_boolean_field2 UInt8 default 1;
alter table migtest_e_basic add column new_boolean_field Bool default true;
alter table migtest_e_basic add column new_boolean_field2 Bool default true;
alter table migtest_e_basic add column progress UInt32 default 0;
alter table migtest_e_basic add column new_integer UInt32 default 42;
alter table migtest_e_history alter column test_string UInt64;
@@ -179,11 +179,11 @@ alter table migtest_e_history2 add column test_string2 String;
alter table migtest_e_history2 add column test_string3 String default 'unknown';
alter table migtest_e_history2 add column new_column String;
alter table migtest_e_history4 alter column test_number UInt64;
alter table migtest_e_history5 add column test_boolean UInt8 default 0;
alter table migtest_e_history5 add column test_boolean Bool default false;
alter table migtest_e_history6 alter column test_number1 set default 42;
alter table migtest_e_history6 alter column test_number1 set not null;
alter table migtest_e_history6 alter column test_number2 set null;
alter table migtest_e_softdelete add column deleted UInt8 default 0;
alter table migtest_e_softdelete add column deleted Bool default false;
alter table migtest_oto_child add column master_id UInt64;
-- apply post alter
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
@@ -11,8 +11,8 @@ alter table migtest_e_enum drop constraint if exists ck_migtest_e_enum_test_stat
-- apply changes
create table "migtest_QuOtEd" (
id String,
status1 String,
status2 String
status1 Nullable(String),
status2 Nullable(String)
) ENGINE = Log();
create table migtest_e_ref (
@@ -41,8 +41,8 @@ alter table migtest_e_basic alter column a_lob set not null;
alter table migtest_e_basic alter column user_id set default 23;
alter table migtest_e_basic alter column user_id set not null;
alter table migtest_e_basic add column description_file blob;
alter table migtest_e_basic add column old_boolean UInt8 default 0;
alter table migtest_e_basic add column old_boolean2 UInt8;
alter table migtest_e_basic add column old_boolean Bool default false;
alter table migtest_e_basic add column old_boolean2 Bool;
alter table migtest_e_basic add column eref_id UInt32;
alter table migtest_e_history2 alter column test_string drop default;
alter table migtest_e_history2 alter column test_string set null;
@@ -1,6 +1,6 @@
193400547, 1.0__initial.sql
-1021430823, 1.1.sql
1470313592, 1.0__initial.sql
-1717710527, 1.1.sql
688811494, 1.2__dropsFor_1.1.sql
1015552567, 1.3.sql
864347736, 1.3.sql
1436420661, 1.4__dropsFor_1.3.sql
+1 -1
View File
@@ -15,7 +15,7 @@ mvn -T 4 clean package
mvn -T 4 deploy -pl '!composites,!platforms' -Pcentral -DskipTests -DskipStagingRepositoryClose=true -DstagingProgressTimeoutMinutes=9
## git commit, git tag, git push --tags
git commit -am 'Version 14.0.2'
git commit -am 'Version 14.1.0'
git tag 14.0.2
git push --tags
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>kotlin querybean generator</name>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -35,7 +35,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -56,14 +56,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -337,7 +337,7 @@ class SimpleQueryBeanWriter {
writer.append(" */").eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("class Q%s : io.ebean.typequery.TQRootBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
writer.append("class Q%s : io.ebean.typequery.QueryBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
}
writer.eol();
+14 -14
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,67 +15,67 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hsqldb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlanywhere</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
@@ -0,0 +1,33 @@
package io.ebean.platform.clickhouse;
import io.ebean.config.dbplatform.InsertSqlSyntaxExtension;
public final class ClickHouseInsertSqlSyntax implements InsertSqlSyntaxExtension {
// insert into mytable select col1, col2 from input('col1 String, col2 DateTime64(3), col3 Int32')
@Override
public String startColumns() {
return " select ";
}
@Override
public String endColumns() {
return " from";
}
@Override
public boolean useBinding() {
return false;
}
@Override
public String startTypes() {
return " input('";
}
@Override
public String endTypes() {
return "')";
}
}
@@ -13,13 +13,9 @@ public class ClickHousePlatform extends DatabasePlatform {
public ClickHousePlatform() {
super();
this.platform = Platform.CLICKHOUSE;
//this.dbEncrypt =
//this.historySupport =
//this.exceptionTranslator =
this.insertSqlSyntaxExtension = new ClickHouseInsertSqlSyntax();
this.nativeUuidType = true;
this.dbDefaultValue.setNow("now()");
this.dbDefaultValue.setFalse("0");
this.dbDefaultValue.setTrue("1");
this.dbIdentity.setIdType(IdType.IDENTITY);
this.dbIdentity.setSupportsGetGeneratedKeys(false);
@@ -27,7 +23,7 @@ public class ClickHousePlatform extends DatabasePlatform {
this.dbIdentity.setSupportsIdentity(true);
this.booleanDbType = Types.INTEGER;
dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("UInt8"));
dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("Bool"));
// using unsigned as default types ...
dbTypeMap.put(DbType.TINYINT, new DbPlatformType("UInt8", false));
dbTypeMap.put(DbType.SMALLINT, new DbPlatformType("UInt16", false));
@@ -41,7 +37,10 @@ public class ClickHousePlatform extends DatabasePlatform {
dbTypeMap.put(DbType.VARCHAR, new DbPlatformType("String", false));
dbTypeMap.put(DbType.LONGVARCHAR, new DbPlatformType("String", false));
dbTypeMap.put(DbType.CLOB, new DbPlatformType("String", false));
dbTypeMap.put(DbType.JSONVARCHAR, new DbPlatformType("String", false));
dbTypeMap.put(DbType.HSTORE, new DbPlatformType("Map(String,String)", false));
dbTypeMap.put(DbType.JSON, new DbPlatformType("JSON", false));
dbTypeMap.put(DbType.JSONB, new DbPlatformType("JSON", false));
dbTypeMap.put(DbType.JSONVARCHAR, new DbPlatformType("JSON", false));
dbTypeMap.put(DbType.UUID, new DbPlatformType("UUID", false));
dbTypeMap.put(DbType.INET, new DbPlatformType("String", false));
dbTypeMap.put(DbType.CIDR, new DbPlatformType("String", false));
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+3 -3
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,13 +15,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>platforms</artifactId>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
<relativePath>../..</relativePath>
</parent>
@@ -15,7 +15,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
</dependencies>
+7 -7
View File
@@ -4,12 +4,12 @@
<parent>
<groupId>org.avaje</groupId>
<artifactId>java11-oss</artifactId>
<version>3.12</version>
<version>4.1</version>
</parent>
<groupId>io.ebean</groupId>
<artifactId>ebean-parent</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<packaging>pom</packaging>
<name>ebean parent</name>
@@ -51,10 +51,10 @@
<ebean-ddl-runner.version>2.3</ebean-ddl-runner.version>
<ebean-migration-auto.version>1.2</ebean-migration-auto.version>
<ebean-migration.version>14.0.0</ebean-migration.version>
<ebean-test-containers.version>7.3</ebean-test-containers.version>
<ebean-datasource.version>8.12</ebean-datasource.version>
<ebean-agent.version>14.0.3</ebean-agent.version>
<ebean-maven-plugin.version>14.0.3</ebean-maven-plugin.version>
<ebean-test-containers.version>7.4</ebean-test-containers.version>
<ebean-datasource.version>8.14</ebean-datasource.version>
<ebean-agent.version>14.2.1</ebean-agent.version>
<ebean-maven-plugin.version>14.2.1</ebean-maven-plugin.version>
<surefire.useModulePath>false</surefire.useModulePath>
</properties>
@@ -63,7 +63,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>junit</artifactId>
<version>1.4</version>
<version>1.5</version>
<scope>test</scope>
</dependency>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<name>querybean generator</name>
@@ -225,7 +225,7 @@ class SimpleQueryBeanWriter {
writer.append("public final class Q%s {", shortName).eol();
} else {
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("public final class Q%s extends io.ebean.typequery.TQRootBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
writer.append("public final class Q%s extends io.ebean.typequery.QueryBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
}
writer.eol();
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>tests</artifactId>
+6 -6
View File
@@ -5,20 +5,20 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>test-java16</artifactId>
<properties>
<java.release>16</java.release>
<maven.compiler.release>17</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-h2</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
@@ -30,14 +30,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>provided</scope>
</dependency>
@@ -52,7 +52,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:14.0.3</tile>
<tile>io.ebean.tile:enhancement:14.2.0</tile>
</tiles>
</configuration>
</plugin>
+5 -5
View File
@@ -6,7 +6,7 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>14.0.2</version>
<version>14.1.0</version>
</parent>
<artifactId>test-kotlin</artifactId>
@@ -40,20 +40,20 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
</dependency>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>junit</artifactId>
<version>1.4</version>
<version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>14.0.2</version>
<version>14.1.0</version>
<scope>test</scope>
</dependency>
@@ -92,7 +92,7 @@
<groupId>io.ebean</groupId>
<artifactId>kotlin-querybean-generator</artifactId>
<!-- <artifactId>querybean-generator</artifactId>-->
<version>14.0.2</version>
<version>14.1.0</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>