![]() |
Home | Libraries | People | FAQ | More |
Describes how pooled connections manage their character set.
Defined in header <boost/mysql/pool_params.hpp>
class pool_charset_strategy;
|
Name |
Description |
|---|---|
|
pool_charset_strategy [constructor] |
Default constructor, equivalent to |
|
Retrieves the server's default character set. |
|
|
Retrieves the kind of strategy represented by this object. |
|
Name |
Description |
|---|---|
|
Creates a strategy that makes pooled connections use |
|
|
Creates a strategy that makes pooled connections use the server's default character set. |
This is a lightweight variant-like type that determines how connections in
a pool set its character set and restore it when they are returned to the
pool. Create instances using the set_to_utf8mb4 and use_server_default factory functions.
set_to_utf8mb4 (the default),
connections are established using a collation ID of utf8mb4_general_ci,
and a SET NAMES
statement is issued after returning them to the pool and resetting them.
The character set is always known and equal to utf8mb4.
use_server_default, connections
are established using invalid_collation_id as collation
ID, causing them to use the server's default. No SET
NAMES statement is issued after
resetting the connections, causing them again to use the server's default.
When using this value, you must provide the server's default character
set as an argument, and it must match what is actually configured in
the server (no runtime check is performed). This option should only be
used as an optimization, and if you know what you are doing.
Convenience header <boost/mysql.hpp>