Search in sources :

Example 1 with GlobalVisitor

use of com.actiontech.dble.backend.mysql.nio.handler.builder.sqlvisitor.GlobalVisitor in project dble by actiontech.

the class BaseHandlerBuilder method noShardBuild.

/**
 * no shard-ing node,just send to the first node
 */
protected final void noShardBuild() {
    this.needCommon = false;
    GlobalVisitor visitor = new GlobalVisitor(node, true);
    visitor.visit();
    String sql = visitor.getSql().toString();
    RouteResultsetNode[] rrss = getTableSources(node.getNoshardNode(), sql);
    hBuilder.checkRRSs(rrss);
    MultiNodeMergeHandler mh = new MultiNodeMergeHandler(getSequenceId(), rrss, session.getSource().isAutocommit() && !session.getSource().isTxStart(), session, null);
    addHandler(mh);
}
Also used : RouteResultsetNode(com.actiontech.dble.route.RouteResultsetNode) GlobalVisitor(com.actiontech.dble.backend.mysql.nio.handler.builder.sqlvisitor.GlobalVisitor)

Aggregations

GlobalVisitor (com.actiontech.dble.backend.mysql.nio.handler.builder.sqlvisitor.GlobalVisitor)1 RouteResultsetNode (com.actiontech.dble.route.RouteResultsetNode)1