Package com.alibaba.druid.proxy.jdbc

Examples of com.alibaba.druid.proxy.jdbc.StatementProxy


    }

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection) throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection);

        statementCreateAfter(statement);

        return statement;
    }
View Full Code Here


    }

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection, int resultSetType,
                                                     int resultSetConcurrency) throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection, resultSetType,
                                                                    resultSetConcurrency);

        statementCreateAfter(statement);

        return statement;
View Full Code Here

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection, int resultSetType,
                                                     int resultSetConcurrency, int resultSetHoldability)
                                                                                                        throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection, resultSetType,
                                                                    resultSetConcurrency, resultSetHoldability);

        statementCreateAfter(statement);

        return statement;
View Full Code Here

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection, int resultSetType,
                                                     int resultSetConcurrency, int resultSetHoldability)
                                                                                                        throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection, resultSetType,
                                                                    resultSetConcurrency, resultSetHoldability);

        statementCreateAfter(statement);

        return statement;
View Full Code Here

    }

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection) throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection);

        statementCreateAfter(statement);

        return statement;
    }
View Full Code Here

    }

    @Override
    public StatementProxy connection_createStatement(FilterChain chain, ConnectionProxy connection, int resultSetType,
                                                     int resultSetConcurrency) throws SQLException {
        StatementProxy statement = super.connection_createStatement(chain, connection, resultSetType,
                                                                    resultSetConcurrency);

        statementCreateAfter(statement);

        return statement;
View Full Code Here

        };

        ConnectionProxy conn = (ConnectionProxy) dataSource.connect(new Properties());

        {
            StatementProxy stmt = (StatementProxy) conn.createStatement();
            MockResultSet rs = new MockResultSet(null) {

                @Override
                public ResultSetMetaData getMetaData() throws SQLException {
                    return rsMeta;
                }

                @Override
                public boolean next() throws SQLException {
                    return true;
                }

                @Override
                public Object getObject(int columnIndex) throws SQLException {
                    if (columnIndex == 5) {
                        throw new SQLException();
                    }
                    return null;
                }
            };

            FilterChainImpl chain = new FilterChainImpl(dataSource);
            chain.resultSet_next(new ResultSetProxyImpl(stmt, rs, 1001, null));
        }
        {
            final MockResultSet rs = new MockResultSet(null) {

                @Override
                public ResultSetMetaData getMetaData() throws SQLException {
                    throw new SQLException();
                }
            };

            StatementProxy stmt = new StatementProxyImpl(conn, new MockStatement(conn) {

                public ResultSet getResultSet() throws SQLException {
                    return rs;
                }
            }, 0);

            FilterChainImpl chain = new FilterChainImpl(dataSource);
            chain.statement_getResultSet(stmt);
        }
        {
            StatementProxy stmt = (StatementProxy) conn.createStatement();
            MockResultSet rs = new MockResultSet(null) {

                @Override
                public ResultSetMetaData getMetaData() throws SQLException {
                    return rsMeta;
View Full Code Here

TOP

Related Classes of com.alibaba.druid.proxy.jdbc.StatementProxy

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.