use of com.cubrid.common.ui.query.control.MultiDBQueryComposite in project cubrid-manager by CUBRID.
the class QueryEditorPart method runMultiQuery.
public void runMultiQuery() {
String queries = combinedQueryComposite.getSqlEditorComp().getSelectedQueries();
MultiDBQueryComposite multiDbQueryComposite = combinedQueryComposite.getMultiDBQueryComp();
List<CubridDatabase> queryDatabaseList = multiDbQueryComposite.getQueryDatabaseList();
combinedQueryComposite.getResultTabFolder().setSelection(3);
int selectedDatabases = queryDatabaseList.size();
Vector<String> queryVector = QueryUtil.queriesToQuery(queries);
int countOfQueries = queryVector.size();
// [TOOLS-2425]Support shard broker
if (selectedDatabases < 2) {
if (countOfQueries < 2) {
if (selectedDatabases == 1 && queryDatabaseList.get(0).getDatabaseInfo().isShard()) {
runMultiShardQuery(queries);
} else {
showToolTip(multiDbQueryComposite, multiDbQueryComposite.getRunItem(), Messages.ttMultiQueryTitle, Messages.qedit_multiDBQueryComp_run_err);
}
} else {
// one database multiple SQL query
runMultiSQLQuery(queries);
}
} else {
runMultiDBQuery(queries, queryDatabaseList);
}
}
Aggregations