![]() |
|
|||
Warning, file /include/boost/mysql/connect_params.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // 0002 // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com) 0003 // 0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying 0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0006 // 0007 0008 #ifndef BOOST_MYSQL_CONNECT_PARAMS_HPP 0009 #define BOOST_MYSQL_CONNECT_PARAMS_HPP 0010 0011 #include <boost/mysql/any_address.hpp> 0012 #include <boost/mysql/ssl_mode.hpp> 0013 #include <boost/mysql/string_view.hpp> 0014 0015 #include <cstdint> 0016 #include <string> 0017 0018 namespace boost { 0019 namespace mysql { 0020 0021 /** 0022 * \brief (EXPERIMENTAL) Parameters to be used with \ref any_connection connect functions. 0023 * \details 0024 * To be passed to \ref any_connection::connect and \ref any_connection::async_connect. 0025 * Includes the server address and MySQL handshake parameters. 0026 * \n 0027 * Contrary to \ref handshake_params, this is an owning type. 0028 * 0029 * \par Experimental 0030 * This part of the API is experimental, and may change in successive 0031 * releases without previous notice. 0032 */ 0033 struct connect_params 0034 { 0035 /** 0036 * \brief Determines how to establish a physical connection to the MySQL server. 0037 * \details 0038 * This can be either a host and port or a UNIX socket path. 0039 * Defaults to (localhost, 3306). 0040 */ 0041 any_address server_address; 0042 0043 /// User name to authenticate as. 0044 std::string username; 0045 0046 /// Password for that username, possibly empty. 0047 std::string password; 0048 0049 /// Database name to use, or empty string for no database (this is the default). 0050 std::string database; 0051 0052 /** 0053 * \brief The ID of the collation to use for the connection. 0054 * \details Impacts how text queries and prepared statements are interpreted. Defaults to 0055 * `utf8mb4_general_ci`, which is compatible with MySQL 5.x, 8.x and MariaDB. 0056 */ 0057 std::uint16_t connection_collation{45}; 0058 0059 /** 0060 * \brief Controls whether to use TLS or not. 0061 * \details 0062 * See \ref ssl_mode for more information about the possible modes. 0063 * This option is only relevant when `server_address.type() == address_type::host_and_port`. 0064 * UNIX socket connections will never use TLS, regardless of this value. 0065 */ 0066 ssl_mode ssl{ssl_mode::enable}; 0067 0068 /** 0069 * \brief Whether to enable support for executing semicolon-separated text queries. 0070 * \details Disabled by default. 0071 */ 0072 bool multi_queries{false}; 0073 }; 0074 0075 } // namespace mysql 0076 } // namespace boost 0077 0078 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |