Dynamically Typed Value Object.
More...
|
| | ~value () noexcept |
| | Equivalent to sqlite3_value_free.
|
| |
| template<class T > |
| T | get () const noexcept |
| | Obtain value's content.
|
| |
| template<class T > |
| T | get (const char *type=nullptr) const noexcept |
| | Obtain a pointer stored in the value.
|
| |
| int | type () const noexcept |
| | Default datatype of the value.
|
| |
| unsigned | subtype () const noexcept |
| | Subtype of the value.
|
| |
| int | numeric_type () const noexcept |
| | Best numeric datatype of the value.
|
| |
| bool | nochange () const noexcept |
| | Whether the column is unchanged in an UPDATE against a virtual table.
|
| |
| bool | frombind () const noexcept |
| | Whether if value originated from a bound parameter
|
| |
| value * | in_first () const |
| | Get first element on the right-hand side of an IN constraint.
|
| |
| value * | in_next () const |
| | Get next element on the right-hand side of an IN constraint.
|
| |
|
void | operator delete (void *) noexcept |
| | Operator delete for a fake pointer is no-op.
|
| |
|
sqlite3_value * | c_ptr () const noexcept |
| | Access the real underlying SQLite type.
|
| |
Dynamically Typed Value Object.
This is a fake wrapper class for sqlite3_value.
#include <thinsqlitepp/value.hpp>
◆ ~value()
◆ dup()
Creates a new value by copying an original one.
Equivalent to sqlite3_value_dup
- Since
- SQLite 3.18
- Parameters
-
| src | Original value. Can be nullptr |
- Returns
- A new value object which is a copy of the original or nullptr if the original is nullptr
◆ get() [1/2]
Obtain value's content.
Wraps sqlite3_value_ function family. Unlike the C API you specify the desired type via T template parameter
- Template Parameters
-
| T | Desired output type. Must be one of:
|
◆ get() [2/2]
template<class T >
| T get |
( |
const char * | type = nullptr | ) |
const |
|
inlinenoexcept |
Obtain a pointer stored in the value.
Wraps sqlite3_value_pointer function.
- Parameters
-
| type | the "type name" of the stored pointer. If nullptr the result of typeid(T).name() is used. |
- See also
-
- Since
- SQLite 3.20
◆ type()
◆ subtype()
| unsigned subtype |
( |
| ) |
const |
|
inlinenoexcept |
◆ numeric_type()
| int numeric_type |
( |
| ) |
const |
|
inlinenoexcept |
◆ nochange()
Whether the column is unchanged in an UPDATE against a virtual table.
Equivalent to sqlite3_value_nochange
- Since
- SQLite 3.22
◆ frombind()
◆ in_first()
| value * in_first |
( |
| ) |
const |
|
inline |
◆ in_next()
| value * in_next |
( |
| ) |
const |
|
inline |