WIP h2database v2

This commit is contained in:
Rob Bygrave
2021-12-17 23:22:25 +13:00
parent 6cc5e83b01
commit 860aad11ce
14 changed files with 37 additions and 22 deletions
@@ -39,6 +39,7 @@ public class H2Platform extends DatabasePlatform {
this.dbIdentity.setSupportsIdentity(true);
dbTypeMap.put(DbType.UUID, new DbPlatformType("uuid", false));
dbTypeMap.put(DbType.INTEGER, new DbPlatformType("integer", false));
}
/**
@@ -18,13 +18,12 @@ public class H2SequenceIdGenerator extends SequenceBatchIdGenerator {
*/
public H2SequenceIdGenerator(BackgroundExecutor be, DataSource ds, String seqName, int batchSize) {
super(be, ds, seqName, batchSize);
this.baseSql = "select " + seqName + ".nextval";
this.baseSql = "select nextval('" + seqName + "')";
this.unionBaseSql = " union " + baseSql;
}
@Override
public String getSql(int batchSize) {
StringBuilder sb = new StringBuilder();
sb.append(baseSql);
for (int i = 1; i < batchSize; i++) {