/** * Convert a simple type with not scale or precision. */ protected String convertNoScale(String columnDefinition) { try { DbPlatformType dbType = platformTypes.lookup(columnDefinition, false); return dbType.renderType(0, 0); } catch (IllegalArgumentException e) { // assume already platform specific, leave as is return columnDefinition; } }
public DdlGenContext(DatabasePlatform dbPlatform, NamingConvention namingConvention){ this.dbPlatform = dbPlatform; this.dbTypeMap = dbPlatform.getDbTypeMap(); this.ddlSyntax = dbPlatform.getDbDdlSyntax(); this.newLine = ddlSyntax.getNewLine(); this.namingConvention = namingConvention; }
public SQLitePlatform() { super(); this.name = "sqlite"; this.dbIdentity.setIdType(IdType.IDENTITY); this.dbIdentity.setSupportsGetGeneratedKeys(false); this.dbIdentity.setSelectLastInsertedIdTemplate("select last_insert_rowid()"); this.openQuote = "\""; this.closeQuote = "\""; this.booleanDbType = Types.INTEGER; dbTypeMap.put(Types.BIT, new DbType("int default 0")); dbTypeMap.put(Types.BOOLEAN, new DbType("int default 0")); dbDdlSyntax.setInlinePrimaryKeyConstraint(true); dbDdlSyntax.setIdentity("AUTOINCREMENT"); dbDdlSyntax.setDisableReferentialIntegrity("PRAGMA foreign_keys = OFF"); dbDdlSyntax.setEnableReferentialIntegrity("PRAGMA foreign_keys = ON"); }
public PostgresDbEncrypt() { this.varcharEncryptFunction = new PgVarcharFunction(); this.dateEncryptFunction = new PgDateFunction(); }
public MySqlDbEncrypt() { this.varcharEncryptFunction = new MyVarcharFunction(); this.dateEncryptFunction = new MyDateFunction(); }
public H2DbEncrypt() { this.varcharEncryptFunction = new H2VarcharFunction(); this.dateEncryptFunction = new H2DateFunction(); }
/** * Replace back ticks (if they are used) with database platform specific * quoted identifiers. */ protected String quoteIdentifiers(String s) { return databasePlatform.convertQuotedIdentifiers(s); }
/** * Return a DB2 specific sequence IdGenerator that supports batch fetching * sequence values. */ @Override public IdGenerator createSequenceIdGenerator(BackgroundExecutor be, DataSource ds, String seqName, int batchSize) { return new DB2SequenceIdGenerator(be, ds, seqName, batchSize); }
/** * Return the identity type to use given the support in the underlying database * platform for sequences and identity/autoincrement. */ public IdType useIdentityType(IdentityType modelIdentityType) { return dbIdentity.useIdentityType(modelIdentityType); }
/** * Create a copy of the type with a new default length. */ public DbPlatformType withLength(int defaultLength) { return new DbPlatformType(name, defaultLength); } }
/** * Return the lower bound column. */ String getSysPeriodLower(String tableAlias) { return dbHistorySupport.getSysPeriodLower(tableAlias, sysPeriod); }
/** * Return the upper bound column. */ String getSysPeriodUpper(String tableAlias) { return dbHistorySupport.getSysPeriodUpper(tableAlias, sysPeriod); }
/** * Set the DB TRUE literal (from the registered boolean ScalarType) */ public void setDbTrueLiteral(String dbTrueLiteral) { this.dbDefaultValue.setTrue(dbTrueLiteral); }
/** * Set the DB now function. */ public void setNow(String dbFunction) { put(NOW, dbFunction); }
public DdlGenContext(DatabasePlatform dbPlatform, NamingConvention namingConvention){ this.dbPlatform = dbPlatform; this.dbTypeMap = dbPlatform.getDbTypeMap(); this.ddlSyntax = dbPlatform.getDbDdlSyntax(); this.newLine = ddlSyntax.getNewLine(); this.namingConvention = namingConvention; }
public PostgresDbEncrypt() { this.varcharEncryptFunction = new PgVarcharFunction(); this.dateEncryptFunction = new PgDateFunction(); }
public MySqlDbEncrypt() { this.varcharEncryptFunction = new MyVarcharFunction(); this.dateEncryptFunction = new MyDateFunction(); }
public H2DbEncrypt() { this.varcharEncryptFunction = new H2VarcharFunction(); this.dateEncryptFunction = new H2DateFunction(); }