Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
handshake_params::handshake_params

Initializing constructor.

Synopsis
handshake_params(
    string_view username,
    string_view password,
    string_view db = "",
    std::uint16_t connection_col = default_collation,
    ssl_mode mode = ssl_mode::require,
    bool multi_queries = false);
Exception safety

No-throw guarantee.

Parameters

Name

Description

username

User name to authenticate as.

password

Password for that username, possibly empty.

db

Database name to use, or empty string for no database (this is the default).

connection_col

The ID of the collation to use for the connection. Impacts how text queries and prepared statements are interpreted. Defaults to utf8mb4_general_ci (see default_collation), which is compatible with MySQL 5.x, 8.x and MariaDB.

mode

The ssl_mode to use with this connection; ignored if the connection's Stream does not support SSL.

multi_queries

Whether to enable support for executing semicolon-separated queries using connection::execute and connection::start_execution. Disabled by default.


PrevUpHomeNext