Codota Logo
org.postgresql.copy
Code IndexAdd Codota to your IDE (free)

How to use org.postgresql.copy

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.postgresql/postgresql

public long endCopy() throws SQLException {
 if (at > 0) {
  op.writeToCopy(copyBuffer, 0, at);
 }
 op.endCopy();
 return getHandledRowCount();
}
origin: org.postgresql/postgresql

public int read(byte[] buf, int off, int siz) throws IOException {
 checkClosed();
 int got = 0;
 boolean didReadSomething = false;
 while (got < siz && (didReadSomething = gotBuf())) {
  buf[off + got++] = this.buf[at++];
 }
 return got == 0 && !didReadSomething ? -1 : got;
}
origin: org.postgresql/postgresql

/**
 * Use COPY FROM STDIN for very fast copying from an InputStream into a database table.
 *
 * @param sql COPY FROM STDIN statement
 * @param from a CSV file or such
 * @return number of rows updated for server 8.2 or newer; -1 for older
 * @throws SQLException on database usage issues
 * @throws IOException upon input stream or database connection failure
 */
public long copyIn(final String sql, InputStream from) throws SQLException, IOException {
 return copyIn(sql, from, DEFAULT_BUFFER_SIZE);
}
origin: org.postgresql/postgresql

public void cancelCopy() throws SQLException {
 op.cancelCopy();
}
origin: org.postgresql/postgresql

 public long getHandledRowCount() {
  return op.getHandledRowCount();
 }
}
origin: org.postgresql/postgresql

public int available() throws IOException {
 checkClosed();
 return (buf != null ? len - at : 0);
}
origin: org.postgresql/postgresql

public int getFieldFormat(int field) {
 return op.getFieldFormat(field);
}
origin: org.postgresql/postgresql

public int getFieldCount() {
 return op.getFieldCount();
}
origin: org.postgresql/postgresql

public int read(byte[] buf) throws IOException {
 return read(buf, 0, buf.length);
}
origin: org.postgresql/postgresql

public int getFormat() {
 return op.getFormat();
}
origin: org.postgresql/postgresql

public int getFieldFormat(int field) {
 return op.getFieldFormat(field);
}
origin: org.postgresql/postgresql

@Override
public boolean isClosed() {
 return closeFlag || !copyDual.isActive();
}
origin: org.postgresql/postgresql

@Override
public byte[] readFromCopy(boolean block) throws SQLException {
 return readFromCopy();
}
origin: org.postgresql/postgresql

/**
 * Use COPY FROM STDIN for very fast copying from a Reader into a database table.
 *
 * @param sql COPY FROM STDIN statement
 * @param from a CSV file or such
 * @return number of rows updated for server 8.2 or newer; -1 for older
 * @throws SQLException on database usage issues
 * @throws IOException upon reader or database connection failure
 */
public long copyIn(final String sql, Reader from) throws SQLException, IOException {
 return copyIn(sql, from, DEFAULT_BUFFER_SIZE);
}
origin: postgresql/postgresql

public long endCopy() throws SQLException {
  if(at > 0) {
    op.writeToCopy(copyBuffer, 0, at);
  }
  op.endCopy();
  return getHandledRowCount();
}
origin: org.postgresql/postgresql

public int read() throws IOException {
 checkClosed();
 return gotBuf() ? buf[at++] : -1;
}
origin: postgresql/postgresql

public int available() throws IOException {
  checkClosed();
  return ( buf != null ? len - at : 0 );
}

origin: postgresql/postgresql

/**
 * Use COPY FROM STDIN for very fast copying from an InputStream into a database table.
 * @param sql COPY FROM STDIN statement
 * @param from a CSV file or such
 * @return number of rows updated for server 8.2 or newer; -1 for older
 * @throws SQLException on database usage issues
 * @throws IOException upon input stream or database connection failure
 */
public long copyIn(final String sql, InputStream from) throws SQLException, IOException {
  return copyIn(sql, from, DEFAULT_BUFFER_SIZE);
}
origin: postgresql/postgresql

public int read(byte[] buf, int off, int siz) throws IOException {
  checkClosed();
  int got = 0;
  while( got < siz && gotBuf() ) {
    buf[off+got++] = this.buf[at++];
  }
  return got;
}
origin: postgresql/postgresql

/**
 * Use COPY FROM STDIN for very fast copying from a Reader into a database table.
 * @param sql COPY FROM STDIN statement
 * @param from a CSV file or such
 * @return number of rows updated for server 8.2 or newer; -1 for older
 * @throws SQLException on database usage issues
 * @throws IOException upon reader or database connection failure
 */
public long copyIn(final String sql, Reader from) throws SQLException, IOException {
  return copyIn(sql, from, DEFAULT_BUFFER_SIZE);
}
org.postgresql.copy

Most used classes

  • CopyManager
  • CopyIn
    Copy bulk data from client into a PostgreSQL table very fast.
  • PGCopyOutputStream
  • CopyOut
  • CopyOperation
    Exchange bulk data between client and PostgreSQL database tables. See CopyIn and CopyOut for full in
  • CopyDual
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