Tabnine Logo
com.avaje.ebean.config.dbplatform
Code IndexAdd Tabnine to your IDE (free)

How to use com.avaje.ebean.config.dbplatform

Best Java code snippets using com.avaje.ebean.config.dbplatform (Showing top 20 results out of 315)

origin: org.avaje.ebean/ebean

/**
 * Return the type for a given jdbc type.
 */
public DbPlatformType get(int jdbcType) {
 return get(lookup.byId(jdbcType));
}
origin: org.avaje.ebean/ebean

/**
 * 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;
 }
}
origin: org.avaje/ebean

public DdlGenContext(DatabasePlatform dbPlatform, NamingConvention namingConvention){
  this.dbPlatform = dbPlatform;
  this.dbTypeMap = dbPlatform.getDbTypeMap();
  this.ddlSyntax = dbPlatform.getDbDdlSyntax();
  this.newLine = ddlSyntax.getNewLine();
  this.namingConvention = namingConvention;
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

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");
}
origin: org.avaje/ebean

public PostgresDbEncrypt() {
  this.varcharEncryptFunction = new PgVarcharFunction();
  this.dateEncryptFunction = new PgDateFunction();
}
   
origin: org.avaje/ebean

public MySqlDbEncrypt() {
  this.varcharEncryptFunction = new MyVarcharFunction();
  this.dateEncryptFunction = new MyDateFunction();
}    
 
origin: org.avaje/ebean

public H2DbEncrypt() {
  this.varcharEncryptFunction = new H2VarcharFunction();
  this.dateEncryptFunction = new H2DateFunction();
}
 
origin: org.avaje.ebean/ebean

/**
 * Replace back ticks (if they are used) with database platform specific
 * quoted identifiers.
 */
protected String quoteIdentifiers(String s) {
 return databasePlatform.convertQuotedIdentifiers(s);
}
origin: org.avaje.ebean/ebean

private void addAll() {
 // Extra mapping for Float and Varchar2
 add("FLOAT", DbType.REAL);
 add("VARCHAR2", DbType.VARCHAR);
 for (DbType type : DbType.values()) {
  add(type.name(), type);
 }
}
origin: org.avaje/ebean

/**
 * 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);
}    
 
origin: org.avaje.ebean/ebean

/**
 * 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);
}
origin: org.avaje.ebean/ebean

 /**
  * Create a copy of the type with a new default length.
  */
 public DbPlatformType withLength(int defaultLength) {
  return new DbPlatformType(name, defaultLength);
 }
}
origin: org.avaje.ebean/ebean

/**
 * Return the lower bound column.
 */
String getSysPeriodLower(String tableAlias) {
 return dbHistorySupport.getSysPeriodLower(tableAlias, sysPeriod);
}
origin: org.avaje.ebean/ebean

/**
 * Return the upper bound column.
 */
String getSysPeriodUpper(String tableAlias) {
 return dbHistorySupport.getSysPeriodUpper(tableAlias, sysPeriod);
}
origin: org.avaje.ebean/ebean

/**
 * Set the DB TRUE literal (from the registered boolean ScalarType)
 */
public void setDbTrueLiteral(String dbTrueLiteral) {
 this.dbDefaultValue.setTrue(dbTrueLiteral);
}
origin: org.avaje.ebean/ebean

/**
 * Set the DB now function.
 */
public void setNow(String dbFunction) {
 put(NOW, dbFunction);
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-server

public DdlGenContext(DatabasePlatform dbPlatform, NamingConvention namingConvention){
  this.dbPlatform = dbPlatform;
  this.dbTypeMap = dbPlatform.getDbTypeMap();
  this.ddlSyntax = dbPlatform.getDbDdlSyntax();
  this.newLine = ddlSyntax.getNewLine();
  this.namingConvention = namingConvention;
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

public PostgresDbEncrypt() {
 this.varcharEncryptFunction = new PgVarcharFunction();
 this.dateEncryptFunction = new PgDateFunction();
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

public MySqlDbEncrypt() {
 this.varcharEncryptFunction = new MyVarcharFunction();
 this.dateEncryptFunction = new MyDateFunction();
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

public H2DbEncrypt() {
 this.varcharEncryptFunction = new H2VarcharFunction();
 this.dateEncryptFunction = new H2DateFunction();
}
com.avaje.ebean.config.dbplatform

Most used classes

  • DatabasePlatform
    Database platform specific settings.
  • DbDdlSyntax
    Used to support DB specific syntax for DDL generation.
  • DbIdentity
    Defines the identity/sequence behaviour for the database.
  • DbType
    Represents a DB type with name, length, precision, and scale. The length is for VARCHAR types and pr
  • SqlLimitResponse
    The resulting SQL from a SqlLimit process.
  • DbEncryptFunction,
  • DbTypeMap,
  • IdType,
  • RownumSqlLimiter,
  • SQLitePlatform,
  • SequenceIdGenerator,
  • SimpleSequenceIdGenerator,
  • SqlLimitRequest,
  • SqlLimiter,
  • DB2SequenceIdGenerator,
  • H2DbEncrypt$H2DateFunction,
  • H2DbEncrypt$H2VarcharFunction,
  • H2DbEncrypt,
  • H2Platform
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now