Struct libpq::connection::Connection[][src]

pub struct Connection { /* fields omitted */ }

Implementations

Submits a command to the server without waiting for the result(s).

See PQsendQuery.

Submits a command and separate parameters to the server without waiting for the result(s).

See PQsendQueryParams.

Sends a request to create a prepared statement with the given parameters, without waiting for completion.

See PQsendPrepare.

Sends a request to execute a prepared statement with given parameters, without waiting for the result(s).

See PQsendQueryPrepared.

Submits a request to obtain information about the specified prepared statement, without waiting for completion.

See PQsendDescribePortal.

Submits a request to obtain information about the specified portal, without waiting for completion.

See PQsendDescribePortal.

Waits for the next result a prior send_* call, and returns it.

See PQgetResult.

If input is available from the server, consume it.

See PQconsumeInput.

Returns true if a command is busy, that is, Result would block waiting for input.

See PQisBusy.

Sets the nonblocking status of the connection.

See PQsetnonblocking.

Returns the blocking status of the database connection.

See PQisnonblocking.

Attempts to flush any queued output data to the server.

See PQflush.

Creates a data structure containing the information needed to cancel a command issued through a particular database connection.

See PQgetCancel.

Makes a new connection to the database server.

See PQconnectdb.

Makes a new connection to the database server.

See PQconnectdbParams.

Make a connection to the database server in a nonblocking manner.

See PQconnectStart.

Make a connection to the database server in a nonblocking manner.

See PQconnectStartParams.

Makes a new connection to the database server.

See PQsetdb.

Makes a new connection to the database server.

See PQsetdbLogin.

Resets the communication channel to the server.

See PQreset.

Reset the communication channel to the server, in a nonblocking manner.

See PQresetStart.

Reports the status of the server.

It accepts connection parameters identical to those of libpq::Connection::with_params. It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt.

See PQpingParams.

Reports the status of the server.

It accepts connection parameters identical to those of libpq::Connection::new. It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt.

See PQping.

Return the connection options used for the connection

See PQconninfo.

Returns the client encoding.

See PQclientEncoding.

Sets the client encoding.

See PQsetClientEncoding.

Determines the verbosity of messages returned by libpq::Connection::error_message and libpq::Result::error_message.

See PQsetErrorVerbosity.

Sends data to the server during libpq::Status::CopyIn state.

See PQputCopyData.

Sends end-of-data indication to the server during libpq::Status::CopyIn state.

See PQputCopyEnd.

Receives data from the server during libpq::Status::CopyOut state.

See PQgetCopyData.

Submits a command to the server and waits for the result.

See PQexec.

Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.

See PQexecParams.

Submits a request to create a prepared statement with the given parameters, and waits for completion.

See PQprepare.

Sends a request to execute a prepared statement with given parameters, and waits for the result.

See PQexecPrepared.

Submits a request to obtain information about the specified prepared statement, and waits for completion.

See PQdescribePrepared.

Submits a request to obtain information about the specified portal, and waits for completion.

See PQdescribePortal.

Escape a string for use within an SQL command.

See PQescapeLiteral.

Escapes a string for use as an SQL identifier, such as a table, column, or function name.

See PQescapeIdentifier.

Escape string literals, much like libpq::Connection::literal.

See PQescapeStringConn.

Escapes binary data for use within an SQL command with the type bytea.

See PQescapeByteaConn.

Safety

This function takes a void* pointer as argument.

Safety

This function takes a void* pointer as argument.

Returns the next notification from a list of unhandled notification messages received from the server.

Select single-row mode for the currently-executing query.

See PQsetSingleRowMode.

Allows applications to select which security libraries to initialize.

See PQinitOpenSSL.

Allows applications to select which security libraries to initialize.

See PQinitSSL.

Returns the database name of the connection.

See PQdb.

Returns the user name of the connection.

See PQuser.

Returns the password of the connection.

See PQpass.

Returns the server host name of the active connection.

This can be a host name, an IP address, or a directory path if the connection is via Unix socket. (The path case can be distinguished because it will always be an absolute path, beginning with /.)

See PQhost.

Returns the port of the active connection.

See PQport.

👎 Deprecated:

the server no longer pays attention to the TTY setting, but the function remains for backward compatibility.

Returns the debug TTY of the connection.

See PQtty.

Returns the command-line options passed in the connection request.

See PQoptions.

Returns the status of the connection.

See PQstatus.

Returns the current in-transaction status of the server.

See PQtransactionStatus.

Looks up a current parameter setting of the server.

See PQparameterStatus.

Interrogates the frontend/backend protocol being used.

See PQprotocolVersion.

Returns an integer representing the server version.

See PQserverVersion.

Returns the error message most recently generated by an operation on the connection.

See PQerrorMessage.

Obtains the file descriptor number of the connection socket to the server.

See PQsocket.

Returns the process ID (PID) of the backend process handling this connection.

See PQbackendPID.

Returns true if the connection authentication method required a password, but none was available. Returns false if not.

See PQconnectionNeedsPassword.

Returns true if the connection authentication method used a password. Returns false if not.

See PQconnectionUsedPassword.

Returns true if the connection uses SSL, false if not.

See PQsslInUse.

Returns SSL-related information about the connection.

See PQsslAttribute.

Return an array of SSL attribute names available.

See PQsslAttributeNames.

Return a pointer to an SSL-implementation-specific object describing the connection.

See PQsslStruct.

Safety

This function returns a void* pointer.

Returns the SSL structure used in the connection, or null if SSL is not in use.

See PQgetssl.

Safety

This function returns a void* pointer.

Returns the thread safety status of the libpq library.

See PQisthreadsafe.

Enables tracing of the client/server communication to a debugging file stream.

See PQtrace.

Disables tracing started by libpq::Connection::trace.

See PQuntrace.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.