libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Database::SqliteValue Class Reference

A sqlite value. More...

#include <sqlitevalue.h>

Public Member Functions

 SqliteValue (sqlite3_value *value) noexcept
 Constructs an SqliteValue.
 
 SqliteValue (const SqliteValue &other) noexcept
 Constructs a SqliteValue via copy.
 
 SqliteValue (SqliteValue &&other) noexcept
 Constructs a SqliteValue via move.
 
 ~SqliteValue () noexcept
 Destructs the SqliteValue.
 
template<SupportedSqliteValue T>
as () const noexcept
 Gets the sqlite value as a specific type.
 
SqliteValueoperator= (const SqliteValue &other) noexcept
 Assigns a SqliteValue via copy.
 
SqliteValueoperator= (SqliteValue &&other) noexcept
 Assigns a SqliteValue via move.
 

Detailed Description

A sqlite value.

Constructor & Destructor Documentation

◆ SqliteValue() [1/3]

Nickvision::Database::SqliteValue::SqliteValue ( sqlite3_value * value)
noexcept

Constructs an SqliteValue.

Parameters
valuesqlite3_value*

◆ SqliteValue() [2/3]

Nickvision::Database::SqliteValue::SqliteValue ( const SqliteValue & other)
noexcept

Constructs a SqliteValue via copy.

Parameters
otherThe other SqliteValue to copy

◆ SqliteValue() [3/3]

Nickvision::Database::SqliteValue::SqliteValue ( SqliteValue && other)
noexcept

Constructs a SqliteValue via move.

Parameters
otherThe other SqliteValue to move

◆ ~SqliteValue()

Nickvision::Database::SqliteValue::~SqliteValue ( )
noexcept

Destructs the SqliteValue.

Member Function Documentation

◆ as()

template<SupportedSqliteValue T>
T Nickvision::Database::SqliteValue::as ( ) const
inlinenoexcept

Gets the sqlite value as a specific type.

Template Parameters
TThe type to get the sqlite value as (Can be: int, std::int64_t, double, bool, std::string)
Returns
The sqlite value as the specified type
A default value if the sqlite value is not of the specified type

◆ operator=() [1/2]

SqliteValue & Nickvision::Database::SqliteValue::operator= ( const SqliteValue & other)
noexcept

Assigns a SqliteValue via copy.

Parameters
otherThe other SqliteValue to copy

◆ operator=() [2/2]

SqliteValue & Nickvision::Database::SqliteValue::operator= ( SqliteValue && other)
noexcept

Assigns a SqliteValue via move.

Parameters
otherThe other SqliteValue to move

The documentation for this class was generated from the following file: