com.sqlapp.data.db.dialect.Dialect类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中com.sqlapp.data.db.dialect.Dialect类的一些代码示例,展示了Dialect类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dialect类的具体详情如下:
包路径:com.sqlapp.data.db.dialect.Dialect
类名称:Dialect

Dialect介绍

[英]標準的なDBのDialiect
[中]標準的な分贝の拨号器

代码示例

代码示例来源:origin: com.sqlapp/sqlapp-core-sqlserver

@Override
public boolean equals(Object obj) {
  if (!super.equals(obj)) {
    return false;
  }
  return true;
}

代码示例来源:origin: com.sqlapp/sqlapp-core

public boolean setDbType(String productDataType, Long lengthOrPrecision,
    Integer scale, DataTypeLengthProperties<?> column) {
  return setDbType(null, productDataType, lengthOrPrecision,
      scale, column);
}

代码示例来源:origin: com.sqlapp/sqlapp-core

/**
 * サポートされた型のセットを返します
 * 
 */
public Set<Class<?>> supportedSchemaTypes() {
  return MetadataReaderUtils
      .supportedSchemaTypes(this.getCatalogReader());
}

代码示例来源:origin: com.sqlapp/sqlapp-core

@Override
public int compareTo(Dialect o) {
  if (this.equals(o)){
    return 0;
  }
  Set<Dialect> set=getNexts(this);
  if (set.contains(o)){
    return -1;
  } else{
    set=getNexts(o);
    if (set.contains(this)){
      return 1;
    } else{
      return 0; 
    }
  }
}

代码示例来源:origin: com.sqlapp/sqlapp-core

