パッケージ org.postgresql.copy

インタフェース CopyIn

すべてのスーパーインタフェース:
CopyOperation
既知のサブインタフェースのリスト:
CopyDual
既知の実装クラスのリスト:
CopyDualImpl, CopyInImpl, PGCopyOutputStream

public interface CopyIn extends CopyOperation
Copy bulk data from client into a PostgreSQL table very fast.
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    long
    Finishes copy operation successfully.
    void
    Force any buffered output to be sent over the network to the backend.
    void
    writeToCopy(byte[] buf, int off, int siz)
    Writes specified part of given byte array to an open and writable copy operation.
    void
    Writes a ByteStreamWriter to an open and writable copy operation.

    インタフェースから継承されたメソッド org.postgresql.copy.CopyOperation

    cancelCopy, getFieldCount, getFieldFormat, getFormat, getHandledRowCount, isActive
  • メソッドの詳細

    • writeToCopy

      void writeToCopy(byte[] buf, int off, int siz) throws SQLException
      Writes specified part of given byte array to an open and writable copy operation.
      パラメータ:
      buf - array of bytes to write
      off - offset of first byte to write (normally zero)
      siz - number of bytes to write (normally buf.length)
      例外:
      SQLException - if the operation fails
    • writeToCopy

      void writeToCopy(ByteStreamWriter from) throws SQLException
      Writes a ByteStreamWriter to an open and writable copy operation.
      パラメータ:
      from - the source of bytes, e.g. a ByteBufferByteStreamWriter
      例外:
      SQLException - if the operation fails
    • flushCopy

      void flushCopy() throws SQLException
      Force any buffered output to be sent over the network to the backend. In general this is a useless operation as it will get pushed over in due time or when endCopy is called. Some specific modified server versions (Truviso) want this data sooner. If you are unsure if you need to use this method, don't.
      例外:
      SQLException - if the operation fails.
    • endCopy

      long endCopy() throws SQLException
      Finishes copy operation successfully.
      戻り値:
      number of updated rows for server 8.2 or newer (see getHandledRowCount())
      例外:
      SQLException - if the operation fails.