Codota Logo
ProtocolConnectionImpl.getTransactionState
Code IndexAdd Codota to your IDE (free)

How to use
getTransactionState
method
in
org.postgresql.core.v2.ProtocolConnectionImpl

Best Java code snippets using org.postgresql.core.v2.ProtocolConnectionImpl.getTransactionState (Showing top 9 results out of 315)

  • Common ways to obtain ProtocolConnectionImpl
private void myMethod () {
ProtocolConnectionImpl p =
  • Codota IconPGStream pgStream;String user;String database;Logger logger;new ProtocolConnectionImpl(pgStream, user, database, logger)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

public synchronized void processNotifies() throws SQLException {
  // Asynchronous notifies only arrive when we are not in a transaction
  if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE)
    return;
    
  try {
    while (pgStream.hasMessagePending()) {
      int c = pgStream.ReceiveChar();
      switch (c) {
      case 'A':  // Asynchronous Notify
        receiveAsyncNotify();
        break;
      case 'E':  // Error Message
        throw receiveErrorMessage();
        // break;
      case 'N':  // Error Notification
        protoConnection.addWarning(receiveNotification());
        break;
      default:
        throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE);
      }
    }
  } catch (IOException ioe) {
    throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe);
  }
}
origin: postgresql/postgresql

if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE &&
    (flags & QueryExecutor.QUERY_SUPPRESS_BEGIN) == 0)
origin: postgresql/postgresql

public synchronized byte[]
fastpathCall(int fnid, ParameterList parameters, boolean suppressBegin) throws SQLException {
  if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE && !suppressBegin)
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized void processNotifies() throws SQLException {
  // Asynchronous notifies only arrive when we are not in a transaction
  if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE)
    return;
    
  try {
    while (pgStream.hasMessagePending()) {
      int c = pgStream.ReceiveChar();
      switch (c) {
      case 'A':  // Asynchronous Notify
        receiveAsyncNotify();
        break;
      case 'E':  // Error Message
        throw receiveErrorMessage();
        // break;
      case 'N':  // Error Notification
        protoConnection.addWarning(receiveNotification());
        break;
      default:
        throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE);
      }
    }
  } catch (IOException ioe) {
    throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe);
  }
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized void processNotifies() throws SQLException {
  // Asynchronous notifies only arrive when we are not in a transaction
  if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE)
    return;
    
  try {
    while (pgStream.hasMessagePending()) {
      int c = pgStream.ReceiveChar();
      switch (c) {
      case 'A':  // Asynchronous Notify
        receiveAsyncNotify();
        break;
      case 'E':  // Error Message
        throw receiveErrorMessage();
        // break;
      case 'N':  // Error Notification
        protoConnection.addWarning(receiveNotification());
        break;
      default:
        throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE);
      }
    }
  } catch (IOException ioe) {
    throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe);
  }
}
origin: org.ancoron.postgresql/org.postgresql.osgi

if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE &&
    (flags & QueryExecutor.QUERY_SUPPRESS_BEGIN) == 0)
origin: org.ancoron.postgresql/org.postgresql

if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE &&
    (flags & QueryExecutor.QUERY_SUPPRESS_BEGIN) == 0)
origin: org.ancoron.postgresql/org.postgresql

public synchronized byte[]
fastpathCall(int fnid, ParameterList parameters, boolean suppressBegin) throws SQLException {
  if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE && !suppressBegin)
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized byte[]
fastpathCall(int fnid, ParameterList parameters, boolean suppressBegin) throws SQLException {
  if (protoConnection.getTransactionState() == ProtocolConnection.TRANSACTION_IDLE && !suppressBegin)
org.postgresql.core.v2ProtocolConnectionImplgetTransactionState

Popular methods of ProtocolConnectionImpl

  • <init>
  • addNotification
  • addWarning
  • close
  • getEncoding
  • setBackendKeyData
  • setEncoding
  • setServerVersion
  • setStandardConformingStrings
  • setTransactionState
  • getStandardConformingStrings
  • getQueryExecutor
  • getStandardConformingStrings,
  • getQueryExecutor

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now