![]() |
Home | Libraries | People | FAQ | More |
(Legacy) A connection to a MySQL server.
Defined in header <boost/mysql/connection.hpp>
template<
class Stream
>
class connection;
Name |
Description |
---|---|
The executor type associated to this object. |
|
Rebinds the connection type to another executor. |
|
The |
Name |
Description |
---|---|
Closes the connection to the server. |
|
Closes a statement, deallocating it from the server. |
|
Establishes a connection to a MySQL server. |
|
Executes a text query or prepared statement. |
|
Performs the MySQL-level handshake. |
|
Checks whether the server is alive. |
|
Prepares a statement server-side. |
|
Notifies the MySQL server that the client wants to end the session and shutdowns SSL. |
|
Reads metadata for subsequent resultsets in a multi-resultset operation. |
|
Reads a batch of rows. |
|
Resets server-side session state, like variables and prepared statements. |
|
Starts a SQL execution as a multi-function operation. |
|
Closes the connection to the server. |
|
Closes a statement, deallocating it from the server. |
|
Establishes a connection to a MySQL server. |
|
connection [constructor] |
Initializing constructor. |
Executes a text query or prepared statement. |
|
Retrieves the executor associated to this object. |
|
Performs the MySQL-level handshake. |
|
Returns the current metadata mode that this connection is using. |
|
Move assignment. |
|
Checks whether the server is alive. |
|
Prepares a statement server-side. |
|
Notifies the MySQL server that the client wants to end the session and shutdowns SSL. |
|
Reads metadata for subsequent resultsets in a multi-resultset operation. |
|
Reads a batch of rows. |
|
Resets server-side session state, like variables and prepared statements. |
|
Sets the metadata mode. |
|
Starts a SQL execution as a multi-function operation. |
|
Retrieves the underlying Stream object. |
|
Returns whether the connection negotiated the use of SSL or not. |
Represents a templated connection to a MySQL server.
connection
owns a Stream
object that is accessed by functions
involving network operations, as well as session state. You can access the
stream using connection::stream
, and its executor via connection::get_executor
.
The executor used by this object is always the same as the underlying stream.
At any given point in time, only one async operation can be outstanding per
connection. If an async operation is initiated while another one is in progress,
it will fail with client_errc::operation_in_progress
.
Distinct objects: safe.
Shared objects: unsafe.
This class is not thread-safe: for a single object, if you call its member functions concurrently from separate threads, you will get a race condition.
New code should use any_connection
instead of this class,
as it's simpler to use and provides the same level of performance.
Convenience header <boost/mysql.hpp>