VSQLite++
0.3
Loading...
Searching...
No Matches
include
sqlite
ext
variant.hpp
Go to the documentation of this file.
1
/*##############################################################################
2
VSQLite++ - virtuosic bytes SQLite3 C++ wrapper
3
4
Copyright (c) 2012-2014 Vinzenz Feenstra vinzenz.feenstra@gmail.com
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without modification,
8
are permitted provided that the following conditions are met:
9
10
* Redistributions of source code must retain the above copyright notice,
11
this list of conditions and the following disclaimer.
12
* Redistributions in binary form must reproduce the above copyright notice,
13
this list of conditions and the following disclaimer in the documentation
14
and/or other materials provided with the distribution.
15
* Neither the name of virtuosic bytes nor the names of its contributors may
16
be used to endorse or promote products derived from this software without
17
specific prior written permission.
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
POSSIBILITY OF SUCH DAMAGE.
30
31
##############################################################################*/
32
#ifndef GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED
33
#define GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED
34
35
#include <cstdint>
36
#include <memory>
37
#include <string>
38
#include <variant>
39
#include <vector>
40
41
namespace
sqlite
{
42
inline
namespace
v2
{
43
44
enum
type
{
unknown
,
null
,
integer
,
real
,
text
,
blob
};
45
46
struct
unknown_t
{};
47
struct
null_t
{};
48
typedef
std::vector<std::uint8_t>
blob_t
;
49
typedef
std::shared_ptr<blob_t>
blob_ref_t
;
50
51
typedef
std::variant<unknown_t, int, std::int64_t, long double, std::string, null_t, blob_ref_t>
52
variant_t
;
53
}
// namespace v2
54
}
// namespace sqlite
55
56
#endif
// GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED
sqlite::v2
Definition
backup.hpp:18
sqlite::v2::blob_ref_t
std::shared_ptr< blob_t > blob_ref_t
Definition
variant.hpp:49
sqlite::v2::type
type
Definition
variant.hpp:44
sqlite::v2::blob
@ blob
Definition
variant.hpp:44
sqlite::v2::real
@ real
Definition
variant.hpp:44
sqlite::v2::integer
@ integer
Definition
variant.hpp:44
sqlite::v2::text
@ text
Definition
variant.hpp:44
sqlite::v2::unknown
@ unknown
Definition
variant.hpp:44
sqlite::v2::null
@ null
Definition
variant.hpp:44
sqlite::v2::variant_t
std::variant< unknown_t, int, std::int64_t, long double, std::string, null_t, blob_ref_t > variant_t
Definition
variant.hpp:52
sqlite::v2::blob_t
std::vector< std::uint8_t > blob_t
Definition
variant.hpp:48
sqlite
Definition
backup.hpp:17
sqlite::null_t
Definition
variant.hpp:47
sqlite::unknown_t
Definition
variant.hpp:46
Generated by
1.15.0