|
ThinSQLite++
A thin, safe and convenient modern C++ wrapper for the SQLite API.
|
Dynamically Typed Value Object. More...
Public Member Functions | |
| ~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. | |
Static Public Member Functions | |
| static std::unique_ptr< value > | dup (const value *src) |
| Creates a new value by copying an original one. | |
| static std::unique_ptr< value > | dup (const std::unique_ptr< value > &src) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| static value * | from (sqlite3_value *obj) noexcept |
| Create fake pointer from the underlying SQLite one. | |
Dynamically Typed Value Object.
This is a fake wrapper class for sqlite3_value.
#include <thinsqlitepp/value.hpp>
|
inlinenoexcept |
Equivalent to sqlite3_value_free.
|
inlinestatic |
Creates a new value by copying an original one.
Equivalent to sqlite3_value_dup
| src | Original value. Can be nullptr |
|
noexcept |
Obtain value's content.
Wraps sqlite3_value_ function family. Unlike the C API you specify the desired type via T template parameter
| T | Desired output type. Must be one of:
|
|
inlinenoexcept |
Obtain a pointer stored in the value.
Wraps sqlite3_value_pointer function.
| type | the "type name" of the stored pointer. If nullptr the result of typeid(T).name() is used. |
|
inlinenoexcept |
Default datatype of the value.
Equivalent to sqlite3_value_type
|
inlinenoexcept |
|
inlinenoexcept |
Best numeric datatype of the value.
Equivalent to sqlite3_value_numeric_type
|
inlinenoexcept |
Whether the column is unchanged in an UPDATE against a virtual table.
Equivalent to sqlite3_value_nochange
|
inlinenoexcept |
Whether if value originated from a bound parameter.
Equivalent to sqlite3_value_frombind
|
inline |
Get first element on the right-hand side of an IN constraint.
Equivalent to sqlite3_vtab_in_first
|
inline |
Get next element on the right-hand side of an IN constraint.
Equivalent to sqlite3_vtab_in_next