shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/ShardingRouteEngineFactory.java
/**
     * Create new instance of routing engine.
     *
     * @param shardingRule sharding rule
     * @param metaData ShardingSphere metaData
     * @param sqlStatementContext SQL statement context
     * @param shardingConditions shardingConditions
     * @param props ShardingSphere properties
     * @return new instance of routing engine
     */
Create new instance of routing engine.
Create new instance of routing engine .
public static ShardingRouteEngine newInstance(final ShardingRule shardingRule, final ShardingSphereMetaData metaData, final SQLStatementContext<?> sqlStatementContext, 
                                                  final ShardingConditions shardingConditions, final ConfigurationProperties props) {
        SQLStatement sqlStatement = sqlStatementContext.getSqlStatement();
        if (sqlStatement instanceof TCLStatement) {
            return new ShardingDatabaseBroadcastRoutingEngine();
        }
        if (sqlStatement instanceof DDLStatement) {
            return getDDLRoutingEngine(shardingRule, metaData, sqlStatementContext);
        }
        if (sqlStatement instanceof DALStatement) {
            return getDALRoutingEngine(shardingRule, metaData, sqlStatementContext);
        }
        if (sqlStatement instanceof DCLStatement) {
            return getDCLRoutingEngine(shardingRule, metaData, sqlStatementContext);
        }
        return getDQLRoutingEngine(shardingRule, sqlStatementContext, shardingConditions, props);
    }
public static ShardingRouteEngine newInstance ( final ShardingRule shardingRule , final ShardingSphereMetaData metaData , final SQLStatementContext < ? > sqlStatementContext , final ShardingConditions shardingConditions , final ConfigurationProperties props ) { SQLStatement sqlStatement = sqlStatementContext . getSqlStatement ( ) ; if ( sqlStatement instanceof TCLStatement ) { return new ShardingDatabaseBroadcastRoutingEngine ( ) ; } if ( sqlStatement instanceof DDLStatement ) { return getDDLRoutingEngine ( shardingRule , metaData , sqlStatementContext ) ; } if ( sqlStatement instanceof DALStatement ) { return getDALRoutingEngine ( shardingRule , metaData , sqlStatementContext ) ; } if ( sqlStatement instanceof DCLStatement ) { return getDCLRoutingEngine ( shardingRule , metaData , sqlStatementContext ) ; } return getDQLRoutingEngine ( shardingRule , sqlStatementContext , shardingConditions , props ) ; }
Create new instance of routing engine.
Create new instance of routing engine .