public void close() throws SQLException { _closed = true; super.close(); }
public void setAutoCommit(boolean autocommit) throws SQLException { // the sybase jdbc driver demands that the Connection always // be rolled back before autocommit status changes. Failure to // do so will yield "SET CHAINED command not allowed within // multi-statement transaction." exceptions try { super.setAutoCommit(autocommit); } catch (SQLException e) { // failed for some reason: try rolling back and then // setting autocommit again. if (autocommit) super.commit(); else super.rollback(); super.setAutoCommit(autocommit); } } }
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return createStatement(resultSetType, resultSetConcurrency, resultSetHoldability, true); }
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { assertJDBC3(); return createStatement(resultSetType, resultSetConcurrency, resultSetHoldability, true); }
public String toString() { StringBuffer buf = new StringBuffer("conn ").append(hashCode()); appendInfo(buf); return buf.toString(); }
public void rollback() throws SQLException { if (_isolation != TRANSACTION_NONE) super.rollback(); if (_autoCommit != null && _autoCommit.booleanValue() != _curAutoCommit) setAutoCommit(_autoCommit.booleanValue()); }
public void commit() throws SQLException { if (_isolation != TRANSACTION_NONE) super.commit(); if (_autoCommit != null && _autoCommit.booleanValue() != _curAutoCommit) setAutoCommit(_autoCommit.booleanValue()); }
protected PreparedStatement prepareStatement(String sql, boolean wrap) throws SQLException { return getCancelPreparedStatement(super.prepareStatement(sql, false), RefCountConnection.this); }
/** * Return the base underlying data store connection. */ public Connection getInnermostDelegate() { return (_del == null) ? _conn : _del.getInnermostDelegate(); }
public void setAutoCommit(boolean auto) throws SQLException { if (_isolation != TRANSACTION_NONE) { super.setAutoCommit(auto); _curAutoCommit = auto; } }
public InputStream getLOBStream(JDBCStore store, ResultSet rs, int column) throws SQLException { DelegatingConnection conn = (DelegatingConnection)store .getConnection(); conn.setAutoCommit(false); LargeObjectManager lom = ((PGConnection)conn.getInnermostDelegate()) .getLargeObjectAPI(); if (rs.getInt(column) != -1) { LargeObject lo = lom.open(rs.getInt(column)); return lo.getInputStream(); } else { return null; } }
public DatabaseMetaData getMetaData() throws SQLException { return getMetaData(true); }
public String getCatalog() throws SQLException { if (_catalog == null) _catalog = super.getCatalog(); return _catalog; }
protected void appendInfo(StringBuffer buf) { if (_del != null) _del.appendInfo(buf); }
public void rollback() throws SQLException { if (_isolation != TRANSACTION_NONE) super.rollback(); if (_autoCommit != null && _autoCommit.booleanValue() != _curAutoCommit) setAutoCommit(_autoCommit.booleanValue()); }
public void commit() throws SQLException { if (_isolation != TRANSACTION_NONE) super.commit(); if (_autoCommit != null && _autoCommit.booleanValue() != _curAutoCommit) setAutoCommit(_autoCommit.booleanValue()); }
protected PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean wrap) throws SQLException { PreparedStatement stmnt; if (_del != null) stmnt = _del.prepareStatement(sql, columnIndexes, wrap); else { stmnt = _conn.prepareStatement(sql, columnIndexes); } if (wrap) stmnt = new DelegatingPreparedStatement(stmnt, this); return stmnt; }
/** * Return the base underlying data store connection. */ public Connection getInnermostDelegate() { return (_del == null) ? _conn : _del.getInnermostDelegate(); }
public void setAutoCommit(boolean auto) throws SQLException { if (_isolation != TRANSACTION_NONE) { super.setAutoCommit(auto); _curAutoCommit = auto; } }
public String toString() { StringBuffer buf = new StringBuffer("conn ").append(hashCode()); appendInfo(buf); return buf.toString(); }