14#include <sl3/config.hpp>
15#include <sl3/error.hpp>
16#include <sl3/types.hpp>
47 explicit
Value (
int val) noexcept;
52 explicit
Value (int64_t val) noexcept;
62 explicit
Value (const
char* val);
67 explicit
Value (
double val) noexcept;
113 Value& operator= (const int64_t& val);
118 Value& operator= (const
double& val);
137 explicit operator
int () const;
144 explicit operator int64_t () const;
153 explicit operator
double () const;
160 explicit operator const
std::
string&() const;
167 explicit operator const
Blob&() const;
This class models the duck typing sqlite uses. It supports int, real, text, blob and null values.
Definition value.hpp:32
bool isNull() const noexcept
Check Null.
friend bool value_eq(const Value &a, const Value &b) noexcept
equality, ignoring type info
std::string ejectText()
Moves the current value into the return value.
Blob ejectBlob()
Moves the current value into the return value.
Value() noexcept
Constructor.
const std::string & text() const
Access the value.
friend bool value_lt(const Value &a, const Value &b) noexcept
less than, ignoring type info
friend bool value_type_lt(const Value &a, const Value &b) noexcept
less than, including type info
void swap(Value &other) noexcept
swap function
void setNull() noexcept
Set to NULL.
const int64_t & int64() const
Access the value.
const double & real() const
Access the value.
const Blob & blob() const
Access the value.
friend bool value_type_eq(const Value &a, const Value &b) noexcept
equality, including type info
Type getType() const noexcept
The Type of the value.
Namespace of libSL3.
Definition columns.hpp:18
bool value_eq(const Value &a, const Value &b) noexcept
equality, ignoring type info
bool value_type_eq(const Value &a, const Value &b) noexcept
equality, including type info
std::vector< std::byte > Blob
Definition types.hpp:90
Type
Definition types.hpp:30
@ Null
Null, no value.
Definition types.hpp:31
LIBSL3_API std::ostream & operator<<(std::ostream &stm, const sl3::DbValue &v)
Stream op for a DbValue.
bool value_lt(const Value &a, const Value &b) noexcept
less than, ignoring type info
void swap(DbValues &a, DbValues &b) noexcept
DbValue specialized swap function.
bool value_type_lt(const Value &a, const Value &b) noexcept
less than, including type info