Search in sources :

Example 1 with MultiRowSQLQueryResultHandler

use of com.actiontech.dble.sqlengine.MultiRowSQLQueryResultHandler in project dble by actiontech.

the class ShowTablesHandler method execute.

public void execute() {
    PhysicalDBNode dn = DbleServer.getInstance().getConfig().getDataNodes().get(config.getDataNode());
    String mysqlShowTableCol = "Tables_in_" + dn.getDatabase();
    String[] mysqlShowTableCols = new String[] { mysqlShowTableCol };
    MultiRowSQLQueryResultHandler resultHandler = new MultiRowSQLQueryResultHandler(mysqlShowTableCols, new MySQLShowTablesListener(mysqlShowTableCol));
    SQLJob sqlJob = new SQLJob(SQL, dn.getDatabase(), resultHandler, dn.getDbPool().getSource());
    sqlJob.run();
}
Also used : PhysicalDBNode(com.actiontech.dble.backend.datasource.PhysicalDBNode) MultiRowSQLQueryResultHandler(com.actiontech.dble.sqlengine.MultiRowSQLQueryResultHandler) SQLJob(com.actiontech.dble.sqlengine.SQLJob)

Aggregations

PhysicalDBNode (com.actiontech.dble.backend.datasource.PhysicalDBNode)1 MultiRowSQLQueryResultHandler (com.actiontech.dble.sqlengine.MultiRowSQLQueryResultHandler)1 SQLJob (com.actiontech.dble.sqlengine.SQLJob)1