...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
(EXPERIMENTAL) A type-erased connection to a MySQL server.
Defined in header <boost/mysql/any_connection.hpp>
class any_connection
Name |
Description |
---|---|
The executor type associated to this object. |
Name |
Description |
---|---|
any_connection [constructor] |
Constructs a connection object from an executor and an optional
set of parameters. |
Cleanly 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. |
|
Checks whether the server is alive. |
|
Prepares a statement server-side. |
|
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.
|
|
Runs a set of pipelined requests. |
|
Sets the connection's character set, as per SET NAMES. |
|
Starts a SQL execution as a multi-function operation. |
|
Returns whether backslashes are being treated as escape sequences. |
|
Cleanly closes the connection to the server. |
|
Closes a statement, deallocating it from the server. |
|
Establishes a connection to a MySQL server. |
|
Returns the character set used by this connection. |
|
Executes a text query or prepared statement. |
|
Returns format options suitable to format SQL according to the current connection configuation. |
|
Retrieves the executor associated to this object. |
|
Returns the current metadata mode that this connection is using. |
|
Move assignment. |
|
Checks whether the server is alive. |
|
Prepares a statement server-side. |
|
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.
|
|
Runs a set of pipelined requests. |
|
Sets the connection's character set, as per SET NAMES. |
|
Sets the metadata mode. |
|
Starts a SQL execution as a multi-function operation. |
|
Returns whether the connection negotiated the use of SSL or not. |
|
~any_connection [destructor] |
Destructor. |
Represents a connection to a MySQL server. Compared to connection
, this class:
connect
and async_connect
handle hostname
resolution.
Provides a level of performance similar to connection
.
This is a move-only type.
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.
This part of the API is experimental, and may change in successive releases without previous notice.