MySQL 8.3.0
Source Code Documentation
multi_option.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2012, 2023, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is also distributed with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have included with MySQL.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23*/
24
25#include "mysql.h"
27#include "prealloced_array.h"
28
29#ifndef _MULTI_OPTION_H_
30#define _MULTI_OPTION_H_
31
32/**
33 Class for handling multiple options like e.g. --init-command,
34 --init-command-add
35*/
37 /**
38 Type of the internal container
39 */
41
42 public:
43 /**
44 Constaexpr constructor
45 */
47
48 /**
49 Adds option value to the container
50
51 @param value [in]: value of the option
52 @param clear [in]: if true the container will be cleared before adding the
53 command
54 */
55 void add_value(char *value, bool clear);
56
57 /**
58 Sets options to MYSQL structure.
59
60 @param mysql [in, out]: pointer to MYSQL structure to be augmented with the
61 option
62 @param option [in]: option to be set
63 */
65
66 /**
67 Free the commands
68 */
69 void free();
70
71 private:
72 /**
73 The internal container with values
74 */
76};
77
78#endif //_MULTI_OPTION_H_
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
Class for handling multiple options like e.g.
Definition: multi_option.h:36
void set_mysql_options(MYSQL *mysql, mysql_option option)
Sets options to MYSQL structure.
Definition: multi_option.cc:39
constexpr Multi_option()
Constaexpr constructor.
Definition: multi_option.h:46
void add_value(char *value, bool clear)
Adds option value to the container.
Definition: multi_option.cc:27
Multi_option_container * option_values
The internal container with values.
Definition: multi_option.h:75
void free()
Free the commands.
Definition: multi_option.cc:45
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
mysql_option
Definition: mysql.h:167
Definition: instrumented_condition_variable.h:31
static mysql_service_status_t clear(reference_caching_channel channel) noexcept
Definition: component.cc:145
Definition: mysql.h:297