Tabnine Logo
Dialect.getFalseSqlValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getFalseSqlValue
method
in
org.sonar.db.dialect.Dialect

Best Java code snippets using org.sonar.db.dialect.Dialect.getFalseSqlValue (Showing top 8 results out of 315)

origin: SonarSource/sonarqube

public CleanupDisabledUsers(Database db, System2 system2) {
 super(db);
 this.falseValue = db.getDialect().getFalseSqlValue();
 this.system2 = system2;
}
origin: SonarSource/sonarqube

private void appendDefaultValue(StringBuilder sql, ColumnDef columnDef) {
 Object defaultValue = columnDef.getDefaultValue();
 if (defaultValue != null) {
  sql.append(" DEFAULT ");
  if (defaultValue instanceof String) {
   sql.append(format("'%s'", defaultValue));
  } else if (defaultValue instanceof Boolean) {
   sql.append((boolean) defaultValue ? dialect.getTrueSqlValue() : dialect.getFalseSqlValue());
  } else {
   sql.append(defaultValue);
  }
 }
}
origin: SonarSource/sonarqube

private void addColumn(StringBuilder sql, ColumnDef columnDef) {
 sql.append(columnDef.getName()).append(" ").append(columnDef.generateSqlType(dialect));
 Object defaultValue = columnDef.getDefaultValue();
 if (defaultValue != null) {
  sql.append(" DEFAULT ");
  // TODO remove duplication with CreateTableBuilder
  if (defaultValue instanceof String) {
   sql.append(format("'%s'", defaultValue));
  } else if (defaultValue instanceof Boolean) {
   sql.append((boolean) defaultValue ? dialect.getTrueSqlValue() : dialect.getFalseSqlValue());
  } else {
   sql.append(defaultValue);
  }
 }
 sql.append(columnDef.isNullable() ? " NULL" : " NOT NULL");
}
origin: SonarSource/sonarqube

MyBatisConfBuilder(Database database) {
 this.conf = new Configuration();
 this.conf.setEnvironment(new Environment("production", createTransactionFactory(), database.getDataSource()));
 this.conf.setUseGeneratedKeys(true);
 this.conf.setLazyLoadingEnabled(false);
 this.conf.setJdbcTypeForNull(JdbcType.NULL);
 Dialect dialect = database.getDialect();
 this.conf.setDatabaseId(dialect.getId());
 this.conf.getVariables().setProperty("_true", dialect.getTrueSqlValue());
 this.conf.getVariables().setProperty("_false", dialect.getFalseSqlValue());
 this.conf.getVariables().setProperty("_from_dual", dialect.getSqlFromDual());
 this.conf.getVariables().setProperty("_scrollFetchSize", String.valueOf(dialect.getScrollDefaultFetchSize()));
 this.conf.setLocalCacheScope(LocalCacheScope.STATEMENT);
}
origin: org.sonarsource.sonarqube/sonar-db-migration

public CleanupDisabledUsers(Database db, System2 system2) {
 super(db);
 this.falseValue = db.getDialect().getFalseSqlValue();
 this.system2 = system2;
}
origin: org.sonarsource.sonarqube/sonar-db-migration

private void appendDefaultValue(StringBuilder sql, ColumnDef columnDef) {
 Object defaultValue = columnDef.getDefaultValue();
 if (defaultValue != null) {
  sql.append(" DEFAULT ");
  if (defaultValue instanceof String) {
   sql.append(format("'%s'", defaultValue));
  } else if (defaultValue instanceof Boolean) {
   sql.append((boolean) defaultValue ? dialect.getTrueSqlValue() : dialect.getFalseSqlValue());
  } else {
   sql.append(defaultValue);
  }
 }
}
origin: org.sonarsource.sonarqube/sonar-db-migration

private void addColumn(StringBuilder sql, ColumnDef columnDef) {
 sql.append(columnDef.getName()).append(" ").append(columnDef.generateSqlType(dialect));
 Object defaultValue = columnDef.getDefaultValue();
 if (defaultValue != null) {
  sql.append(" DEFAULT ");
  // TODO remove duplication with CreateTableBuilder
  if (defaultValue instanceof String) {
   sql.append(format("'%s'", defaultValue));
  } else if (defaultValue instanceof Boolean) {
   sql.append((boolean) defaultValue ? dialect.getTrueSqlValue() : dialect.getFalseSqlValue());
  } else {
   sql.append(defaultValue);
  }
 }
 sql.append(columnDef.isNullable() ? " NULL" : " NOT NULL");
}
origin: org.sonarsource.sonarqube/sonar-db

public MyBatisConfBuilder(Database database) {
 this.conf = new Configuration();
 this.conf.setEnvironment(new Environment("production", createTransactionFactory(), database.getDataSource()));
 this.conf.setUseGeneratedKeys(true);
 this.conf.setLazyLoadingEnabled(false);
 this.conf.setJdbcTypeForNull(JdbcType.NULL);
 Dialect dialect = database.getDialect();
 this.conf.setDatabaseId(dialect.getId());
 this.conf.getVariables().setProperty("_true", dialect.getTrueSqlValue());
 this.conf.getVariables().setProperty("_false", dialect.getFalseSqlValue());
 this.conf.getVariables().setProperty("_scrollFetchSize", String.valueOf(dialect.getScrollDefaultFetchSize()));
 this.conf.setLocalCacheScope(LocalCacheScope.STATEMENT);
}
org.sonar.db.dialectDialectgetFalseSqlValue

Popular methods of Dialect

  • getId
  • getScrollDefaultFetchSize
    Fetch size to be used when scrolling large result sets.
  • getTrueSqlValue
  • getConnectionInitStatements
  • getDefaultDriverClassName
  • getValidationQuery
    Query used to validate the jdbc connection.
  • supportsMigration
    Indicates whether DB migration can be perform on the DB vendor implementation associated with the cu
  • getScrollSingleRowFetchSize
    Fetch size to scroll one row at a time. It sounds strange because obviously value is 1 in most cases
  • init
    This method is called when connecting for the first time to the database.
  • matchesJdbcUrl
    Used to autodetect dialect from connection URL
  • supportsUpsert
  • getSqlFromDual
  • supportsUpsert,
  • getSqlFromDual,
  • matchesJdbcURL

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
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