/** * Convert the DB column default literal to platform specific. */ private String convertDefaultValue(String dbDefault) { return dbDefaultValue.convert(dbDefault); }
/** * Set the DB true literal. */ public void setTrue(String dbTrueLiteral) { put(TRUE, dbTrueLiteral); }
/** * Set the DB FALSE literal (from the registered boolean ScalarType) */ public void setDbFalseLiteral(String dbFalseLiteral) { this.dbDefaultValue.setFalse(dbFalseLiteral); }
/** * Set the DB TRUE literal (from the registered boolean ScalarType) */ public void setDbTrueLiteral(String dbTrueLiteral) { this.dbDefaultValue.setTrue(dbTrueLiteral); }
public H2Platform() { super(); this.platform = Platform.H2; this.dbEncrypt = new H2DbEncrypt(); this.platformDdl = new H2Ddl(this); this.historySupport = new H2HistorySupport(); this.nativeUuidType = true; this.dbDefaultValue.setNow("now()"); this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(true); this.dbIdentity.setSupportsSequence(true); this.dbIdentity.setSupportsIdentity(true); // like ? escape'' not working in the latest version H2 so just using no // escape clause for now noting that backslash is an escape char for like in H2 this.likeClause = "like ?"; dbTypeMap.put(DbType.UUID, new DbPlatformType("uuid", false)); }
/** * Set the DB now function. */ public void setNow(String dbFunction) { put(NOW, dbFunction); }
/** * Set the DB false literal. */ public void setFalse(String dbFalseLiteral) { put(FALSE, dbFalseLiteral); }