shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/ProxySQLExecutor.java
/**
     * Execute SQL.
     *
     * @param executionContext execution context
     * @return execute results
     * @throws SQLException SQL exception
     */
Execute SQL.
@param executionContext execution context
@return execute results
@throws SQLException SQL exception
Execute SQL . @param executionContext execution context @return execute results @throws SQLException SQL exception
public Collection<ExecuteResult> execute(final ExecutionContext executionContext) throws SQLException {
        Collection<ShardingSphereRule> rules = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getMetaData(backendConnection.getSchemaName()).getRuleMetaData().getRules();
        int maxConnectionsSizePerQuery = ProxyContext.getInstance().getContextManager().getMetaDataContexts().getProps().<Integer>getValue(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY);
        boolean isReturnGeneratedKeys = executionContext.getSqlStatementContext().getSqlStatement() instanceof MySQLInsertStatement;
        return execute(executionContext, rules, maxConnectionsSizePerQuery, isReturnGeneratedKeys);
    }
public Collection < ExecuteResult > execute ( final ExecutionContext executionContext ) throws SQLException { Collection < ShardingSphereRule > rules = ProxyContext . getInstance ( ) . getContextManager ( ) . getMetaDataContexts ( ) . getMetaData ( backendConnection . getSchemaName ( ) ) . getRuleMetaData ( ) . getRules ( ) ; int maxConnectionsSizePerQuery = ProxyContext . getInstance ( ) . getContextManager ( ) . getMetaDataContexts ( ) . getProps ( ) . < Integer > getValue ( ConfigurationPropertyKey . MAX_CONNECTIONS_SIZE_PER_QUERY ) ; boolean isReturnGeneratedKeys = executionContext . getSqlStatementContext ( ) . getSqlStatement ( ) instanceof MySQLInsertStatement ; return execute ( executionContext , rules , maxConnectionsSizePerQuery , isReturnGeneratedKeys ) ; }
Execute SQL.
Execute SQL .