Package com.mysql.clusterj.jdbc.SQLExecutor

Examples of com.mysql.clusterj.jdbc.SQLExecutor.Executor


            com.mysql.jdbc.PreparedStatement preparedStatement =
                (com.mysql.jdbc.PreparedStatement)statement;
            // key must be interned because we are using IdentityHashMap
            String preparedSql = preparedStatement.getPreparedSql().intern();
            // see if we have a parsed version of this query
            Executor sQLExecutor = null;
            synchronized(parsedSqlMap) {
                sQLExecutor = parsedSqlMap.get(preparedSql);
            }
            // if no cached SQLExecutor, create it, which might take some time
            if (sQLExecutor == null) {
                sQLExecutor = createSQLExecutor(preparedSql);
                if (sQLExecutor != null) {
                    // multiple thread might have created a SQLExecutor but it's ok
                    synchronized(parsedSqlMap) {
                        parsedSqlMap.put(preparedSql, sQLExecutor);
                    }
                }
            }
            return sQLExecutor.execute(this, preparedStatement.getParameterBindings());
        }
        return null;
    }
View Full Code Here


    /**
     * @param preparedSql
     */
    private Executor createSQLExecutor(String preparedSql) {
        if (logger.isDetailEnabled()) logger.detail(preparedSql);
        Executor result = null;
        // parse the sql
        CommonTree root = parse(preparedSql);
        // get the root of the tree
        int tokenType = root.getType();
        // perform command-specific actions
View Full Code Here

TOP

Related Classes of com.mysql.clusterj.jdbc.SQLExecutor.Executor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.