public abstract class CopyOperationImpl extends java.lang.Object implements CopyOperation
| Modifier and Type | Field and Description |
|---|---|
(package private) int[] |
fieldFormats |
(package private) long |
handledRowCount |
(package private) QueryExecutorImpl |
queryExecutor |
(package private) int |
rowFormat |
| Constructor and Description |
|---|
CopyOperationImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelCopy()
Cancels this copy operation, discarding any exchanged data.
|
int |
getFieldCount() |
int |
getFieldFormat(int field) |
int |
getFormat() |
long |
getHandledRowCount()
After successful end of copy, returns the number of database records handled in that operation.
|
void |
handleCommandStatus(java.lang.String status) |
protected abstract void |
handleCopydata(byte[] data)
Consume received copy data.
|
(package private) void |
init(QueryExecutorImpl q,
int fmt,
int[] fmts) |
boolean |
isActive() |
QueryExecutorImpl queryExecutor
int rowFormat
int[] fieldFormats
long handledRowCount
void init(QueryExecutorImpl q, int fmt, int[] fmts)
public void cancelCopy()
throws java.sql.SQLException
CopyOperationcancelCopy in interface CopyOperationjava.sql.SQLException - if cancelling failspublic int getFieldCount()
getFieldCount in interface CopyOperationpublic int getFieldFormat(int field)
getFieldFormat in interface CopyOperationfield - number of field (0..fieldCount()-1)public int getFormat()
getFormat in interface CopyOperationpublic boolean isActive()
isActive in interface CopyOperationpublic void handleCommandStatus(java.lang.String status)
throws PSQLException
PSQLExceptionprotected abstract void handleCopydata(byte[] data)
throws PSQLException
data - data that was receive by copy protocolPSQLException - if some internal problem occurspublic long getHandledRowCount()
CopyOperationgetHandledRowCount in interface CopyOperation