mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75f0a6815f | ||
|
|
a473c20b24 | ||
|
|
540b414443 | ||
|
|
7dca282eb6 | ||
|
|
de905ccd60 | ||
|
|
aa2490cfb4 | ||
|
|
587d673684 | ||
|
|
472db65ac6 | ||
|
|
64e4e674ac | ||
|
|
24d8f38b1d | ||
|
|
79be375f54 | ||
|
|
e95eae4ee6 | ||
|
|
e71e16c1ee |
@@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [8]
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -16,7 +16,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [17,18,19,loom,valhalla,metropolis,panama]
|
||||
## valhalla - failing on javadoc with:
|
||||
## javadoc: error - The code being documented uses packages in the unnamed module, but the packages defined in https://ebean.io/platforms/ebean-platform-h2/apidocs/ are in named modules.
|
||||
java_version: [17,18,19,loom,metropolis,panama]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [8.0.192, 8, 11.0.3, 11, 17]
|
||||
java_version: [11, 17]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-clickhouse</name>
|
||||
<description>ebean-clickhouse composite</description>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.clickhouse.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.clickhouse {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.clickhouse;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-cockroach</name>
|
||||
<description>ebean-cockroach composite</description>
|
||||
<artifactId>ebean-cockroach</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.cockroach.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.cockroach {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.postgres;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-db2</name>
|
||||
<description>ebean-db2 composite</description>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.db2.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.db2 {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.db2;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-h2</name>
|
||||
<description>ebean-h2 composite</description>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.h2.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.h2 {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.h2;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-hana</name>
|
||||
<description>ebean-hana composite</description>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.hana.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.hana {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.hana;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mariadb</name>
|
||||
<description>ebean-mariadb composite</description>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.mariadb.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.mariadb {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.mariadb;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mysql</name>
|
||||
<description>ebean-mysql composite</description>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.mysql.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.mysql {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.mysql;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-nuodb</name>
|
||||
<description>ebean-nuodb composite</description>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.nuodb.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.nuodb {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.nuodb;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-oracle</name>
|
||||
<description>ebean-oracle composite</description>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.oracle.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.oracle {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.oracle;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-postgres</name>
|
||||
<description>ebean-postgres composite</description>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.postgres.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.postgres {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.postgres;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlite</name>
|
||||
<description>ebean-sqlite composite</description>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.sqlite.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.sqlite {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.sqlite;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlserver</name>
|
||||
<description>ebean-sqlserver composite</description>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.sqlserver.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.sqlserver {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.sqlserver;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-yugabyte</name>
|
||||
<description>ebean-yugabyte composite</description>
|
||||
<artifactId>ebean-yugabyte</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.yugabyte.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
module io.ebean.yugabyte {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.postgres;
|
||||
|
||||
}
|
||||
@@ -2,57 +2,52 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean composite</name>
|
||||
<description>Composite of common runtime dependencies</description>
|
||||
<name>ebean (all platforms)</name>
|
||||
<description>composite of common runtime dependencies for all platforms</description>
|
||||
<artifactId>ebean</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.16.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<scm>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
</project>
|
||||
+2
-1
@@ -2,6 +2,7 @@ module io.ebean {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
|
||||
requires transitive io.ebean.platform.all;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>ebean</module>
|
||||
<module>ebean-clickhouse</module>
|
||||
<module>ebean-cockroach</module>
|
||||
<module>ebean-db2</module>
|
||||
<module>ebean-h2</module>
|
||||
<module>ebean-hana</module>
|
||||
<!-- <module>hsqldb</module>-->
|
||||
<module>ebean-mariadb</module>
|
||||
<module>ebean-mysql</module>
|
||||
<module>ebean-nuodb</module>
|
||||
<module>ebean-oracle</module>
|
||||
<module>ebean-postgres</module>
|
||||
<!-- <module>sqlanywhere</module>-->
|
||||
<module>ebean-sqlite</module>
|
||||
<module>ebean-sqlserver</module>
|
||||
<module>ebean-yugabyte</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
+2
-26
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
@@ -49,7 +49,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-annotation</artifactId>
|
||||
<version>7.7</version>
|
||||
<version>7.8</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -80,15 +80,6 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
and not require a separate module for it -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2database.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>jta</artifactId>
|
||||
@@ -112,19 +103,4 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -117,7 +117,7 @@ public final class BeanSet<E> extends AbstractBeanCollection<E> implements Set<E
|
||||
try {
|
||||
if (set == null) {
|
||||
if (!disableLazyLoad && modifyListening) {
|
||||
lazyLoadCollection(false);
|
||||
lazyLoadCollection(true);
|
||||
} else {
|
||||
set = new LinkedHashSet<>();
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public final class BeanSet<E> extends AbstractBeanCollection<E> implements Set<E
|
||||
if (disableLazyLoad) {
|
||||
set = new LinkedHashSet<>();
|
||||
} else {
|
||||
lazyLoadCollection(false);
|
||||
lazyLoadCollection(true);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.ebean.config.dbplatform;
|
||||
|
||||
import io.ebean.annotation.Platform;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
|
||||
/**
|
||||
* Provides DatabasePlatform matching by name, JDBC product name and specific platform enum.
|
||||
* <p>
|
||||
* DatabasePlatformProvider implementations are service loaded and custom implementations
|
||||
* can be added and used via the service loading mechanism.
|
||||
*/
|
||||
public interface DatabasePlatformProvider {
|
||||
|
||||
/**
|
||||
* Match on the lower case platform name.
|
||||
*/
|
||||
boolean match(String name);
|
||||
|
||||
/**
|
||||
* Create the platform based on the lower case platform name.
|
||||
*/
|
||||
DatabasePlatform create(String name);
|
||||
|
||||
/**
|
||||
* Match on the lower case JDBC metadata product name.
|
||||
*/
|
||||
boolean matchByProductName(String productName);
|
||||
|
||||
/**
|
||||
* Create the platform based on the lower case JDBC metadata product name.
|
||||
*/
|
||||
DatabasePlatform create(int majorVersion, int minorVersion, DatabaseMetaData meta, Connection connection);
|
||||
|
||||
/**
|
||||
* Match on the specific platform.
|
||||
*/
|
||||
boolean matchPlatform(Platform platform);
|
||||
|
||||
/**
|
||||
* Create the specific platform.
|
||||
*/
|
||||
DatabasePlatform create(Platform platform);
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Clickhouse DB specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.clickhouse;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Cockroach DB specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.cockroach;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* DB2 specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.db2;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* H2 specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.h2;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* SAP HANA specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.hana;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Hsqldb specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.hsqldb;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* MySql specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.mysql;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* NuoDB specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.nuodb;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Oracle specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.oracle;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Postgres specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.postgres;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* SqlAnywhere specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.sqlanywhere;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Sqlite specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.sqlite;
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* SqlServer specific support.
|
||||
*/
|
||||
package io.ebean.config.dbplatform.sqlserver;
|
||||
@@ -1,12 +0,0 @@
|
||||
package io.ebean.config.dbplatform.yugabyte;
|
||||
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
|
||||
public class YugabytePlaform extends PostgresPlatform {
|
||||
|
||||
public YugabytePlaform() {
|
||||
super();
|
||||
this.platform = Platform.YUGABYTE;
|
||||
}
|
||||
}
|
||||
+1
-16
@@ -1,6 +1,7 @@
|
||||
module io.ebean.api {
|
||||
|
||||
uses io.ebean.config.AutoConfigure;
|
||||
uses io.ebean.config.dbplatform.DatabasePlatformProvider;
|
||||
uses io.ebean.datasource.DataSourceAlertFactory;
|
||||
uses io.ebean.metric.MetricFactory;
|
||||
uses io.ebean.service.SpiContainerFactory;
|
||||
@@ -19,7 +20,6 @@ module io.ebean.api {
|
||||
requires static io.ebean.types;
|
||||
requires static com.fasterxml.jackson.core;
|
||||
requires static javax.servlet.api;
|
||||
requires static com.h2database;
|
||||
|
||||
exports io.ebean;
|
||||
exports io.ebean.bean;
|
||||
@@ -27,21 +27,6 @@ module io.ebean.api {
|
||||
exports io.ebean.meta;
|
||||
exports io.ebean.config;
|
||||
exports io.ebean.config.dbplatform;
|
||||
exports io.ebean.config.dbplatform.clickhouse;
|
||||
exports io.ebean.config.dbplatform.h2;
|
||||
exports io.ebean.config.dbplatform.db2;
|
||||
exports io.ebean.config.dbplatform.cockroach;
|
||||
exports io.ebean.config.dbplatform.hana;
|
||||
exports io.ebean.config.dbplatform.hsqldb;
|
||||
exports io.ebean.config.dbplatform.mariadb;
|
||||
exports io.ebean.config.dbplatform.mysql;
|
||||
exports io.ebean.config.dbplatform.nuodb;
|
||||
exports io.ebean.config.dbplatform.oracle;
|
||||
exports io.ebean.config.dbplatform.postgres;
|
||||
exports io.ebean.config.dbplatform.sqlanywhere;
|
||||
exports io.ebean.config.dbplatform.sqlite;
|
||||
exports io.ebean.config.dbplatform.sqlserver;
|
||||
exports io.ebean.config.dbplatform.yugabyte;
|
||||
exports io.ebean.event;
|
||||
exports io.ebean.event.readaudit;
|
||||
exports io.ebean.event.changelog;
|
||||
@@ -1,68 +0,0 @@
|
||||
package io.ebean.config.dbplatform;
|
||||
|
||||
import io.ebean.Query;
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class PostgresPlatformTest {
|
||||
|
||||
@Test
|
||||
public void testUuidType() {
|
||||
|
||||
PostgresPlatform platform = new PostgresPlatform();
|
||||
platform.configure(new PlatformConfig(), false);
|
||||
|
||||
DbPlatformType dbType = platform.getDbTypeMap().get(DbPlatformType.UUID);
|
||||
String columnDefn = dbType.renderType(0, 0);
|
||||
|
||||
assertThat(columnDefn).isEqualTo("uuid");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void default_forUpdate_expect_noKeyUsed() {
|
||||
|
||||
DatabasePlatform platform = new PostgresPlatform();
|
||||
|
||||
PlatformConfig config = new PlatformConfig();
|
||||
platform.configure(config);
|
||||
|
||||
assertThat(config.isForUpdateNoKey()).isFalse();
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.DEFAULT)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.DEFAULT)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.DEFAULT)).isEqualTo("X for update");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.UPDATE)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.NO_KEY_UPDATE)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.SHARE)).isEqualTo("X for share skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.KEY_SHARE)).isEqualTo("X for key share skip locked");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.UPDATE)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.NO_KEY_UPDATE)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.SHARE)).isEqualTo("X for share nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.KEY_SHARE)).isEqualTo("X for key share nowait");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.UPDATE)).isEqualTo("X for update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.NO_KEY_UPDATE)).isEqualTo("X for no key update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.SHARE)).isEqualTo("X for share");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.KEY_SHARE)).isEqualTo("X for key share");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void lockWithKey_forUpdate() {
|
||||
|
||||
DatabasePlatform platform = new PostgresPlatform();
|
||||
|
||||
PlatformConfig config = new PlatformConfig();
|
||||
config.setForUpdateNoKey(true);
|
||||
platform.configure(config);
|
||||
|
||||
assertThat(config.isForUpdateNoKey()).isTrue();
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.DEFAULT)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.DEFAULT)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.DEFAULT)).isEqualTo("X for no key update");
|
||||
}
|
||||
|
||||
}
|
||||
+10
-4
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-12.16.2</tag>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean autotune</name>
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -52,6 +52,13 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -64,7 +71,6 @@
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.15.0</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
+15
-15
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -71,88 +71,88 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+2
-17
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -28,19 +28,4 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
+25
-17
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-12.16.2</tag>
|
||||
<tag>ebean-parent-13.0.0</tag>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -41,19 +41,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -141,6 +141,26 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Test scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
@@ -228,18 +248,6 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
@@ -97,12 +97,8 @@ public final class LoadManyRequest extends LoadRequest {
|
||||
// potentially changes the joins, selected properties, cache mode
|
||||
loadContext.configureQuery(query);
|
||||
if (onlyIds) {
|
||||
String mapKey = many.mapKey();
|
||||
if (mapKey != null) {
|
||||
query.select(mapKey);
|
||||
} else {
|
||||
query.select(many.targetIdProperty());
|
||||
}
|
||||
// lazy loading invoked via clear() and removeAll()
|
||||
query.select(many.targetIdProperty());
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
+27
-159
@@ -2,36 +2,18 @@ package io.ebeaninternal.server.core;
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.clickhouse.ClickHousePlatform;
|
||||
import io.ebean.config.dbplatform.cockroach.CockroachPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2ForIPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2LegacyPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2LuwPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2ZosPlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.hsqldb.HsqldbPlatform;
|
||||
import io.ebean.config.dbplatform.mariadb.MariaDbPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySql55Platform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.nuodb.NuoDbPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.Oracle11Platform;
|
||||
import io.ebean.config.dbplatform.oracle.Oracle12Platform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.Postgres9Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlanywhere.SqlAnywherePlatform;
|
||||
import io.ebean.config.dbplatform.sqlite.SQLitePlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer16Platform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.config.dbplatform.yugabyte.YugabytePlaform;
|
||||
import io.ebean.config.dbplatform.DatabasePlatformProvider;
|
||||
import io.ebeaninternal.api.CoreLog;
|
||||
import io.ebeaninternal.api.DbOffline;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.*;
|
||||
import java.util.Locale;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
/**
|
||||
* Create a DatabasePlatform from the configuration.
|
||||
@@ -41,6 +23,14 @@ import java.util.Locale;
|
||||
*/
|
||||
public class DatabasePlatformFactory {
|
||||
|
||||
private final List<DatabasePlatformProvider> providers = new ArrayList<>();
|
||||
|
||||
public DatabasePlatformFactory() {
|
||||
for (DatabasePlatformProvider platformProvider : ServiceLoader.load(DatabasePlatformProvider.class)) {
|
||||
providers.add(platformProvider);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the appropriate database specific platform.
|
||||
*/
|
||||
@@ -71,68 +61,10 @@ public class DatabasePlatformFactory {
|
||||
*/
|
||||
private DatabasePlatform byDatabaseName(String dbName) {
|
||||
dbName = dbName.toLowerCase();
|
||||
if (dbName.equals("h2")) {
|
||||
return new H2Platform();
|
||||
}
|
||||
if (dbName.equals("mariadb")) {
|
||||
return new MariaDbPlatform();
|
||||
}
|
||||
if (dbName.equals("mysql")) {
|
||||
return new MySqlPlatform();
|
||||
}
|
||||
if (dbName.equals("mysql55")) {
|
||||
return new MySql55Platform();
|
||||
}
|
||||
if (dbName.equals("postgres") || dbName.equals("postgres9")) {
|
||||
return new PostgresPlatform();
|
||||
}
|
||||
if (dbName.equals("oracle11") || dbName.equals("oracle10") || dbName.equals("oracle9")) {
|
||||
return new Oracle11Platform();
|
||||
}
|
||||
if (dbName.equals("oracle12")) {
|
||||
return new Oracle12Platform();
|
||||
}
|
||||
if (dbName.equals("oracle")) {
|
||||
return new OraclePlatform();
|
||||
}
|
||||
if (dbName.equals("sqlserver16")) {
|
||||
return new SqlServer16Platform();
|
||||
}
|
||||
if (dbName.equals("sqlserver17")) {
|
||||
return new SqlServer17Platform();
|
||||
}
|
||||
if (dbName.equals("sqlserver")) {
|
||||
throw new IllegalArgumentException("Please choose the more specific sqlserver16 or sqlserver17 platform. Refer to issue #1340 for details");
|
||||
}
|
||||
if (dbName.equals("sqlanywhere")) {
|
||||
return new SqlAnywherePlatform();
|
||||
}
|
||||
if (dbName.equals("db2")) {
|
||||
throw new IllegalArgumentException("Please choose the more specific db2luw/db2zos/db2fori platform. Refer to issue #2514 for details");
|
||||
}
|
||||
if (dbName.equals("db2legacy")) {
|
||||
return new DB2LegacyPlatform();
|
||||
}
|
||||
if (dbName.equals("db2zos")) {
|
||||
return new DB2ZosPlatform();
|
||||
}
|
||||
if (dbName.equals("db2fori")) {
|
||||
return new DB2ForIPlatform();
|
||||
}
|
||||
if (dbName.equals("db2luw")) {
|
||||
return new DB2LuwPlatform();
|
||||
}
|
||||
if (dbName.equals("clickhouse")) {
|
||||
return new ClickHousePlatform();
|
||||
}
|
||||
if (dbName.equals("nuodb")) {
|
||||
return new NuoDbPlatform();
|
||||
}
|
||||
if (dbName.equals("sqlite")) {
|
||||
return new SQLitePlatform();
|
||||
}
|
||||
if (dbName.equals("hana")) {
|
||||
return new HanaPlatform();
|
||||
for (DatabasePlatformProvider provider : providers) {
|
||||
if (provider.match(dbName)) {
|
||||
return provider.create(dbName);
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("database platform " + dbName + " is not known?");
|
||||
}
|
||||
@@ -156,79 +88,15 @@ public class DatabasePlatformFactory {
|
||||
final int majorVersion = metaData.getDatabaseMajorVersion();
|
||||
final int minorVersion = metaData.getDatabaseMinorVersion();
|
||||
CoreLog.log.debug("platform for productName[{}] version[{}.{}]", dbProductName, majorVersion, minorVersion);
|
||||
|
||||
if (dbProductName.contains("oracle")) {
|
||||
return oracleVersion(majorVersion);
|
||||
} else if (dbProductName.contains("microsoft")) {
|
||||
throw new IllegalArgumentException("For SqlServer please explicitly choose either sqlserver16 or sqlserver17 as the platform via DatabaseConfig.setDatabasePlatformName. Refer to issue #1340 for more details");
|
||||
} else if (dbProductName.contains("h2")) {
|
||||
return new H2Platform();
|
||||
} else if (dbProductName.contains("hsql database engine")) {
|
||||
return new HsqldbPlatform();
|
||||
} else if (dbProductName.contains("postgres")) {
|
||||
String productVersion = metaData.getDatabaseProductVersion().toLowerCase(Locale.ENGLISH);
|
||||
return readPostgres(connection, majorVersion, productVersion);
|
||||
} else if (dbProductName.contains("mariadb")) {
|
||||
return new MariaDbPlatform();
|
||||
} else if (dbProductName.contains("mysql")) {
|
||||
return mysqlVersion(majorVersion, minorVersion);
|
||||
} else if (dbProductName.contains("nuo")) {
|
||||
return new NuoDbPlatform();
|
||||
} else if (dbProductName.contains("sqlite")) {
|
||||
return new SQLitePlatform();
|
||||
} else if (dbProductName.contains("db2")) {
|
||||
throw new IllegalArgumentException("For DB2 please explicitly choose either db2legacy/db2luw/db2zos/db2fori platform. Refer to issue #2514 for details");
|
||||
} else if (dbProductName.contains("sql anywhere")) {
|
||||
return new SqlAnywherePlatform();
|
||||
} else if (dbProductName.contains("hdb")) {
|
||||
return new HanaPlatform();
|
||||
} else if (dbProductName.contains("clickhouse")) {
|
||||
return new ClickHousePlatform();
|
||||
}
|
||||
|
||||
// use the standard one
|
||||
return new DatabasePlatform();
|
||||
}
|
||||
|
||||
private DatabasePlatform oracleVersion(int majorVersion) {
|
||||
if (majorVersion < 12) {
|
||||
return new Oracle11Platform();
|
||||
}
|
||||
if (majorVersion < 13) {
|
||||
return new Oracle12Platform();
|
||||
}
|
||||
return new OraclePlatform();
|
||||
}
|
||||
|
||||
private DatabasePlatform mysqlVersion(int majorVersion, int minorVersion) {
|
||||
if (majorVersion <= 5 && minorVersion <= 5) {
|
||||
return new MySql55Platform();
|
||||
}
|
||||
return new MySqlPlatform();
|
||||
}
|
||||
|
||||
/**
|
||||
* Use a select version() query as it could be Postgres or CockroachDB.
|
||||
*/
|
||||
private static DatabasePlatform readPostgres(Connection connection, int majorVersion, String productVersion) {
|
||||
if (productVersion.contains("-yb-")) {
|
||||
return new YugabytePlaform();
|
||||
}
|
||||
try (PreparedStatement statement = connection.prepareStatement("select version() as \"version\"")) {
|
||||
try (ResultSet resultSet = statement.executeQuery()) {
|
||||
if (resultSet.next()) {
|
||||
productVersion = resultSet.getString("version").toLowerCase();
|
||||
if (productVersion.contains("cockroach")) {
|
||||
return new CockroachPlatform();
|
||||
}
|
||||
}
|
||||
for (DatabasePlatformProvider provider : providers) {
|
||||
if (provider.matchByProductName(dbProductName)) {
|
||||
return provider.create(majorVersion, minorVersion, metaData, connection);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
CoreLog.log.warn("Error running detection query on Postgres", e);
|
||||
}
|
||||
if (majorVersion <= 9) {
|
||||
return new Postgres9Platform();
|
||||
}
|
||||
return new PostgresPlatform();
|
||||
throw new IllegalStateException("Unable to determine the appropriate ebean platform given database product name [" + dbProductName
|
||||
+ "] and ebean platform providers " + providers + ". With ebean 13+ we now have separate platforms (ebean-postgres, ebean-mysql etc)"
|
||||
+ " and should use database specific platform dependency like ebean-postgres. Note that we can use ebean-platform-all to include"
|
||||
+ " all the platforms.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import io.ebean.config.ServerConfigProvider;
|
||||
import io.ebean.config.TenantMode;
|
||||
import io.ebean.config.UnderscoreNamingConvention;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.event.ShutdownManager;
|
||||
import io.ebean.service.SpiContainer;
|
||||
import io.ebeaninternal.api.CoreLog;
|
||||
@@ -24,6 +23,7 @@ import io.ebeaninternal.server.executor.DefaultBackgroundExecutor;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import java.net.URL;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
@@ -86,7 +86,7 @@ public final class DefaultContainer implements SpiContainer {
|
||||
|
||||
boolean online = true;
|
||||
if (config.isDocStoreOnly()) {
|
||||
config.setDatabasePlatform(new H2Platform());
|
||||
config.setDatabasePlatform(new DatabasePlatform());
|
||||
} else {
|
||||
TenantMode tenantMode = config.getTenantMode();
|
||||
if (TenantMode.DB != tenantMode) {
|
||||
@@ -137,9 +137,21 @@ public final class DefaultContainer implements SpiContainer {
|
||||
}
|
||||
if (config.isAutoLoadModuleInfo()) {
|
||||
// auto register entity classes
|
||||
boolean found = false;
|
||||
for (ModuleInfoLoader loader : ServiceLoader.load(ModuleInfoLoader.class)) {
|
||||
config.addAll(loader.classesFor(config.getName(), config.isDefaultServer()));
|
||||
found = true;
|
||||
}
|
||||
if (!found) {
|
||||
checkMissingModulePathProvides();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkMissingModulePathProvides() {
|
||||
URL servicesFile = ClassLoader.getSystemResource("META-INF/services/io.ebean.config.ModuleInfoLoader");
|
||||
if (servicesFile != null) {
|
||||
log.error("module-info.java is probably missing 'provides io.ebean.config.ModuleInfoLoader with _Ebean$ModuleInfo' clause. ModuleInfoLoader exists but was not service loaded.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -562,7 +562,29 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> BeanManager<T> beanManager(Class<T> entityType) {
|
||||
return (BeanManager<T>) beanManager(entityType.getName());
|
||||
BeanManager<T> mgr = (BeanManager<T>) beanManager(entityType.getName());
|
||||
if (mgr == null) {
|
||||
errorBeanNotRegistered(entityType);
|
||||
}
|
||||
return mgr;
|
||||
}
|
||||
|
||||
private <T> void errorBeanNotRegistered(Class<T> entityType) {
|
||||
if (beanManagerMap.isEmpty()) {
|
||||
throw new PersistenceException(errNothingRegistered());
|
||||
} else {
|
||||
throw new PersistenceException(errNotRegistered(entityType));
|
||||
}
|
||||
}
|
||||
|
||||
private <T> String errNothingRegistered() {
|
||||
return "There are no registered entities. If using query beans, that generates _Ebean$ModuleInfo.java into " +
|
||||
"generated sources and is service loaded. If using module-info.java, then probably missing 'provides io.ebean.config.ModuleInfoLoader with _Ebean$ModuleInfo' clause.";
|
||||
}
|
||||
|
||||
private String errNotRegistered(Class<?> beanClass) {
|
||||
return "The type [" + beanClass + "] is not a registered entity?"
|
||||
+ " If you don't explicitly list the entity classes to use Ebean will search for them in the classpath.";
|
||||
}
|
||||
|
||||
private BeanManager<?> beanManager(String beanClassName) {
|
||||
|
||||
@@ -1196,11 +1196,6 @@ public final class DefaultPersister implements Persister {
|
||||
return request;
|
||||
}
|
||||
|
||||
private String errNotRegistered(Class<?> beanClass) {
|
||||
return "The type [" + beanClass + "] is not a registered entity?"
|
||||
+ " If you don't explicitly list the entity classes to use Ebean will search for them in the classpath.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the BeanDescriptor for a bean that is being persisted.
|
||||
* <p>
|
||||
@@ -1210,10 +1205,6 @@ public final class DefaultPersister implements Persister {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> BeanManager<T> beanManager(Class<?> cls) {
|
||||
BeanManager<T> mgr = (BeanManager<T>) beanDescriptorManager.beanManager(cls);
|
||||
if (mgr == null) {
|
||||
throw new PersistenceException(errNotRegistered(cls));
|
||||
}
|
||||
return mgr;
|
||||
return (BeanManager<T>) beanDescriptorManager.beanManager(cls);
|
||||
}
|
||||
}
|
||||
|
||||
+30
-10
@@ -6,6 +6,7 @@ module io.ebean.core {
|
||||
uses io.ebean.config.DatabaseConfigProvider;
|
||||
uses io.ebean.config.ServerConfigProvider;
|
||||
uses io.ebean.config.ModuleInfoLoader;
|
||||
uses io.ebean.config.dbplatform.DatabasePlatformProvider;
|
||||
uses io.ebean.datasource.DataSourceAlertFactory;
|
||||
uses io.ebean.core.type.ExtraTypeFactory;
|
||||
uses io.ebeanservice.docstore.api.DocStoreFactory;
|
||||
@@ -23,12 +24,14 @@ module io.ebean.core {
|
||||
requires transitive io.ebean.xmapping.api;
|
||||
requires transitive io.ebean.core.type;
|
||||
requires transitive io.ebean.ddl.runner;
|
||||
requires transitive org.antlr.antlr4.runtime;
|
||||
requires org.antlr.antlr4.runtime;
|
||||
requires io.avaje.classpath.scanner.api;
|
||||
requires io.avaje.classpath.scanner;
|
||||
requires io.ebean.types;
|
||||
requires org.slf4j;
|
||||
|
||||
requires static io.avaje.jsr305x;
|
||||
requires static com.fasterxml.jackson.annotation;
|
||||
requires static com.fasterxml.jackson.core;
|
||||
requires static com.fasterxml.jackson.databind;
|
||||
requires static jakarta.validation;
|
||||
@@ -40,18 +43,35 @@ module io.ebean.core {
|
||||
|
||||
exports io.ebeaninternal.server.cache;
|
||||
|
||||
exports io.ebeaninternal.api to io.ebean.ddl.generator, io.ebean.querybean, io.ebean.autotune, io.ebean.postgis, io.ebean.test;
|
||||
exports io.ebeaninternal.server.deploy to io.ebean.autotune, io.ebean.ddl.generator;
|
||||
exports io.ebeaninternal.server.deploy.id to io.ebean.ddl.generator;
|
||||
exports io.ebeaninternal.server.deploy.meta to io.ebean.ddl.generator;
|
||||
exports io.ebeaninternal.server.deploy.visitor to io.ebean.ddl.generator;
|
||||
exports io.ebeanservice.docstore.api;
|
||||
exports io.ebeanservice.docstore.api.support to io.ebean.elastic, io.ebean.test;
|
||||
exports io.ebeanservice.docstore.api.mapping to io.ebean.elastic;
|
||||
|
||||
exports io.ebeaninternal.server.el to io.ebean.autotune;
|
||||
exports io.ebeaninternal.api to io.ebean.ddl.generator, io.ebean.querybean, io.ebean.autotune, io.ebean.postgis, io.ebean.test, io.ebean.elastic, io.ebean.spring.txn;
|
||||
exports io.ebeaninternal.api.json to io.ebean.test;
|
||||
exports io.ebeaninternal.json to io.ebean.test;
|
||||
exports io.ebeaninternal.server.autotune to io.ebean.autotune;
|
||||
exports io.ebeaninternal.server.querydefn to io.ebean.autotune, io.ebean.querybean;
|
||||
exports io.ebeaninternal.server.type to io.ebean.postgis;
|
||||
exports io.ebeaninternal.server.core to io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.core.bootup to io.ebean.test;
|
||||
exports io.ebeaninternal.server.core.timezone to io.ebean.test;
|
||||
exports io.ebeaninternal.server.cluster to io.ebean.test, io.ebean.k8scache;
|
||||
exports io.ebeaninternal.server.deploy to io.ebean.autotune, io.ebean.ddl.generator, io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.deploy.id to io.ebean.ddl.generator;
|
||||
exports io.ebeaninternal.server.deploy.meta to io.ebean.ddl.generator, io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.deploy.visitor to io.ebean.ddl.generator;
|
||||
exports io.ebeaninternal.server.el to io.ebean.autotune, io.ebean.test;
|
||||
exports io.ebeaninternal.server.expression to io.ebean.querybean, io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.expression.platform to io.ebean.test;
|
||||
exports io.ebeaninternal.server.grammer to io.ebean.test;
|
||||
exports io.ebeaninternal.server.idgen to io.ebean.test;
|
||||
exports io.ebeaninternal.server.persist to io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.query to io.ebean.test;
|
||||
exports io.ebeaninternal.server.querydefn to io.ebean.autotune, io.ebean.querybean, io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.rawsql to io.ebean.test;
|
||||
exports io.ebeaninternal.server.text.json to io.ebean.test, io.ebean.elastic;
|
||||
exports io.ebeaninternal.server.type to io.ebean.postgis, io.ebean.test;
|
||||
exports io.ebeaninternal.server.transaction to io.ebean.test, io.ebean.elastic, io.ebean.spring.txn, io.ebean.k8scache;
|
||||
exports io.ebeaninternal.server.util to io.ebean.querybean;
|
||||
exports io.ebeaninternal.server.expression to io.ebean.querybean;
|
||||
|
||||
provides io.ebean.metric.MetricFactory with io.ebeaninternal.server.profile.DMetricFactory;
|
||||
provides io.ebean.service.SpiContainerFactory with io.ebeaninternal.server.DContainerFactory;
|
||||
@@ -5469,14 +5469,14 @@ create table c_user_history(
|
||||
);
|
||||
create view c_user_with_history as select * from c_user union all select * from c_user_history;
|
||||
|
||||
create trigger hembi_bean_history_upd before update,delete on hembi_bean for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hx_link_history_upd before update,delete on hx_link for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hi_link_history_upd before update,delete on hi_link for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hi_link_doc_history_upd before update,delete on hi_link_doc for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hi_tone_history_upd before update,delete on hi_tone for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hi_tthree_history_upd before update,delete on hi_tthree for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hi_ttwo_history_upd before update,delete on hi_ttwo for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hsd_setting_history_upd before update,delete on hsd_setting for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hsd_user_history_upd before update,delete on hsd_user for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger link_history_upd before update,delete on link for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger c_user_history_upd before update,delete on c_user for each row call "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
create trigger hembi_bean_history_upd before update,delete on hembi_bean for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hx_link_history_upd before update,delete on hx_link for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hi_link_history_upd before update,delete on hi_link for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hi_link_doc_history_upd before update,delete on hi_link_doc for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hi_tone_history_upd before update,delete on hi_tone for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hi_tthree_history_upd before update,delete on hi_tthree for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hi_ttwo_history_upd before update,delete on hi_ttwo for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hsd_setting_history_upd before update,delete on hsd_setting for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger hsd_user_history_upd before update,delete on hsd_user for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger link_history_upd before update,delete on link for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
create trigger c_user_history_upd before update,delete on c_user for each row call "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.ebeaninternal.server.deploy.parse;
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.server.core.bootup.BootupClasses;
|
||||
import io.ebeaninternal.server.deploy.generatedproperty.GeneratedPropertyFactory;
|
||||
import io.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.ebeaninternal.server.type;
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebean.core.type.ScalarType;
|
||||
import io.ebeaninternal.server.core.bootup.BootupClasses;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.ebeaninternal.server.type;
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.core.type.DataReader;
|
||||
import io.ebean.core.type.ScalarType;
|
||||
import io.ebeaninternal.server.core.bootup.BootupClasses;
|
||||
|
||||
+10
-14
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.16.2</version>
|
||||
<version>13.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
@@ -90,17 +97,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
+11
-67
@@ -8,28 +8,7 @@ import io.ebean.config.DbConstraintNaming;
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.PropertiesWrapper;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.clickhouse.ClickHousePlatform;
|
||||
import io.ebean.config.dbplatform.cockroach.CockroachPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2ForIPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2LegacyPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2LuwPlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2ZosPlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.hsqldb.HsqldbPlatform;
|
||||
import io.ebean.config.dbplatform.mariadb.MariaDbPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySql55Platform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.nuodb.NuoDbPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.Oracle11Platform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.Postgres9Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlanywhere.SqlAnywherePlatform;
|
||||
import io.ebean.config.dbplatform.sqlite.SQLitePlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer16Platform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.config.dbplatform.yugabyte.YugabytePlaform;
|
||||
import io.ebean.config.dbplatform.DatabasePlatformProvider;
|
||||
import io.ebean.dbmigration.DbMigration;
|
||||
import io.ebean.util.IOUtils;
|
||||
import io.ebeaninternal.api.DbOffline;
|
||||
@@ -51,6 +30,7 @@ import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
import static io.ebeaninternal.api.PlatformMatch.matchPlatform;
|
||||
|
||||
@@ -81,6 +61,7 @@ public class DefaultDbMigration implements DbMigration {
|
||||
private static final String initialVersion = "1.0";
|
||||
private static final String GENERATED_COMMENT = "THIS IS A GENERATED FILE - DO NOT MODIFY";
|
||||
|
||||
private final List<DatabasePlatformProvider> platformProviders = new ArrayList<>();
|
||||
protected final boolean online;
|
||||
private boolean logToSystemOut = true;
|
||||
protected SpiEbeanServer server;
|
||||
@@ -113,6 +94,9 @@ public class DefaultDbMigration implements DbMigration {
|
||||
*/
|
||||
public DefaultDbMigration() {
|
||||
this.online = false;
|
||||
for (DatabasePlatformProvider platformProvider : ServiceLoader.load(DatabasePlatformProvider.class)) {
|
||||
platformProviders.add(platformProvider);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -805,58 +789,18 @@ public class DefaultDbMigration implements DbMigration {
|
||||
*/
|
||||
protected DatabasePlatform platform(Platform platform) {
|
||||
switch (platform) {
|
||||
case H2:
|
||||
return new H2Platform();
|
||||
case HSQLDB:
|
||||
return new HsqldbPlatform();
|
||||
case POSTGRES9:
|
||||
return new Postgres9Platform();
|
||||
case POSTGRES:
|
||||
return new PostgresPlatform();
|
||||
case YUGABYTE:
|
||||
return new YugabytePlaform();
|
||||
case MARIADB:
|
||||
return new MariaDbPlatform();
|
||||
case MYSQL55:
|
||||
return new MySql55Platform();
|
||||
case MYSQL:
|
||||
return new MySqlPlatform();
|
||||
case ORACLE:
|
||||
return new OraclePlatform();
|
||||
case ORACLE11:
|
||||
return new Oracle11Platform();
|
||||
case SQLANYWHERE:
|
||||
return new SqlAnywherePlatform();
|
||||
case SQLSERVER16:
|
||||
return new SqlServer16Platform();
|
||||
case SQLSERVER17:
|
||||
return new SqlServer17Platform();
|
||||
case SQLSERVER:
|
||||
throw new IllegalArgumentException("Please choose the more specific SQLSERVER16 or SQLSERVER17 platform. Refer to issue #1340 for details");
|
||||
case DB2:
|
||||
logger.warn("Using DB2LegacyPlatform. It is recommended to migrate to db2luw/db2zos/db2fori. Refer to issue #2514 for details");
|
||||
return new DB2LegacyPlatform();
|
||||
case DB2LUW:
|
||||
return new DB2LuwPlatform();
|
||||
case DB2ZOS:
|
||||
return new DB2ZosPlatform();
|
||||
case DB2FORI:
|
||||
return new DB2ForIPlatform();
|
||||
case SQLITE:
|
||||
return new SQLitePlatform();
|
||||
case HANA:
|
||||
return new HanaPlatform();
|
||||
case NUODB:
|
||||
return new NuoDbPlatform();
|
||||
case COCKROACH:
|
||||
return new CockroachPlatform();
|
||||
case CLICKHOUSE:
|
||||
return new ClickHousePlatform();
|
||||
|
||||
case GENERIC:
|
||||
return new DatabasePlatform();
|
||||
|
||||
default:
|
||||
for (DatabasePlatformProvider platformProvider : platformProviders) {
|
||||
if (platformProvider.matchPlatform(platform)) {
|
||||
return platformProvider.create(platform);
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Platform missing? " + platform);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import io.ebeaninternal.dbmigration.ddlgeneration.DdlBuffer;
|
||||
*/
|
||||
public class H2HistoryDdl extends DbTriggerBasedHistoryDdl {
|
||||
|
||||
private static final String TRIGGER_CLASS = "io.ebean.config.dbplatform.h2.H2HistoryTrigger";
|
||||
private static final String TRIGGER_CLASS = "io.ebean.platform.h2.H2HistoryTrigger";
|
||||
|
||||
H2HistoryDdl() {
|
||||
this.sysPeriodType = "timestamp";
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
open module io.ebean.ddl.generator {
|
||||
module io.ebean.ddl.generator {
|
||||
|
||||
exports io.ebean.dbmigration;
|
||||
|
||||
@@ -12,4 +12,7 @@ open module io.ebean.ddl.generator {
|
||||
requires io.ebean.migration;
|
||||
|
||||
uses io.ebean.dbmigration.DbMigration;
|
||||
|
||||
// support existing tests
|
||||
exports io.ebeaninternal.extraddl.model to io.ebean.test;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.dbplatform.DbPlatformType;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package io.ebeaninternal.dbmigration;
|
||||
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.dbplatform.DbPlatformType;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+5
-5
@@ -4,11 +4,11 @@ import io.localtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.db2.DB2LuwPlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.db2.DB2LuwPlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.api.SpiEbeanServer;
|
||||
import io.ebeaninternal.dbmigration.migration.ChangeSet;
|
||||
import io.ebeaninternal.dbmigration.model.CurrentModel;
|
||||
|
||||
+4
-5
@@ -1,11 +1,10 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.clickhouse.ClickHousePlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.clickhouse.ClickHousePlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.Helper;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite;
|
||||
import io.ebeaninternal.dbmigration.migration.Column;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
import io.ebean.annotation.ConstraintMode;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
+7
-7
@@ -3,13 +3,13 @@ package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.IdType;
|
||||
import io.ebean.config.dbplatform.db2.DB2LuwPlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.db2.DB2LuwPlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.migration.AlterColumn;
|
||||
|
||||
+8
-8
@@ -2,13 +2,13 @@ package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.db2.DB2LuwPlatform;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.db2.DB2LuwPlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import io.ebeaninternal.dbmigration.migration.CreateIndex;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -104,7 +104,7 @@ public class PlatformDdl_CreateIndexTest {
|
||||
public void db2luw_fkeyCreateIndex() {
|
||||
String sql = db2LuwDdl.createIndex(fkeyCreateIndex(true));
|
||||
assertEquals("create unique index ix_mytab_acol on mytab (acol)", sql);
|
||||
|
||||
|
||||
sql = db2LuwDdl.createIndex(fkeyCreateIndex(false));
|
||||
assertEquals("create index ix_mytab_acol on mytab (acol)", sql);
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.hana.HanaPlatform;
|
||||
import io.ebean.config.dbplatform.mysql.MySqlPlatform;
|
||||
import io.ebean.config.dbplatform.oracle.OraclePlatform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.config.dbplatform.sqlserver.SqlServer17Platform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.hana.HanaPlatform;
|
||||
import io.ebean.platform.mysql.MySqlPlatform;
|
||||
import io.ebean.platform.oracle.OraclePlatform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.sqlserver.SqlServer17Platform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.PlatformDdlBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package io.ebeaninternal.dbmigration.ddlgeneration.platform;
|
||||
|
||||
import io.ebean.config.dbplatform.DbPlatformTypeMapping;
|
||||
import io.ebean.config.dbplatform.h2.H2Platform;
|
||||
import io.ebean.config.dbplatform.postgres.PostgresPlatform;
|
||||
import io.ebean.platform.h2.H2Platform;
|
||||
import io.ebean.platform.postgres.PostgresPlatform;
|
||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.util.PlatformTypeConverter;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user