return true;
DbDataType<?> dbDataType = getDbDataTypes().match(productDataType, lengthOrPrecision, column);
if (set.contains(dbDataType)) {
  return false;
      boolean bool=setDbType(column.getDataType(), productDataType, column.getLength(), column.getScale(), column, set);
      if (bool) {
        return bool;
dbDataType=this.getDbDataType(column);
if (dbDataType!=null){
  set.add(dbDataType);
  if (matchDataTypeName(column.getDataType(), column.getDataTypeName())){
    boolean bool=SchemaUtils.setDataTypeNameInternal(null, column);
    if (!bool){

代码示例来源:origin: com.sqlapp/sqlapp-core

dialect.setDbType(text, obj.getLength(),
      obj.getScale(), obj);
}else if (this instanceof  DataTypeProperties) {
  DataTypeProperties<?> obj=(DataTypeProperties<?>)this;
  dialect.setDbType(text, obj);
    if (dialect.matchDataTypeName(dataTypeProperties.getDataType(), dataTypeProperties.getDataTypeName())){
      bool=SchemaUtils.setDataTypeNameInternal(null, this);
      if (!bool){

代码示例来源:origin: com.sqlapp/sqlapp-core-sybase

@Override
public boolean isOptimisticLockColumn(Column column) {
  if (column.getDataType().isBinary()
      && column.getName().equalsIgnoreCase("TIMESTAMP")) {
    return true;
  }
  return super.isOptimisticLockColumn(column);
}

代码示例来源:origin: com.sqlapp/sqlapp-core-postgres

/**
 * カラムの型の定義を追加します
 * 
 * @param column
 *            カラム
 */
@Override
protected PostgresSqlBuilder typeDefinition(
    Column column) {
  if (column.isIdentity() && getDialect().supportsIdentity()) {
    if (column.getDataType() == DataType.SMALLINT&&this.getDialect().compareTo(postgres92)>=0) {
      _add("smallserial");
    } else if (column.getDataType() == DataType.INT) {
      _add("serial");
    } else if (column.getDataType() == DataType.BIGINT) {
      _add("bigserial");
    } else if (column.getDataType()==null) {
      return super.typeDefinition(column);
    } else if (column.getDataType().isNumeric()) {
      _add("serial");
    } else {
      return super.typeDefinition(column);
    }
  } else {
    return super.typeDefinition(column);
  }
  return this;
}

代码示例来源:origin: com.sqlapp/sqlapp-core-firebird

@Override
protected FirebirdSqlBuilder autoIncrement(AbstractColumn<?> column) {
  FirebirdVersionResolver resolver = new FirebirdVersionResolver();
  Dialect dialect = resolver.getDialect(3, 0, 0);
  if (this.getDialect().compareTo(dialect) >= 0) {
    space().generated().by()._default().as().identity();
  }
  return instance();
}

代码示例来源:origin: com.sqlapp/sqlapp-core-sqlserver

@Override
public boolean isOptimisticLockColumn(Column column) {
  if (column.getDataType().isBinary()
      && column.getName().equalsIgnoreCase("TIMESTAMP")) {
    return true;
  }
  return super.isOptimisticLockColumn(column);
}

代码示例来源:origin: com.sqlapp/sqlapp-core-h2

@Override
public boolean equals(Object obj) {
  if (!super.equals(obj)) {
    return false;
  }
  return true;
}

代码示例来源:origin: com.sqlapp/sqlapp-core

public boolean setDbType(DataType dataType, String productDataType,
    Long lengthOrPrecision, Integer scale,
    DataTypeLengthProperties<?> column) {
  Set<DbDataType<?>> set = CommonUtils.set();
  return setDbType(dataType, productDataType,
      lengthOrPrecision, scale,
      column, set);
}

代码示例来源:origin: com.sqlapp/sqlapp-command

protected String getCurrentCatalogName(Connection connection) {
  return getDialect().getCatalogReader()
      .getCurrentCatalogName(connection);
}

代码示例来源:origin: com.sqlapp/sqlapp-core

/**
 * 楽観的ロックの対象カラムか?
 */
protected boolean isOptimisticLockColumn(Column column){
  TableOptions option=this.getOptions().getTableOptions();
  if (CommonUtils.isEmpty(option.getOptimisticLockColumn())){
    return this.getDialect().isOptimisticLockColumn(column);
  }
  return option.getOptimisticLockColumn().test(column);
}

代码示例来源:origin: com.sqlapp/sqlapp-core-mdb

@Override
  public boolean equals(Object obj){
    if (!super.equals(obj)){
      return false;
    }
    return true;
  }
}

代码示例来源:origin: com.sqlapp/sqlapp-core

public boolean setDbType(int sqlType, String productDataType,
    Long lengthOrPrecision, Integer scale,
    DataTypeLengthProperties<?> column) {
  return setDbType(DataType.valueOf(sqlType), productDataType,
      lengthOrPrecision, scale,
      column);
}

代码示例来源:origin: com.sqlapp/sqlapp-command

protected String getCurrentSchemaName(Connection connection) {
  return getDialect().getCatalogReader().getSchemaReader()
      .getCurrentSchemaName(connection);
}

代码示例来源:origin: com.sqlapp/sqlapp-core-db2

@Override
public boolean equals(Object obj) {
  if (!super.equals(obj)) {
    return false;
  }
  return true;
}

代码示例来源:origin: com.sqlapp/sqlapp-core-mysql

/**
 * Functionの引数を取得します
 * 
 * @param arg
 * @param dialect
 * @throws SQLException
 */
protected static NamedArgument getFunctionNamedArgument(String arg,
    Dialect dialect) {
  Matcher matcher = FUNCTION_ARGUMENT_PATTERN.matcher(arg);
  matcher.matches();
  String name = matcher.group(1);
  String productDataType = matcher.group(2);
  NamedArgument obj = new NamedArgument(name);
  dialect.setDbType(productDataType,null, null, obj);
  return obj;
}

代码示例来源:origin: com.sqlapp/sqlapp-command

protected Table getTable(Connection connection, Dialect dialect, Table table) throws SQLException{
  TableReader tableReader=dialect.getCatalogReader().getSchemaReader().getTableReader();
  tableReader.setSchemaName(table.getSchemaName());
  tableReader.setObjectName(table.getName());
  List<Table> tables=tableReader.getAllFull(connection);
  return tables.isEmpty()?null:tables.get(0);
}

相关文章