Top Fields Constructors Methods
org.postgresql.core.v3

public abstract Class CopyOperationImpl

extends Object
implements CopyOperation
Class Inheritance
All Implemented Interfaces
org.postgresql.copy.CopyOperation
Known Direct Subclasses
org.postgresql.core.v3.CopyOutImpl, org.postgresql.core.v3.CopyDualImpl, org.postgresql.core.v3.CopyInImpl
Static Imports
org.postgresql.util.internal.Nullness.castNonNull

Field Summary

Modifier and TypeField and Description
pack-priv @Nullable int[]
pack-priv long
pack-priv @Nullable QueryExecutorImpl
pack-priv int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
cancelCopy()

Implements org.postgresql.copy.CopyOperation.cancelCopy.

Cancels this copy operation, discarding any exchanged data.

public int
public int
getFieldFormat(int
number of field (0..fieldCount()-1)
field
)

Implements org.postgresql.copy.CopyOperation.getFieldFormat.

public int
public long
getHandledRowCount()

Implements org.postgresql.copy.CopyOperation.getHandledRowCount.

After successful end of copy, returns the number of database records handled in that operation.

protected QueryExecutorImpl
public void
protected abstract void
handleCopydata(byte[]
data that was receive by copy protocol
data
)

Consume received copy data.

pack-priv void
init(QueryExecutorImpl q, int fmt, int[] fmts)

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fieldFormatsback to summary
pack-priv @Nullable int[] fieldFormats
handledRowCountback to summary
pack-priv long handledRowCount
queryExecutorback to summary
pack-priv @Nullable QueryExecutorImpl queryExecutor
rowFormatback to summary
pack-priv int rowFormat

Constructor Detail

CopyOperationImplback to summary
public CopyOperationImpl()

Method Detail

cancelCopyback to summary
public void cancelCopy() throws SQLException

Implements org.postgresql.copy.CopyOperation.cancelCopy.

Doc from org.postgresql.copy.CopyOperation.cancelCopy.

Cancels this copy operation, discarding any exchanged data.

Annotations
@Override
Exceptions
SQLException:
if cancelling fails
getFieldCountback to summary
public int getFieldCount()

Implements org.postgresql.copy.CopyOperation.getFieldCount.

Returns:int

Doc from org.postgresql.copy.CopyOperation.getFieldCount.

number of fields in each row for this operation

Annotations
@Override
getFieldFormatback to summary
public int getFieldFormat(int field)

Implements org.postgresql.copy.CopyOperation.getFieldFormat.

Parameters
field:int

Doc from org.postgresql.copy.CopyOperation.getFieldFormat.

number of field (0..fieldCount()-1)

Returns:int

Doc from org.postgresql.copy.CopyOperation.getFieldFormat.

format of requested field: 0 = textual, 1 = binary

Annotations
@Override
getFormatback to summary
public int getFormat()

Implements org.postgresql.copy.CopyOperation.getFormat.

Returns:int

Doc from org.postgresql.copy.CopyOperation.getFormat.

overall format of each row: 0 = textual, 1 = binary

Annotations
@Override
getHandledRowCountback to summary
public long getHandledRowCount()

Implements org.postgresql.copy.CopyOperation.getHandledRowCount.

Doc from org.postgresql.copy.CopyOperation.getHandledRowCount.

After successful end of copy, returns the number of database records handled in that operation. Only implemented in PostgreSQL server version 8.2 and up. Otherwise, returns -1.

Returns:long

number of handled rows or -1

Annotations
@Override
getQueryExecutorback to summary
protected QueryExecutorImpl getQueryExecutor()
handleCommandStatusback to summary
public void handleCommandStatus(String status) throws PSQLException
handleCopydataback to summary
protected abstract void handleCopydata(byte[] data) throws PSQLException

Consume received copy data.

Parameters
data:byte[]

data that was receive by copy protocol

Exceptions
PSQLException:
if some internal problem occurs
initback to summary
pack-priv void init(QueryExecutorImpl q, int fmt, int[] fmts)
isActiveback to summary
public boolean isActive()

Implements org.postgresql.copy.CopyOperation.isActive.

Returns:boolean

Doc from org.postgresql.copy.CopyOperation.isActive.

is connection reserved for this Copy operation?

Annotations
@Override