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

Row class for databases. More...

#include <row.hxx>

Inheritance diagram for StormByte::Database::Row:
Inheritance graph
[legend]
Collaboration diagram for StormByte::Database::Row:
Collaboration graph
[legend]

Public Member Functions

 Row () noexcept=default
 Default Constructor.
 
 Row (const Row &other)=default
 Copy Constructor.
 
 Row (Row &&other) noexcept=default
 Move Constructor.
 
 ~Row () noexcept override=default
 Destructor.
 
Rowoperator= (const Row &other)=default
 Copy Assignment Operator.
 
Rowoperator= (Row &&other) noexcept=default
 Move Assignment Operator.
 
const Valueoperator[] (const std::string &columnName) const &
 Gets the value for the specified column name.
 
Valueoperator[] (const std::string &columnName) &
 Gets the value for the specified column name.
 
Value operator[] (const std::string &columnName) &&
 Gets the value for the specified column name (rvalue)
 
void add (std::string &&columnName, Value &&value)
 Adds a value to the Row.
 
std::size_t Count () const noexcept
 Gets number of columns in the Row.
 

Detailed Description

Row class for databases.

Constructor & Destructor Documentation

◆ Row() [1/2]

StormByte::Database::Row::Row ( const Row other)
default

Copy Constructor.

Parameters
otherOther Row to copy from

◆ Row() [2/2]

StormByte::Database::Row::Row ( Row &&  other)
defaultnoexcept

Move Constructor.

Parameters
otherOther Row to move from

Member Function Documentation

◆ add()

void StormByte::Database::Row::add ( std::string &&  columnName,
Value &&  value 
)
inline

Adds a value to the Row.

Parameters
columnNameOptional name of the column
valueValue to add

◆ Count()

std::size_t StormByte::Database::Row::Count ( ) const
inlinenoexcept

Gets number of columns in the Row.

Returns
Number of columns in the Row

◆ operator=() [1/2]

Row & StormByte::Database::Row::operator= ( const Row other)
default

Copy Assignment Operator.

Parameters
otherOther Row to copy from
Returns
Reference to this Row

◆ operator=() [2/2]

Row & StormByte::Database::Row::operator= ( Row &&  other)
defaultnoexcept

Move Assignment Operator.

Parameters
otherOther Row to move from
Returns
Reference to this Row

◆ operator[]() [1/3]

Value & StormByte::Database::Row::operator[] ( const std::string &  columnName) &

Gets the value for the specified column name.

Parameters
columnNameName of the column
Returns
Reference to the Value for the specified column name
Exceptions
ColumnNotFoundif the column name does not exist

◆ operator[]() [2/3]

Value StormByte::Database::Row::operator[] ( const std::string &  columnName) &&

Gets the value for the specified column name (rvalue)

Parameters
columnNameName of the column
Returns
Value for the specified column name
Exceptions
ColumnNotFoundif the column name does not exist

◆ operator[]() [3/3]

const Value & StormByte::Database::Row::operator[] ( const std::string &  columnName) const &

Gets the value for the specified column name.

Parameters
columnNameName of the column
Returns
Reference to the Value for the specified column name
Exceptions
ColumnNotFoundif the column name does not exist

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