com.sqlapp.data.db.dialect.Dialect.getCatalogReader()方法的使用及代码示例

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

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

Dialect.getCatalogReader介绍

[英]カタログメタデータ読み込みクラスの取得
[中]カタログメタデータ読み込みクラスの取得

代码示例

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

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

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

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

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

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

代码示例来源: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);
}

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

Dialect dialect, String schemaName, String tableName,
  String[] colIds) {
ColumnReader reader = dialect.getCatalogReader().getSchemaReader()
    .getTableReader().getColumnReader();
reader.setSchemaName(schemaName);

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

/**
 * 指定した名称のMetaDataReaderを取得します
 * 
 * @param dialect
 * @param name
 */
public static <T extends MetadataReader<?, ?>> T getMetadataReader(
    Dialect dialect, String name) {
  CatalogReader catalogReader = dialect.getCatalogReader();
  T reader = catalogReader.getMetadataReader(name);
  if (reader != null) {
    return reader;
  }
  SchemaReader schemaReader = catalogReader.getSchemaReader();
  reader = schemaReader.getMetadataReader(name);
  if (reader != null) {
    return reader;
  }
  TableReader tableReader = schemaReader.getTableReader();
  reader = tableReader.getMetadataReader(name);
  if (reader != null) {
    return reader;
  }
  return null;
}

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

protected SchemaReader getSchemaReader(Connection connection, Dialect dialect) throws SQLException{
  CatalogReader catalogReader=dialect.getCatalogReader();
  SchemaReader schemaReader=catalogReader.getSchemaReader();
  if (this.isOnlyCurrentCatalog()) {
    String catalogName = getCurrentCatalogName(connection);
    schemaReader.setCatalogName(catalogName);
  }
  if (this.isOnlyCurrentSchema()) {
    String schemaName = getCurrentSchemaName(connection);
    schemaReader.setSchemaName(schemaName);
  }
  schemaReader.setReadDbObjectPredicate(getMetadataReaderFilter());
  return schemaReader;
}

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

protected SchemaReader getSchemaReader(Dialect dialect) throws SQLException{
  CatalogReader catalogReader=dialect.getCatalogReader();
  try(Connection connection=this.getConnection()){
    SchemaReader schemaReader=catalogReader.getSchemaReader();
    if (this.isOnlyCurrentCatalog()) {
      String catalogName = getCurrentCatalogName(connection);
      schemaReader.setCatalogName(catalogName);
    }
    if (this.isOnlyCurrentSchema()) {
      String schemaName = getCurrentSchemaName(connection);
      schemaReader.setSchemaName(schemaName);
    }
    schemaReader.setReadDbObjectPredicate(getMetadataReaderFilter());
    return schemaReader;
  }
}

相关文章