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

How to use
CopyOperationImpl
in
org.postgresql.core.v3

Best Java code snippets using org.postgresql.core.v3.CopyOperationImpl (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.postgresql/postgresql

    PSQLState.OBJECT_NOT_IN_STATE);
 op.handleCommandStatus(status);
} catch (SQLException se) {
 error = se;
   PSQLState.COMMUNICATION_ERROR);
} else {
 op.handleCopydata(buf);
origin: org.postgresql/postgresql

/**
 * Locks connection and calls initializer for a new CopyOperation Called via startCopy ->
 * processCopyResults.
 *
 * @param op an uninitialized CopyOperation
 * @throws SQLException on locking failure
 * @throws IOException on database connection failure
 */
private synchronized void initCopy(CopyOperationImpl op) throws SQLException, IOException {
 pgStream.receiveInteger4(); // length not used
 int rowFormat = pgStream.receiveChar();
 int numFields = pgStream.receiveInteger2();
 int[] fieldFormats = new int[numFields];
 for (int i = 0; i < numFields; i++) {
  fieldFormats[i] = pgStream.receiveInteger2();
 }
 lock(op);
 op.init(this, rowFormat, fieldFormats);
}
origin: org.postgresql/postgresql

/**
 * Finishes writing to copy and unlocks connection.
 *
 * @param op the copy operation presumably currently holding lock on this connection
 * @return number of rows updated for server versions 8.2 or newer
 * @throws SQLException on failure
 */
public synchronized long endCopy(CopyOperationImpl op) throws SQLException {
 if (!hasLock(op)) {
  throw new PSQLException(GT.tr("Tried to end inactive copy"), PSQLState.OBJECT_NOT_IN_STATE);
 }
 try {
  LOGGER.log(Level.FINEST, " FE=> CopyDone");
  pgStream.sendChar('c'); // CopyDone
  pgStream.sendInteger4(4);
  pgStream.flush();
  do {
   processCopyResults(op, true);
  } while (hasLock(op));
  return op.getHandledRowCount();
 } catch (IOException ioe) {
  throw new PSQLException(GT.tr("Database connection failed when ending copy"),
    PSQLState.CONNECTION_FAILURE, ioe);
 }
}
origin: postgresql/postgresql

  if(op == null)
    throw new PSQLException(GT.tr("Received CommandComplete ''{0}'' without an active copy operation", status), PSQLState.OBJECT_NOT_IN_STATE);
  op.handleCommandStatus(status);
} catch(SQLException se) {
  error = se;
origin: org.ancoron.postgresql/org.postgresql.osgi

  if(op == null)
    throw new PSQLException(GT.tr("Received CommandComplete ''{0}'' without an active copy operation", status), PSQLState.OBJECT_NOT_IN_STATE);
  op.handleCommandStatus(status);
} catch(SQLException se) {
  error = se;
origin: postgresql/postgresql

/**
 * Locks connection and calls initializer for a new CopyOperation
 * Called via startCopy -> processCopyResults
 * @param op an unitialized CopyOperation
 * @throws SQLException on locking failure
 * @throws IOException on database connection failure
 */
private synchronized void initCopy(CopyOperationImpl op) throws SQLException, IOException {
  pgStream.ReceiveInteger4(); // length not used
  int rowFormat = pgStream.ReceiveChar();
  int numFields = pgStream.ReceiveInteger2();
  int[] fieldFormats = new int[numFields];
  for(int i=0; i<numFields; i++)
    fieldFormats[i] = pgStream.ReceiveInteger2();
  lock(op);
  op.init(this, rowFormat, fieldFormats);
}
origin: org.ancoron.postgresql/org.postgresql

  if(op == null)
    throw new PSQLException(GT.tr("Received CommandComplete ''{0}'' without an active copy operation", status), PSQLState.OBJECT_NOT_IN_STATE);
  op.handleCommandStatus(status);
} catch(SQLException se) {
  error = se;
origin: org.ancoron.postgresql/org.postgresql

/**
 * Locks connection and calls initializer for a new CopyOperation
 * Called via startCopy -> processCopyResults
 * @param op an unitialized CopyOperation
 * @throws SQLException on locking failure
 * @throws IOException on database connection failure
 */
private synchronized void initCopy(CopyOperationImpl op) throws SQLException, IOException {
  pgStream.ReceiveInteger4(); // length not used
  int rowFormat = pgStream.ReceiveChar();
  int numFields = pgStream.ReceiveInteger2();
  int[] fieldFormats = new int[numFields];
  for(int i=0; i<numFields; i++)
    fieldFormats[i] = pgStream.ReceiveInteger2();
  lock(op);
  op.init(this, rowFormat, fieldFormats);
}
origin: org.ancoron.postgresql/org.postgresql.osgi

/**
 * Locks connection and calls initializer for a new CopyOperation
 * Called via startCopy -> processCopyResults
 * @param op an unitialized CopyOperation
 * @throws SQLException on locking failure
 * @throws IOException on database connection failure
 */
private synchronized void initCopy(CopyOperationImpl op) throws SQLException, IOException {
  pgStream.ReceiveInteger4(); // length not used
  int rowFormat = pgStream.ReceiveChar();
  int numFields = pgStream.ReceiveInteger2();
  int[] fieldFormats = new int[numFields];
  for(int i=0; i<numFields; i++)
    fieldFormats[i] = pgStream.ReceiveInteger2();
  lock(op);
  op.init(this, rowFormat, fieldFormats);
}
org.postgresql.core.v3CopyOperationImpl

Most used methods

  • handleCommandStatus
  • init
  • getHandledRowCount
  • handleCopydata
    Consume received copy data.

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • JButton (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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