@Override public void handleCommandStatus(String status, int updateCount, long insertOID) { if (delegate != null) { delegate.handleCommandStatus(status, updateCount, insertOID); } }
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
private void interpretCommandStatus(String status, ResultHandler handler) { int update_count = 0; long insert_oid = 0; if (status.startsWith("INSERT") || status.startsWith("UPDATE") || status.startsWith("DELETE") || status.startsWith("MOVE")) { try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { handler.handleError(new PSQLException(GT.tr("Unable to interpret the update count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return ; } } handler.handleCommandStatus(status, update_count, insert_oid); }
private void interpretCommandStatus(String status, ResultHandler handler) throws IOException { int update_count = 0; long insert_oid = 0; if (status.equals("BEGIN")) protoConnection.setTransactionState(ProtocolConnection.TRANSACTION_OPEN); else if (status.equals("COMMIT") || status.equals("ROLLBACK")) protoConnection.setTransactionState(ProtocolConnection.TRANSACTION_IDLE); else if (status.startsWith("INSERT") || status.startsWith("UPDATE") || status.startsWith("DELETE") || status.startsWith("MOVE")) { try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { handler.handleError(new PSQLException(GT.tr("Unable to interpret the update count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return ; } } handler.handleCommandStatus(status, update_count, insert_oid); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { sawBegin = true; if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); sawBegin = true; } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }
private void interpretCommandStatus(String status, ResultHandler handler) { try { commandCompleteParser.parse(status); } catch (SQLException e) { handler.handleError(e); return; } long oid = commandCompleteParser.getOid(); long count = commandCompleteParser.getRows(); int countAsInt = 0; if (count > Integer.MAX_VALUE) { // If command status indicates that we've modified more than Integer.MAX_VALUE rows // then we set the result count to reflect that we cannot provide the actual number // due to the JDBC field being an int rather than a long. countAsInt = Statement.SUCCESS_NO_INFO; } else if (count > 0) { countAsInt = (int) count; } handler.handleCommandStatus(status, countAsInt, oid); }
handler.handleCommandStatus("EMPTY", 0, 0); if (currentPortal != null) { currentPortal.close();
Query currentQuery = (Query)executeData[0]; Portal currentPortal = (Portal)executeData[1]; handler.handleCommandStatus("EMPTY", 0, 0); if (currentPortal != null) currentPortal.close();
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { delegateHandler.handleCommandStatus(status, updateCount, insertOID); }
private void interpretCommandStatus(String status, ResultHandler handler) { int update_count = 0; long insert_oid = 0; if (status.startsWith("INSERT") || status.startsWith("UPDATE") || status.startsWith("DELETE") || status.startsWith("MOVE")) { try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { handler.handleError(new PSQLException(GT.tr("Unable to interpret the update count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return ; } } handler.handleCommandStatus(status, update_count, insert_oid); }
private void interpretCommandStatus(String status, ResultHandler handler) { int update_count = 0; long insert_oid = 0; if (status.startsWith("INSERT") || status.startsWith("UPDATE") || status.startsWith("DELETE") || status.startsWith("MOVE")) { try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { handler.handleError(new PSQLException(GT.tr("Unable to interpret the update count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE)); return ; } } handler.handleCommandStatus(status, update_count, insert_oid); }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); sawBegin = true; } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { sawBegin = true; if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { sawBegin = true; if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }
public void handleCommandStatus(String status, int updateCount, long insertOID) { if (!sawBegin) { if (!status.equals("BEGIN")) handleError(new PSQLException(GT.tr("Expected command status BEGIN, got {0}.", status), PSQLState.PROTOCOL_VIOLATION)); sawBegin = true; } else { delegateHandler.handleCommandStatus(status, updateCount, insertOID); } }