Package com.alibaba.druid.proxy.jdbc

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


            event.putContext(TRACE_STMT_SQL, sql);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                fireEvent(event);
            }
            return statement;
        } catch (SQLException ex) {
View Full Code Here


            event.putContext("stmt.autoGeneratedKeys", autoGeneratedKeys);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql, autoGeneratedKeys);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext("stmt.autoGeneratedKeys", autoGeneratedKeys);
                fireEvent(event);
            }

            return statement;
View Full Code Here

            event.putContext("stmt.resultSetConcurrency", resultSetConcurrency);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql, resultSetType, resultSetConcurrency);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                event.putContext("stmt.resultSetType", resultSetType);
                event.putContext("stmt.resultSetConcurrency", resultSetConcurrency);
                fireEvent(event);
            }
View Full Code Here

            event.putContext("stmt.resultSetHoldability", resultSetHoldability);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql, resultSetType, resultSetConcurrency, resultSetHoldability);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                event.putContext("stmt.resultSetType", resultSetType);
                event.putContext("stmt.resultSetConcurrency", resultSetConcurrency);
                event.putContext("stmt.resultSetHoldability", resultSetHoldability);
                fireEvent(event);
View Full Code Here

            event.putContext(TRACE_STMT_COLUMN_INDEXES, columnIndexes);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql, columnIndexes);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                event.putContext(TRACE_STMT_COLUMN_INDEXES, columnIndexes);
                fireEvent(event);
            }
View Full Code Here

            event.putContext("stmt.columnNames", columnNames);
            fireEvent(event);
        }

        try {
            PreparedStatementProxy statement = chain.connection_prepareStatement(connection, sql, columnNames);

            long timespan = System.currentTimeMillis() - startMillis;
            {
                TraceAfterEvent event = new TraceAfterEvent("ConnectionPrepareStatementAfter", new Date(startMillis), timespan);
                event.putContext(TRACE_CONN_INFO, connection.getProperties().clone());
                event.putContext(TRACE_CONN_CONNECTED_TIME, connection.getConnectedTime());
                event.putContext(TRACE_CONN_ID, connection.getId());
                event.putContext(TRACE_STMT_ID, statement.getId());
                event.putContext(TRACE_STMT_SQL, sql);
                event.putContext("stmt.columnNames", columnNames);
                fireEvent(event);
            }
View Full Code Here

        return statement;
    }

    @Override
    public PreparedStatementProxy connection_prepareStatement(FilterChain chain, ConnectionProxy connection, String sql) throws SQLException {
        PreparedStatementProxy statement = super.connection_prepareStatement(chain, connection, sql);

        statementPrepareAfter(statement);

        return statement;
    }
View Full Code Here

    }

    @Override
    public PreparedStatementProxy connection_prepareStatement(FilterChain chain, ConnectionProxy connection, String sql, int autoGeneratedKeys)
                                                                                                                                               throws SQLException {
        PreparedStatementProxy statement = super.connection_prepareStatement(chain, connection, sql, autoGeneratedKeys);

        statementPrepareAfter(statement);

        return statement;
    }
View Full Code Here

    }

    @Override
    public PreparedStatementProxy connection_prepareStatement(FilterChain chain, ConnectionProxy connection, String sql, int resultSetType,
                                                              int resultSetConcurrency) throws SQLException {
        PreparedStatementProxy statement = super.connection_prepareStatement(chain, connection, sql, resultSetType, resultSetConcurrency);

        statementPrepareAfter(statement);

        return statement;
    }
View Full Code Here

    }

    @Override
    public PreparedStatementProxy connection_prepareStatement(FilterChain chain, ConnectionProxy connection, String sql, int resultSetType,
                                                              int resultSetConcurrency, int resultSetHoldability) throws SQLException {
        PreparedStatementProxy statement = super.connection_prepareStatement(chain, connection, sql, resultSetType, resultSetConcurrency, resultSetHoldability);

        statementPrepareAfter(statement);

        return statement;
    }
View Full Code Here

TOP

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

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.