Tabnine Logo
DatabasePlatform.getDbDdlSyntax
Code IndexAdd Tabnine to your IDE (free)

How to use
getDbDdlSyntax
method
in
com.avaje.ebean.config.dbplatform.DatabasePlatform

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

origin: org.avaje.ebeanorm/avaje-ebeanorm-api

public void setDatabasePlatform(DatabasePlatform databasePlatform) {
 this.databasePlatform = databasePlatform;
 this.maxConstraintNameLength = databasePlatform.getDbDdlSyntax().getMaxConstraintNameLength();
 logger.finer("Using maxConstraintNameLength of " + maxConstraintNameLength);
}
origin: org.avaje/ebean

public void setDatabasePlatform(DatabasePlatform databasePlatform) {
  this.databasePlatform = databasePlatform;
  this.maxConstraintNameLength = databasePlatform.getDbDdlSyntax().getMaxConstraintNameLength();
  logger.finer("Using maxConstraintNameLength of " + maxConstraintNameLength);
}
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-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/ebean

public TableName getM2MJoinTableName(TableName lhsTable, TableName rhsTable) {
  StringBuilder buffer = new StringBuilder();
  buffer.append(lhsTable.getName());
  buffer.append("_");
  String rhsTableName = rhsTable.getName();
  if (rhsTableName.indexOf('_') < rhsPrefixLength) {
    // trim off a xx_ prefix if there is one
    rhsTableName = rhsTableName.substring(rhsTableName.indexOf('_') + 1);
  }
  buffer.append(rhsTableName);
  int maxConstraintNameLength = databasePlatform.getDbDdlSyntax().getMaxConstraintNameLength();
  // maxConstraintNameLength is used as the max table name length.
  if (buffer.length() > maxConstraintNameLength) {
    buffer.setLength(maxConstraintNameLength);
  }
  return new TableName(lhsTable.getCatalog(), lhsTable.getSchema(), buffer.toString());
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

public TableName getM2MJoinTableName(TableName lhsTable, TableName rhsTable) {
 StringBuilder buffer = new StringBuilder();
 buffer.append(lhsTable.getName());
 buffer.append("_");
 String rhsTableName = rhsTable.getName();
 if (rhsTableName.indexOf('_') < rhsPrefixLength) {
  // trim off a xx_ prefix if there is one
  rhsTableName = rhsTableName.substring(rhsTableName.indexOf('_') + 1);
 }
 buffer.append(rhsTableName);
 int maxConstraintNameLength = databasePlatform.getDbDdlSyntax().getMaxConstraintNameLength();
 // maxConstraintNameLength is used as the max table name length.
 if (buffer.length() > maxConstraintNameLength) {
  buffer.setLength(maxConstraintNameLength);
 }
 return new TableName(lhsTable.getCatalog(), lhsTable.getSchema(), buffer.toString());
}
origin: MinecraftWars/Gringotts

public void configureDbConfig(ServerConfig config) {
  Validate.notNull(config, "Config cannot be null");
  DataSourceConfig ds = new DataSourceConfig();
  ds.setDriver("org.sqlite.JDBC");
  ds.setUrl("jdbc:sqlite:{DIR}{NAME}.db");
  ds.setUsername("bukkit");
  ds.setPassword("walrus");
  ds.setIsolationLevel(TransactionIsolation.getLevel("SERIALIZABLE"));
  if (ds.getDriver().contains("sqlite")) {
    config.setDatabasePlatform(new SQLitePlatform());
    config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
  }
  config.setDataSourceConfig(ds);
}
com.avaje.ebean.config.dbplatformDatabasePlatformgetDbDdlSyntax

Javadoc

Return the DDL syntax for this platform.

Popular methods of DatabasePlatform

  • completeSql
  • convertQuotedIdentifiers
    Convert backticks to the platform specific open quote and close quote Specific plugins may implement
  • getCloseQuote
    Return the close quote for quoted identifiers.
  • getOpenQuote
    Return the open quote for quoted identifiers.
  • <init>
    Instantiates a new database platform.
  • createSequenceIdGenerator
    Return a DB Sequence based IdGenerator.
  • getBlobDbType
    Return the data type that should be used for Blob. This is typically Types.BLOB but for Postgres is
  • getBooleanDbType
    Return the JDBC type used to store booleans.
  • getClobDbType
    Return the data type that should be used for Clob. This is typically Types.CLOB but for Postgres is
  • getDbEncrypt
    Return the DbEncrypt handler for this DB platform.
  • getDbIdentity
    Return the DB identity/sequence features for this platform.
  • getDbTypeMap
    Return the mapping of JDBC to DB types.
  • getDbIdentity,
  • getDbTypeMap,
  • getName,
  • getSqlLimiter,
  • isIdInExpandedForm,
  • isSelectCountWithAlias,
  • isTreatEmptyStringsAsNull,
  • setDbEncrypt,
  • withForUpdate

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JTable (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
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