public void setCatalog(String catalog) throws SQLException { checkClosed(); //no-op }
public void setCursorName(String cursor) throws SQLException { checkClosed(); // No-op. }
public java.util.Map getTypeMap() throws SQLException { checkClosed(); return typemap; }
public String getCursorName() throws SQLException { checkClosed(); return null; }
public boolean isReadOnly() throws SQLException { checkClosed(); return readOnly; }
public boolean getAutoCommit() throws SQLException { checkClosed(); return this.autoCommit; }
public void addDataType(String type, Class klass) throws SQLException { checkClosed(); _typeCache.addDataType(type, klass); }
public void setAutoCommit(boolean autoCommit) throws SQLException { checkClosed(); if (this.autoCommit == autoCommit) return ; if (!this.autoCommit) commit(); this.autoCommit = autoCommit; }
public void cancelQuery() throws SQLException { checkClosed(); protoConnection.sendQueryCancel(); }
public Fastpath getFastpathAPI() throws SQLException { checkClosed(); if (fastpath == null) fastpath = new Fastpath(this); return fastpath; }
public String getCatalog() throws SQLException { checkClosed(); return protoConnection.getDatabase(); }
public LargeObjectManager getLargeObjectAPI() throws SQLException { checkClosed(); if (largeobject == null) largeobject = new LargeObjectManager(this); return largeobject; }
public synchronized void clearWarnings() throws SQLException { checkClosed(); protoConnection.getWarnings(); // Clear and discard. firstWarning = null; }
public CopyManager getCopyAPI() throws SQLException { checkClosed(); if (copyManager == null) copyManager = new CopyManager(this); return copyManager; } }
public String nativeSQL(String sql) throws SQLException { checkClosed(); StringBuffer buf = new StringBuffer(sql.length()); AbstractJdbc2Statement.parseSql(sql,0,buf,false,getStandardConformingStrings()); return buf.toString(); }
public synchronized SQLWarning getWarnings() throws SQLException { checkClosed(); SQLWarning newWarnings = protoConnection.getWarnings(); // NB: also clears them. if (firstWarning == null) firstWarning = newWarnings; else firstWarning.setNextWarning(newWarnings); // Chain them on. return firstWarning; }
public PGNotification[] getNotifications() throws SQLException { checkClosed(); getQueryExecutor().processNotifies(); // Backwards-compatibility hand-holding. PGNotification[] notifications = protoConnection.getNotifications(); return (notifications.length == 0 ? null : notifications); }
public void setTransactionIsolation(int level) throws SQLException { checkClosed(); if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) throw new PSQLException(GT.tr("Cannot change transaction isolation level in the middle of a transaction."), PSQLState.ACTIVE_SQL_TRANSACTION); String isolationLevelName = getIsolationLevelName(level); if (isolationLevelName == null) throw new PSQLException(GT.tr("Transaction isolation level {0} not supported.", new Integer(level)), PSQLState.NOT_IMPLEMENTED); String isolationLevelSQL = "SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL " + isolationLevelName; execSQLUpdate(isolationLevelSQL); // nb: no BEGIN triggered }
public void commit() throws SQLException { checkClosed(); if (autoCommit) throw new PSQLException(GT.tr("Cannot commit when autoCommit is enabled."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) executeTransactionCommand(commitQuery); }
public void rollback() throws SQLException { checkClosed(); if (autoCommit) throw new PSQLException(GT.tr("Cannot rollback when autoCommit is enabled."), PSQLState.NO_ACTIVE_SQL_TRANSACTION); if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) executeTransactionCommand(rollbackQuery); }