Top Description Methods
org.postgresql.copy

public Interface CopyOperation

Known Direct Subinterfaces
org.postgresql.copy.CopyOut, org.postgresql.copy.CopyIn
Known Direct Implementers
org.postgresql.core.v3.CopyOperationImpl
Imports
java.sql.SQLException

Exchange bulk data between client and PostgreSQL database tables. See CopyIn and CopyOut for full interfaces for corresponding copy directions.

Method Summary

Modifier and TypeMethod and Description
public void
cancelCopy()

Cancels this copy operation, discarding any exchanged data.

public int

Returns:

number of fields in each row for this operation
getFieldCount
()

public int

Returns:

format of requested field: 0 = textual, 1 = binary
getFieldFormat
(int
number of field (0..fieldCount()-1)
field
)

public int

Returns:

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

public long

Returns:

number of handled rows or -1
getHandledRowCount
()

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

public boolean

Returns:

is connection reserved for this Copy operation?
isActive
()

Method Detail

cancelCopyback to summary
public void cancelCopy() throws SQLException

Cancels this copy operation, discarding any exchanged data.

Exceptions
SQLException:
if cancelling fails
getFieldCountback to summary
public int getFieldCount()
Returns:int

number of fields in each row for this operation

getFieldFormatback to summary
public int getFieldFormat(int field)
Parameters
field:int

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

Returns:int

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

getFormatback to summary
public int getFormat()
Returns:int

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

getHandledRowCountback to summary
public long 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

isActiveback to summary
public boolean isActive()
Returns:boolean

is connection reserved for this Copy operation?