org.apache.metamodel.schema.Table.getSchema()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(278)

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

Table.getSchema介绍

[英]Gets the schema that this table resides in.
[中]获取此表所在的架构。

代码示例

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo2

  1. protected BasicDBObject createMongoDbQuery(Table table, List<FilterItem> whereItems) {
  2. assert _schema == table.getSchema();
  3. final BasicDBObject query = new BasicDBObject();
  4. if (whereItems != null && !whereItems.isEmpty()) {
  5. for (FilterItem item : whereItems) {
  6. convertToCursorObject(query, item);
  7. }
  8. }
  9. return query;
  10. }

代码示例来源:origin: org.apache.metamodel/MetaModel-core

  1. protected boolean isMainSchemaTable(Table table) {
  2. Schema schema = table.getSchema();
  3. if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) {
  4. return false;
  5. } else {
  6. return true;
  7. }
  8. }

代码示例来源:origin: apache/metamodel

  1. protected BasicDBObject createMongoDbQuery(Table table, List<FilterItem> whereItems) {
  2. assert _schema == table.getSchema();
  3. final BasicDBObject query = new BasicDBObject();
  4. if (whereItems != null && !whereItems.isEmpty()) {
  5. for (FilterItem item : whereItems) {
  6. convertToCursorObject(query, item);
  7. }
  8. }
  9. return query;
  10. }

代码示例来源:origin: apache/metamodel

  1. protected boolean isMainSchemaTable(Table table) {
  2. Schema schema = table.getSchema();
  3. if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) {
  4. return false;
  5. } else {
  6. return true;
  7. }
  8. }

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo3

  1. protected Document createMongoDbQuery(Table table, List<FilterItem> whereItems,
  2. Consumer<FilterItem> whereItemToPostProcessConsumer) {
  3. assert _schema == table.getSchema();
  4. final Document query = new Document();
  5. if (whereItems != null && !whereItems.isEmpty()) {
  6. for (FilterItem item : whereItems) {
  7. final boolean converted = convertToCursorObject(query, item);
  8. if (!converted) {
  9. // it wasn't possible to push down the filter item
  10. whereItemToPostProcessConsumer.accept(item);
  11. }
  12. }
  13. }
  14. return query;
  15. }

代码示例来源:origin: apache/metamodel

  1. protected Document createMongoDbQuery(Table table, List<FilterItem> whereItems,
  2. Consumer<FilterItem> whereItemToPostProcessConsumer) {
  3. assert _schema == table.getSchema();
  4. final Document query = new Document();
  5. if (whereItems != null && !whereItems.isEmpty()) {
  6. for (FilterItem item : whereItems) {
  7. final boolean converted = convertToCursorObject(query, item);
  8. if (!converted) {
  9. // it wasn't possible to push down the filter item
  10. whereItemToPostProcessConsumer.accept(item);
  11. }
  12. }
  13. }
  14. return query;
  15. }

代码示例来源:origin: org.apache.metamodel/MetaModel-core

  1. public DropTable(Table table) {
  2. this(table.getSchema().getName(), table.getName());
  3. }

代码示例来源:origin: apache/metamodel

  1. public DropTable(Table table) {
  2. this(table.getSchema().getName(), table.getName());
  3. }

代码示例来源:origin: datacleaner/DataCleaner

  1. private static String getTablePostFix(final Table table) {
  2. final String postFix;
  3. final Schema schema = table.getSchema();
  4. if (schema == null) {
  5. postFix = "." + table.getName();
  6. } else {
  7. postFix = "." + schema.getName() + "." + table.getName();
  8. }
  9. return postFix;
  10. }

代码示例来源:origin: org.apache.metamodel/MetaModel-excel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final Table table = getTable();
  4. _updateCallback.removeSheet(table.getName());
  5. final MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. Table table = getTable();
  4. _updateCallback.removeCollection(table.getName());
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo3

  1. @Override
  2. public void execute() throws MetaModelException {
  3. Table table = getTable();
  4. _updateCallback.removeCollection(table.getName());
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo2

  1. @Override
  2. public void execute() throws MetaModelException {
  3. Table table = getTable();
  4. _updateCallback.removeCollection(table.getName());
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. Table table = getTable();
  4. _updateCallback.removeCollection(table.getName());
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final Table table = getTable();
  4. _updateCallback.removeSheet(table.getName());
  5. final MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: org.apache.metamodel/MetaModel-hbase

  1. @Override
  2. public void execute() {
  3. // Remove from the datastore
  4. final Table table = getTable();
  5. ((HBaseDataContext) _updateCallback.getDataContext()).getHBaseClient().dropTable(table.getName());
  6. // Remove from schema
  7. ((MutableSchema) table.getSchema()).removeTable(table);
  8. }
  9. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. CouchDbInstance instance = _updateCallback.getDataContext().getCouchDbInstance();
  4. Table table = getTable();
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. instance.deleteDatabase(table.getName());
  8. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() {
  3. // Remove from the datastore
  4. final Table table = getTable();
  5. ((HBaseDataContext) _updateCallback.getDataContext()).getHBaseClient().dropTable(table.getName());
  6. // Remove from schema
  7. ((MutableSchema) table.getSchema()).removeTable(table);
  8. }
  9. }

代码示例来源:origin: org.apache.metamodel/MetaModel-jdbc

  1. private void loadRelations(Table table, DatabaseMetaData metaData) {
  2. Schema schema = table.getSchema();
  3. try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table
  4. .getName())) {
  5. loadRelations(rs, schema);
  6. } catch (SQLException e) {
  7. throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA);
  8. }
  9. }

代码示例来源:origin: apache/metamodel

  1. private void loadRelations(Table table, DatabaseMetaData metaData) {
  2. Schema schema = table.getSchema();
  3. try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table
  4. .getName())) {
  5. loadRelations(rs, schema);
  6. } catch (SQLException e) {
  7. throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA);
  8. }
  9. }

相关文章