パッケージ org.postgresql.copy
クラス CopyManager
java.lang.Object
org.postgresql.copy.CopyManager
API for PostgreSQL COPY bulk data transfer.
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明long
copyIn
(String sql, InputStream from) Use COPY FROM STDIN for very fast copying from an InputStream into a database table.long
copyIn
(String sql, InputStream from, int bufferSize) Use COPY FROM STDIN for very fast copying from an InputStream into a database table.long
Use COPY FROM STDIN for very fast copying from a Reader into a database table.long
Use COPY FROM STDIN for very fast copying from a Reader into a database table.long
copyIn
(String sql, ByteStreamWriter from) Use COPY FROM STDIN for very fast copying from an ByteStreamWriter into a database table.long
copyOut
(String sql, OutputStream to) Pass results of a COPY TO STDOUT query from database into an OutputStream.long
Pass results of a COPY TO STDOUT query from database into a Writer.
-
コンストラクタの詳細
-
CopyManager
- 例外:
SQLException
-
-
メソッドの詳細
-
copyIn
- 例外:
SQLException
-
copyOut
- 例外:
SQLException
-
copyDual
- 例外:
SQLException
-
copyOut
Pass results of a COPY TO STDOUT query from database into a Writer.- パラメータ:
sql
- COPY TO STDOUT statementto
- the Writer to write the results to (row by row). The Writer is not closed at the end of the Copy Out operation.- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage errorsIOException
- upon writer or database connection failure
-
copyOut
Pass results of a COPY TO STDOUT query from database into an OutputStream.- パラメータ:
sql
- COPY TO STDOUT statementto
- the stream to write the results to (row by row) The stream is not closed at the end of the operation. This is intentional so the caller can continue to write to the output stream- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage errorsIOException
- upon output stream or database connection failure
-
copyIn
Use COPY FROM STDIN for very fast copying from a Reader into a database table.- パラメータ:
sql
- COPY FROM STDIN statementfrom
- a CSV file or such- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage issuesIOException
- upon reader or database connection failure
-
copyIn
Use COPY FROM STDIN for very fast copying from a Reader into a database table.- パラメータ:
sql
- COPY FROM STDIN statementfrom
- a CSV file or suchbufferSize
- number of characters to buffer and push over network to server at once- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage issuesIOException
- upon reader or database connection failure
-
copyIn
Use COPY FROM STDIN for very fast copying from an InputStream into a database table.- パラメータ:
sql
- COPY FROM STDIN statementfrom
- a CSV file or such- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage issuesIOException
- upon input stream or database connection failure
-
copyIn
Use COPY FROM STDIN for very fast copying from an InputStream into a database table.- パラメータ:
sql
- COPY FROM STDIN statementfrom
- a CSV file or suchbufferSize
- number of bytes to buffer and push over network to server at once- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage issuesIOException
- upon input stream or database connection failure
-
copyIn
Use COPY FROM STDIN for very fast copying from an ByteStreamWriter into a database table.- パラメータ:
sql
- COPY FROM STDIN statementfrom
- the source of bytes, e.g. a ByteBufferByteStreamWriter- 戻り値:
- number of rows updated for server 8.2 or newer; -1 for older
- 例外:
SQLException
- on database usage issuesIOException
- upon input stream or database connection failure
-