Introduction to the CopyManager Class
CopyManager is an API class provided by the JDBC driver in GaussDB. It is used to import data to the GaussDB database in batches.
Inheritance Relationship of CopyManager
The CopyManager class is in the org.postgresql.copy package and inherits the java.lang.Object class. The declaration of the class is as follows:
public class CopyManager extends Object
Construction Method
public CopyManager(BaseConnection connection)
throws SQLException
Common Methods
Return Value |
Method |
Description |
throws |
---|---|---|---|
CopyIn |
copyIn(String sql) |
- |
SQLException |
long |
copyIn(String sql, InputStream from) |
Uses COPY FROM STDIN to quickly import data to tables in a database from InputStream. |
SQLException,IOException |
long |
copyIn(String sql, InputStream from, int bufferSize) |
Uses COPY FROM STDIN to quickly import data to tables in a database from InputStream. |
SQLException,IOException |
long |
copyIn(String sql, Reader from) |
Uses COPY FROM STDIN to quickly import data to tables in a database from Reader. |
SQLException,IOException |
long |
copyIn(String sql, Reader from, int bufferSize) |
Uses COPY FROM STDIN to quickly import data to tables in a database from Reader. |
SQLException,IOException |
CopyOut |
copyOut(String sql) |
- |
SQLException |
long |
copyOut(String sql, OutputStream to) |
Sends the result set of COPY TO STDOUT from the database to the OutputStream class. |
SQLException,IOException |
long |
copyOut(String sql, Writer to) |
Sends the result set of COPY TO STDOUT from the database to the Writer class. |
SQLException,IOException |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot