本文整理了Java中org.sonar.db.dialect.Dialect.getFalseSqlValue()
方法的一些代码示例,展示了Dialect.getFalseSqlValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialect.getFalseSqlValue()
方法的具体详情如下:
包路径:org.sonar.db.dialect.Dialect
类名称:Dialect
方法名:getFalseSqlValue
暂无
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!