Codota Logo
QueryExecutorImpl
Code IndexAdd Codota to your IDE (free)

How to use
QueryExecutorImpl
in
org.postgresql.core.v2

Best Java code snippets using org.postgresql.core.v2.QueryExecutorImpl (Showing top 20 results out of 315)

  • Common ways to obtain QueryExecutorImpl
private void myMethod () {
QueryExecutorImpl q =
  • Codota IconProtocolConnectionImpl protocolConnectionImpl;PGStream pgStream;Logger logger;new QueryExecutorImpl(protocolConnectionImpl, pgStream, logger)
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

ProtocolConnectionImpl(PGStream pgStream, String user, String database, Logger logger) {
  this.pgStream = pgStream;
  this.user = user;
  this.database = database;
  this.logger = logger;
  this.executor = new QueryExecutorImpl(this, pgStream, logger);
}
origin: postgresql/postgresql

  V2Query query = (V2Query)createSimpleQuery("");
  SimpleParameterList params = (SimpleParameterList)query.createParameterList();
  sendQuery(query, params, "BEGIN");
  processResults(query, handler, 0, 0);
sendFastpathCall(fnid, (FastpathParameterList)parameters);
return receiveFastpathResult();
origin: postgresql/postgresql

public synchronized void execute(Query[] queries,
                 ParameterList[] parameters,
                 ResultHandler handler,
                 int maxRows, int fetchSize, int flags)
throws SQLException
{
  final ResultHandler delegateHandler = handler;
  handler = new ResultHandler() {
         public void handleResultRows(Query fromQuery, Field[] fields, Vector tuples, ResultCursor cursor) {
           delegateHandler.handleResultRows(fromQuery, fields, tuples, cursor);
         }
         public void handleCommandStatus(String status, int updateCount, long insertOID) {
           delegateHandler.handleCommandStatus(status, updateCount, insertOID);
         }
         public void handleWarning(SQLWarning warning) {
           delegateHandler.handleWarning(warning);
         }
         public void handleError(SQLException error) {
           delegateHandler.handleError(error);
         }
         public void handleCompletion() throws SQLException {
         }
       };
  for (int i = 0; i < queries.length; ++i)
    execute((V2Query)queries[i], (SimpleParameterList)parameters[i], handler, maxRows, flags);
  delegateHandler.handleCompletion();
}
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

receiveAsyncNotify();
break;
    interpretCommandStatus(status, handler);
  interpretCommandStatus(status, handler);
handler.handleError(receiveErrorMessage());
handler.handleWarning(receiveNotification());
break;
fields = receiveFields();
tuples = new Vector();
break;
origin: postgresql/postgresql

sendQuery(query, parameters, queryPrefix);
processResults(query, handler, maxRows, flags);
origin: org.ancoron.postgresql/org.postgresql

receiveAsyncNotify();
break;
    interpretCommandStatus(status, handler);
  interpretCommandStatus(status, handler);
handler.handleError(receiveErrorMessage());
handler.handleWarning(receiveNotification());
break;
fields = receiveFields();
tuples = new Vector();
break;
origin: postgresql/postgresql

receiveAsyncNotify();
break;
SQLException newError = receiveErrorMessage();
if (error == null)
  error = newError;
protoConnection.addWarning(receiveNotification());
break;
origin: org.ancoron.postgresql/org.postgresql.osgi

sendQuery(query, parameters, queryPrefix);
processResults(query, handler, maxRows, flags);
origin: org.ancoron.postgresql/org.postgresql

  V2Query query = (V2Query)createSimpleQuery("");
  SimpleParameterList params = (SimpleParameterList)query.createParameterList();
  sendQuery(query, params, "BEGIN");
  processResults(query, handler, 0, 0);
sendFastpathCall(fnid, (FastpathParameterList)parameters);
return receiveFastpathResult();
origin: org.ancoron.postgresql/org.postgresql.osgi

receiveAsyncNotify();
break;
    interpretCommandStatus(status, handler);
  interpretCommandStatus(status, handler);
handler.handleError(receiveErrorMessage());
handler.handleWarning(receiveNotification());
break;
fields = receiveFields();
tuples = new Vector();
break;
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

sendQuery(query, parameters, queryPrefix);
processResults(query, handler, maxRows, flags);
origin: org.ancoron.postgresql/org.postgresql.osgi

ProtocolConnectionImpl(PGStream pgStream, String user, String database, Logger logger) {
  this.pgStream = pgStream;
  this.user = user;
  this.database = database;
  this.logger = logger;
  this.executor = new QueryExecutorImpl(this, pgStream, logger);
}
origin: org.ancoron.postgresql/org.postgresql

public synchronized void execute(Query[] queries,
                 ParameterList[] parameters,
                 ResultHandler handler,
                 int maxRows, int fetchSize, int flags)
throws SQLException
{
  final ResultHandler delegateHandler = handler;
  handler = new ResultHandler() {
         public void handleResultRows(Query fromQuery, Field[] fields, Vector tuples, ResultCursor cursor) {
           delegateHandler.handleResultRows(fromQuery, fields, tuples, cursor);
         }
         public void handleCommandStatus(String status, int updateCount, long insertOID) {
           delegateHandler.handleCommandStatus(status, updateCount, insertOID);
         }
         public void handleWarning(SQLWarning warning) {
           delegateHandler.handleWarning(warning);
         }
         public void handleError(SQLException error) {
           delegateHandler.handleError(error);
         }
         public void handleCompletion() throws SQLException {
         }
       };
  for (int i = 0; i < queries.length; ++i)
    execute((V2Query)queries[i], (SimpleParameterList)parameters[i], handler, maxRows, flags);
  delegateHandler.handleCompletion();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

  V2Query query = (V2Query)createSimpleQuery("");
  SimpleParameterList params = (SimpleParameterList)query.createParameterList();
  sendQuery(query, params, "BEGIN");
  processResults(query, handler, 0, 0);
sendFastpathCall(fnid, (FastpathParameterList)parameters);
return receiveFastpathResult();
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

ProtocolConnectionImpl(PGStream pgStream, String user, String database, Logger logger) {
  this.pgStream = pgStream;
  this.user = user;
  this.database = database;
  this.logger = logger;
  this.executor = new QueryExecutorImpl(this, pgStream, logger);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public synchronized void execute(Query[] queries,
                 ParameterList[] parameters,
                 ResultHandler handler,
                 int maxRows, int fetchSize, int flags)
throws SQLException
{
  final ResultHandler delegateHandler = handler;
  handler = new ResultHandler() {
         public void handleResultRows(Query fromQuery, Field[] fields, Vector tuples, ResultCursor cursor) {
           delegateHandler.handleResultRows(fromQuery, fields, tuples, cursor);
         }
         public void handleCommandStatus(String status, int updateCount, long insertOID) {
           delegateHandler.handleCommandStatus(status, updateCount, insertOID);
         }
         public void handleWarning(SQLWarning warning) {
           delegateHandler.handleWarning(warning);
         }
         public void handleError(SQLException error) {
           delegateHandler.handleError(error);
         }
         public void handleCompletion() throws SQLException {
         }
       };
  for (int i = 0; i < queries.length; ++i)
    execute((V2Query)queries[i], (SimpleParameterList)parameters[i], handler, maxRows, flags);
  delegateHandler.handleCompletion();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

receiveAsyncNotify();
break;
SQLException newError = receiveErrorMessage();
if (error == null)
  error = newError;
protoConnection.addWarning(receiveNotification());
break;
org.postgresql.core.v2QueryExecutorImpl

Javadoc

QueryExecutor implementation for the V2 protocol.

Most used methods

  • <init>
  • createSimpleQuery
  • execute
  • interpretCommandStatus
  • processResults
  • receiveAsyncNotify
  • receiveErrorMessage
  • receiveFastpathResult
  • receiveFields
  • receiveNotification
  • sendFastpathCall
  • sendQuery
  • sendFastpathCall,
  • sendQuery

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
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