A SQLite dynamically typed value object, aka "sqlite3_value". More...
#include <Value.h>
Public Member Functions | |
| value (const sqlite3_value *const value) | |
| Constructs a value object from a sqlite3_value object. More... | |
| value (const value &other) | |
| Copy constructor. More... | |
| value (value &&other) | |
| Move constructor. More... | |
| value & | operator= (const value &other) |
| Copy assignment operator. More... | |
| value & | operator= (value &&other) |
| Move assignment operator. More... | |
| sqlite3_value * | handle () const noexcept |
| Returns pointer to the underlying "sqlite3_value" object. | |
| int | as_int () const noexcept |
| Represents the value as an integer. More... | |
| int64_t | as_int64 () const noexcept |
| Represents the value as a 64-bit integer. More... | |
| unsigned int | as_uint () const noexcept |
| Represents the value as an unsigned integer. More... | |
| double | as_double () const noexcept |
| Represents the value as a double. More... | |
| const blob | as_blob () const noexcept |
| Represents the value as a blob object. More... | |
| const std::string | as_string () const noexcept |
| Represents the value as a string. More... | |
| const std::u16string | as_u16string () const noexcept |
| Represents the value as a UTF-16 string. More... | |
| int | bytes () const noexcept |
| Returns the size in bytes of the value. More... | |
| datatype | type () const noexcept |
| Returns the datatype for the initial datatype of the value. More... | |
A SQLite dynamically typed value object, aka "sqlite3_value".
value objects represent all values that can be stored in a database table. A value object may be either "protected" or "unprotected" which refers to whether or not a mutex is held. An internal mutex is held for a protected value object but not for an unprotected one. If SQLite is compiled to be single-threaded or if SQLite is run in one of reduced mutex modes then there is no distinction between protected and unprotected sqlite3_value objects. A value objects will always be "protected" as it stores a sqlite3_value objects created from calling the sqlite3_value_dup() interface which produces a "protected" "sqlite3_value" from an "unprotected" one. Only use a value object in the same thread as the SQL function that created it.
|
explicit |
| sqlite::value::value | ( | const value & | other | ) |
| sqlite::value::value | ( | value && | other | ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Returns the datatype for the initial datatype of the value.
Warning: Other interfaces might change the datatype for an value object. For example, if the datatype is initially sqlite::datatype::integer and as_string() is called to extract a text value for that integer, then subsequent calls to type() might return sqlite::datatype::text. Whether or not a persistent internal datatype conversion occurs is undefined and my change from one release of sqlite to the next.
1.8.6