MySQL
9.1.0
Source Code Documentation
field.h
Go to the documentation of this file.
1
// Copyright (c) 2024, Oracle and/or its affiliates.
2
//
3
// This program is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License, version 2.0,
5
// as published by the Free Software Foundation.
6
//
7
// This program is designed to work with certain software (including
8
// but not limited to OpenSSL) that is licensed under separate terms,
9
// as designated in a particular file or component or in included license
10
// documentation. The authors of MySQL hereby grant you an additional
11
// permission to link the program and your derivative works with the
12
// separately licensed software that they have either included with
13
// the program or referenced in the documentation.
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
#ifndef MYSQL_ABI_HELPERS_FIELD_H
25
#define MYSQL_ABI_HELPERS_FIELD_H
26
27
/// @file
28
/// Experimental API header
29
30
#include <cstdlib>
// std::size_t
31
32
/// @addtogroup GroupLibsMysqlAbiHelpers
33
/// @{
34
35
namespace
mysql::abi_helpers
{
36
37
/// A type code and a value that is either a 64 bit integer, a boolean, or a
38
/// bounded-length string.
39
template
<
class
Type_enum_tp>
40
requires
requires
{ std::is_enum_v<Type_enum_tp>; }
41
class
Field
{
42
public
:
43
using
Type_enum_t
= Type_enum_tp;
44
45
/// @brief The type of the field
46
Type_enum_t
m_type
;
47
48
/// @brief The data of the field
49
union
{
50
long
long
m_int
;
51
bool
m_bool
;
52
char
*
m_string
;
53
}
m_data
;
54
};
55
56
}
// namespace mysql::abi_helpers
57
58
// addtogroup GroupLibsMysqlAbiHelpers
59
/// @}
60
61
#endif
// ifndef MYSQL_ABI_HELPERS_FIELD_H
mysql::abi_helpers::Field
A type code and a value that is either a 64 bit integer, a boolean, or a bounded-length string.
Definition:
field.h:41
mysql::abi_helpers::Field::m_data
union mysql::abi_helpers::Field::@11 m_data
The data of the field.
mysql::abi_helpers::Field::m_string
char * m_string
Definition:
field.h:52
mysql::abi_helpers::Field::m_type
Type_enum_t m_type
The type of the field.
Definition:
field.h:46
mysql::abi_helpers::Field::Type_enum_t
Type_enum_tp Type_enum_t
Definition:
field.h:43
mysql::abi_helpers::Field::m_bool
bool m_bool
Definition:
field.h:51
mysql::abi_helpers::Field::m_int
long long m_int
Definition:
field.h:50
mysql::abi_helpers
Definition:
array_view.h:42
libs
mysql
abi_helpers
field.h
Generated by
1.9.2