Examples of StatementKey


Examples of org.apache.derby.client.am.stmtcache.StatementKey

    synchronized CallableStatement prepareCall(String sql,
                                                      int resultSetType,
                                                      int resultSetConcurrency,
                                                      int resultSetHoldability)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newCallable(
                sql, physicalConnection.getCurrentSchemaName(), resultSetType,
                resultSetConcurrency, resultSetHoldability);
        CallableStatement cs =
            (CallableStatement)cache.getCached(stmtKey);
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

    /**
     * @see java.sql.Connection#prepareStatement(String)
     */
    public synchronized PreparedStatement prepareStatement(String sql)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newPrepared(
                sql, physicalConnection.getCurrentSchemaName(),
                physicalConnection.holdability());
        PreparedStatement ps = cache.getCached(stmtKey);
        if (ps == null) {
            ps = physicalConnection.prepareStatement(sql);
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

    public synchronized PreparedStatement prepareStatement(
                                                String sql,
                                                int resultSetType,
                                                int resultSetConcurrency)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newPrepared(
                sql, physicalConnection.getCurrentSchemaName(), resultSetType,
                resultSetConcurrency, physicalConnection.holdability());
        PreparedStatement ps = cache.getCached(stmtKey);
        if (ps == null) {
            ps = physicalConnection.prepareStatement(
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

                                                String sql,
                                                int resultSetType,
                                                int resultSetConcurrency,
                                                int resultSetHoldability)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newPrepared(
                sql, physicalConnection.getCurrentSchemaName(), resultSetType,
                resultSetConcurrency, resultSetHoldability);

        PreparedStatement ps = cache.getCached(stmtKey);
        if (ps == null) {
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

     */
    public synchronized PreparedStatement prepareStatement(
                                                String sql,
                                                int autoGeneratedKeys)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newPrepared(
                sql, physicalConnection.getCurrentSchemaName(),
                physicalConnection.getHoldability(), autoGeneratedKeys);
        PreparedStatement ps = cache.getCached(stmtKey);
        if (ps == null) {
            ps = physicalConnection.prepareStatement(sql, autoGeneratedKeys);
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

    /**
     * @see java.sql.Connection#prepareCall(String)
     */
    public synchronized CallableStatement prepareCall(String sql)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newCallable(
                sql, physicalConnection.getCurrentSchemaName(),
                physicalConnection.holdability());
        CallableStatement cs = (CallableStatement)cache.getCached(stmtKey);
        if (cs == null) {
            cs = physicalConnection.prepareCall(sql);
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

     */
    public synchronized CallableStatement prepareCall(String sql,
                                                      int resultSetType,
                                                      int resultSetConcurrency)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newCallable(
                sql, physicalConnection.getCurrentSchemaName(), resultSetType,
                resultSetConcurrency, physicalConnection.holdability());
        CallableStatement cs = (CallableStatement)cache.getCached(stmtKey);
        if (cs == null) {
            cs = physicalConnection.prepareCall(sql, resultSetType, resultSetConcurrency);
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

    public synchronized CallableStatement prepareCall(String sql,
                                                      int resultSetType,
                                                      int resultSetConcurrency,
                                                      int resultSetHoldability)
            throws SQLException {
        StatementKey stmtKey = StatementKeyFactory.newCallable(
                sql, physicalConnection.getCurrentSchemaName(), resultSetType,
                resultSetConcurrency, resultSetHoldability);
        CallableStatement cs = (CallableStatement)cache.getCached(stmtKey);
        if (cs == null) {
            cs = physicalConnection.prepareCall(sql, resultSetType, resultSetConcurrency,
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

            // As expected
        }
    }

    public void testCreationBasic() {
        StatementKey stdKey = StatementKeyFactory.newPrepared("values 1", "APP",
                                            ResultSet.HOLD_CURSORS_OVER_COMMIT);
        StatementKey key = StatementKeyFactory.newPrepared(
                "select * from sys.systables", "APP",
                                            ResultSet.HOLD_CURSORS_OVER_COMMIT);
        assertFalse(key.equals(stdKey));
        assertFalse(stdKey.equals(key));
    }
View Full Code Here

Examples of org.apache.derby.client.am.stmtcache.StatementKey

        assertFalse(key.equals(stdKey));
        assertFalse(stdKey.equals(key));
    }

    public void testEqualityBasic() {
        StatementKey key1 = StatementKeyFactory.newPrepared(
                "select * from sys.systables", "APP",
                                            ResultSet.HOLD_CURSORS_OVER_COMMIT);
        StatementKey key2 = StatementKeyFactory.newPrepared(
                "select * from sys.systables", "APP",
                                            ResultSet.HOLD_CURSORS_OVER_COMMIT);
        StatementKey key3 = StatementKeyFactory.newPrepared(
                "select * from sys.systables", "APP",
                                            ResultSet.HOLD_CURSORS_OVER_COMMIT);
        assertTrue(key1.equals(key2));
        assertTrue(key2.equals(key1));
        assertTrue(key2.equals(key3));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.