COPY
class COPY (View source)
Fast import/export using COPY.
Constants
FROM_STDIN |
Start a COPY operation from STDIN to the PostgreSQL server. |
TO_STDOUT |
Start a COPY operation from the server to STDOUT. |
Properties
Connection read-only | $connection | The connection to the PostgreSQL server. |
|
string read-only | $expression | The expression of the COPY statement used to start the operation. |
|
int read-only | $direction | The drection of the COPY operation (pq\COPY::FROM_STDIN or pq\COPY::TO_STDOUT). |
|
string read-only | $options | Any additional options used to start the COPY operation. |
Methods
Start a COPY operation.
End the COPY operation to the server during pq\Result::COPY_IN state.
Receive data from the server during pq\Result::COPY_OUT state.
Send data to the server during pq\Result::COPY_IN state.
Details
__construct(Connection $conn, string $expression, int $direction, string $options = null)
Start a COPY operation.
end(string $error = null)
End the COPY operation to the server during pq\Result::COPY_IN state.
bool
get(string $data)
Receive data from the server during pq\Result::COPY_OUT state.
put(string $data)
Send data to the server during pq\Result::COPY_IN state.