StormByte C++ Library: Database module 0.0.9999
StormByte-Database is a StormByte library module for handling database connections
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
StormByte::Database::Value Class Reference

Value class for databases. More...

#include <value.hxx>

Inheritance diagram for StormByte::Database::Value:
Inheritance graph
[legend]

Public Types

enum class  Type : unsigned short {
  Null = 0 , Integer , UnsignedInteger , LongInteger ,
  UnsignedLongInteger , Double , Text , Blob ,
  Boolean
}
 Type of a value. More...
 

Public Member Functions

 Value (const Value &)=default
 
 Value (Value &&) noexcept=default
 
Valueoperator= (const Value &)=default
 
Valueoperator= (Value &&) noexcept=default
 
bool operator== (const Value &other) const noexcept
 
bool operator!= (const Value &other) const noexcept
 
virtual ~Value () noexcept=default
 
template<typename T >
requires StormByte::Type::VariantHasType<ValuesVariant, std::decay_t<T>>
std::decay_t< T > Get () const
 
Type Type () const noexcept
 
bool IsNull () const noexcept
 
 Value (int value) noexcept
 
 Value (unsigned int value) noexcept
 
 Value (long int value) noexcept
 
 Value (unsigned long int value) noexcept
 
 Value (double value) noexcept
 
 Value (const std::string &value) noexcept
 
 Value (std::string &&value) noexcept
 
 Value (const char *value) noexcept
 
 Value (const std::vector< std::byte > &value) noexcept
 
 Value (std::vector< std::byte > &&value) noexcept
 
 Value (bool value) noexcept
 

Detailed Description

Value class for databases.

Member Enumeration Documentation

◆ Type

enum class StormByte::Database::Value::Type : unsigned short
strong

Type of a value.

Enumerator
Null 

Null type.

Integer 

Integer type.

UnsignedInteger 

Unsigned integer type.

LongInteger 

Long Integer type.

UnsignedLongInteger 

Unsigned long integer type.

Double 

Double type.

Text 

Text type.

Blob 

Blob type.

Boolean 

Boolean type.

Constructor & Destructor Documentation

◆ Value() [1/3]

StormByte::Database::Value::Value ( )
inlinenoexcept

Constructors to different types

Parameters
valueValue to store

◆ Value() [2/3]

StormByte::Database::Value::Value ( const Value )
default

Copy Constructor

◆ Value() [3/3]

StormByte::Database::Value::Value ( Value &&  )
defaultnoexcept

Move Constructor

◆ ~Value()

virtual StormByte::Database::Value::~Value ( )
virtualdefaultnoexcept

Destructor

Member Function Documentation

◆ IsNull()

bool StormByte::Database::Value::IsNull ( ) const
inlinenoexcept

Checks if the value is null

Returns
true if the value is null, false otherwise

◆ operator!=()

bool StormByte::Database::Value::operator!= ( const Value other) const
inlinenoexcept

Inequality operator

Parameters
otherOther Value to compare with
Returns
True if the values are not equal, false otherwise

◆ operator=() [1/2]

Value & StormByte::Database::Value::operator= ( const Value )
default

Assignment operator

◆ operator=() [2/2]

Value & StormByte::Database::Value::operator= ( Value &&  )
defaultnoexcept

Move operator

◆ operator==()

bool StormByte::Database::Value::operator== ( const Value other) const
inlinenoexcept

Equality operator

Parameters
otherOther Value to compare with
Returns
True if the values are equal, false otherwise

◆ Type()

Type StormByte::Database::Value::Type ( ) const
inlinenoexcept

Gets the type of the value

Returns
Type

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