protected BasicDBObject createMongoDbQuery(Table table, List<FilterItem> whereItems) { assert _schema == table.getSchema(); final BasicDBObject query = new BasicDBObject(); if (whereItems != null && !whereItems.isEmpty()) { for (FilterItem item : whereItems) { convertToCursorObject(query, item); } } return query; }
protected boolean isMainSchemaTable(Table table) { Schema schema = table.getSchema(); if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) { return false; } else { return true; } }
protected BasicDBObject createMongoDbQuery(Table table, List<FilterItem> whereItems) { assert _schema == table.getSchema(); final BasicDBObject query = new BasicDBObject(); if (whereItems != null && !whereItems.isEmpty()) { for (FilterItem item : whereItems) { convertToCursorObject(query, item); } } return query; }
protected boolean isMainSchemaTable(Table table) { Schema schema = table.getSchema(); if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) { return false; } else { return true; } }
protected Document createMongoDbQuery(Table table, List<FilterItem> whereItems, Consumer<FilterItem> whereItemToPostProcessConsumer) { assert _schema == table.getSchema(); final Document query = new Document(); if (whereItems != null && !whereItems.isEmpty()) { for (FilterItem item : whereItems) { final boolean converted = convertToCursorObject(query, item); if (!converted) { // it wasn't possible to push down the filter item whereItemToPostProcessConsumer.accept(item); } } } return query; }
protected Document createMongoDbQuery(Table table, List<FilterItem> whereItems, Consumer<FilterItem> whereItemToPostProcessConsumer) { assert _schema == table.getSchema(); final Document query = new Document(); if (whereItems != null && !whereItems.isEmpty()) { for (FilterItem item : whereItems) { final boolean converted = convertToCursorObject(query, item); if (!converted) { // it wasn't possible to push down the filter item whereItemToPostProcessConsumer.accept(item); } } } return query; }
public DropTable(Table table) { this(table.getSchema().getName(), table.getName()); }
public DropTable(Table table) { this(table.getSchema().getName(), table.getName()); }
private static String getTablePostFix(final Table table) { final String postFix; final Schema schema = table.getSchema(); if (schema == null) { postFix = "." + table.getName(); } else { postFix = "." + schema.getName() + "." + table.getName(); } return postFix; }
@Override public void execute() throws MetaModelException { final Table table = getTable(); _updateCallback.removeSheet(table.getName()); final MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() throws MetaModelException { Table table = getTable(); _updateCallback.removeCollection(table.getName()); MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() throws MetaModelException { Table table = getTable(); _updateCallback.removeCollection(table.getName()); MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() throws MetaModelException { Table table = getTable(); _updateCallback.removeCollection(table.getName()); MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() throws MetaModelException { Table table = getTable(); _updateCallback.removeCollection(table.getName()); MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() throws MetaModelException { final Table table = getTable(); _updateCallback.removeSheet(table.getName()); final MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); }
@Override public void execute() { // Remove from the datastore final Table table = getTable(); ((HBaseDataContext) _updateCallback.getDataContext()).getHBaseClient().dropTable(table.getName()); // Remove from schema ((MutableSchema) table.getSchema()).removeTable(table); } }
@Override public void execute() throws MetaModelException { CouchDbInstance instance = _updateCallback.getDataContext().getCouchDbInstance(); Table table = getTable(); MutableSchema schema = (MutableSchema) table.getSchema(); schema.removeTable(table); instance.deleteDatabase(table.getName()); }
@Override public void execute() { // Remove from the datastore final Table table = getTable(); ((HBaseDataContext) _updateCallback.getDataContext()).getHBaseClient().dropTable(table.getName()); // Remove from schema ((MutableSchema) table.getSchema()).removeTable(table); } }
private void loadRelations(Table table, DatabaseMetaData metaData) { Schema schema = table.getSchema(); try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table .getName())) { loadRelations(rs, schema); } catch (SQLException e) { throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA); } }
private void loadRelations(Table table, DatabaseMetaData metaData) { Schema schema = table.getSchema(); try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table .getName())) { loadRelations(rs, schema); } catch (SQLException e) { throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA); } }