|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.postgresql.copy.CopyManager
public class CopyManager
API for PostgreSQL COPY bulk data transfer
Constructor Summary | |
---|---|
CopyManager(BaseConnection connection)
|
Method Summary | |
---|---|
CopyIn |
copyIn(String sql)
|
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 |
copyIn(String sql,
Reader from)
Use COPY FROM STDIN for very fast copying from a Reader into a database table. |
long |
copyIn(String sql,
Reader from,
int bufferSize)
Use COPY FROM STDIN for very fast copying from a Reader into a database table. |
CopyOut |
copyOut(String sql)
|
long |
copyOut(String sql,
OutputStream to)
Pass results of a COPY TO STDOUT query from database into an OutputStream. |
long |
copyOut(String sql,
Writer to)
Pass results of a COPY TO STDOUT query from database into a Writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CopyManager(BaseConnection connection) throws SQLException
SQLException
Method Detail |
---|
public CopyIn copyIn(String sql) throws SQLException
SQLException
public CopyOut copyOut(String sql) throws SQLException
SQLException
public long copyOut(String sql, Writer to) throws SQLException, IOException
sql
- COPY TO STDOUT statementto
- the stream to write the results to (row by row)
SQLException
- on database usage errors
IOException
- upon writer or database connection failurepublic long copyOut(String sql, OutputStream to) throws SQLException, IOException
sql
- COPY TO STDOUT statementto
- the stream to write the results to (row by row)
SQLException
- on database usage errors
IOException
- upon output stream or database connection failurepublic long copyIn(String sql, Reader from) throws SQLException, IOException
sql
- COPY FROM STDIN statementfrom
- a CSV file or such
SQLException
- on database usage issues
IOException
- upon reader or database connection failurepublic long copyIn(String sql, Reader from, int bufferSize) throws SQLException, IOException
sql
- COPY FROM STDIN statementfrom
- a CSV file or suchbufferSize
- number of characters to buffer and push over network to server at once
SQLException
- on database usage issues
IOException
- upon reader or database connection failurepublic long copyIn(String sql, InputStream from) throws SQLException, IOException
sql
- COPY FROM STDIN statementfrom
- a CSV file or such
SQLException
- on database usage issues
IOException
- upon input stream or database connection failurepublic long copyIn(String sql, InputStream from, int bufferSize) throws SQLException, IOException
sql
- COPY FROM STDIN statementfrom
- a CSV file or suchbufferSize
- number of bytes to buffer and push over network to server at once
SQLException
- on database usage issues
IOException
- upon input stream or database connection failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |