StormByte C++ Library: Database module 0.0.9999
StormByte-Database is a StormByte library module for handling database connections
|
Row class for databases. More...
#include <row.hxx>
Public Types | |
using | NamedValue = std::pair< std::string, std::shared_ptr< Value > > |
Shortcut alias for pair. | |
using | Storage = std::vector< NamedValue > |
Shortcut alias for internal storage. | |
using | iterator = typename Storage::iterator |
Shortcut alias for iterator. | |
using | const_iterator = typename Storage::const_iterator |
Shortcut alias for const iterator. | |
Public Member Functions | |
Row () noexcept=default | |
Row (const Row &)=default | |
Row (Row &&) noexcept=default | |
Row & | operator= (const Row &)=default |
Row & | operator= (Row &&) noexcept=default |
virtual | ~Row () noexcept=default |
Value & | operator[] (const std::string &columnName) |
const Value & | operator[] (const std::string &columnName) const |
Value & | operator[] (const size_t &columnIndex) |
const Value & | operator[] (const size_t &columnIndex) const |
constexpr | operator bool () const noexcept |
iterator | begin () noexcept |
const_iterator | begin () const noexcept |
iterator | end () noexcept |
const_iterator | end () const noexcept |
std::span< NamedValue > | Values () noexcept |
std::span< const NamedValue > | Values () const noexcept |
void | Add (const std::string &columnName, std::unique_ptr< Value > &&value) |
constexpr size_t | Count () const noexcept |
Protected Attributes | |
Storage | m_values |
Row class for databases.
|
defaultnoexcept |
Constructor
|
default |
Copy Constructor
|
defaultnoexcept |
Move Constructor
|
virtualdefaultnoexcept |
Destructor
|
inline |
Adds a value to the row
columnName | column name |
value | value |
|
inlinenoexcept |
Gets a ConstIterator pointing to the first element
|
inlinenoexcept |
Gets an iterator pointing to the first element
|
inlineconstexprnoexcept |
Gets the number of columns
|
inlinenoexcept |
Gets a ConstIterator pointing to past last element
|
inlinenoexcept |
Gets an iterator pointing to past last element
|
inlineconstexprnoexcept |
Checks if result is empty
|
default |
Assignment operator
|
defaultnoexcept |
Move operator
|
inline |
Gets value for column by index
columnIndex | column index |
OutOfBounds | if index is out of bounds |
|
inline |
Gets value for column by index
columnIndex | column index |
OutOfBounds | if index is out of bounds |
|
inline |
Gets value for column by name
columnName | column name |
ColumnNotFound | if column is not found |
|
inline |
Gets value for column by name
columnName | column name |
ColumnNotFound | if column is not found |
|
inlinenoexcept |
Gets a span iterator pointing to the first element
|
inlinenoexcept |
Gets a span iterator pointing to the first element
|
protected |
Internal storage