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