Contains result of SQL request.
More...
#include <SQLiteResult.h>
|
using | const_iterator = std::vector<std::unordered_map<std::string, std::string>>::const_iterator |
|
|
| SQLiteResult (std::vector< std::unordered_map< std::string, std::string > > &&rows) noexcept |
|
| SQLiteResult (const SQLiteResult &other)=default |
|
| SQLiteResult (SQLiteResult &&other) noexcept=default |
|
SQLiteResult & | operator= (const SQLiteResult &other)=default |
|
SQLiteResult & | operator= (SQLiteResult &&other) noexcept=default |
|
size_t | size () const |
| Number of rows.
|
|
bool | isEmpty () const |
| Is SQLiteResult has no rows.
|
|
std::unordered_map< std::string, std::string > & | operator[] (size_t index) |
| Access operator.
|
|
const std::unordered_map< std::string, std::string > & | operator[] (size_t index) const |
| Const access operator.
|
|
std::unordered_map< std::string, std::string > & | front () |
| Access to first row.
|
|
const std::unordered_map< std::string, std::string > & | front () const |
| Const access to first row.
|
|
std::unordered_map< std::string, std::string > & | back () |
| Access to last row.
|
|
const std::unordered_map< std::string, std::string > & | back () const |
| Const access to last row.
|
|
std::unordered_map< std::string, std::string > & | at (size_t index) |
| Access to row.
|
|
const std::unordered_map< std::string, std::string > & | at (size_t index) const |
| Const access to row.
|
|
std::string & | at (size_t index, const std::string &columnName) |
| Access to column in row.
|
|
const std::string & | at (size_t index, const std::string &columnName) const |
| Const access to column in row.
|
|
const_iterator | begin () const noexcept |
| Begin iterator.
|
|
const_iterator | end () const noexcept |
| End iterator.
|
|
Contains result of SQL request.
Contains all rows after SQL request
Definition at line 15 of file SQLiteResult.h.
◆ const_iterator
using framework::sqlite::utility::SQLiteResult::const_iterator = std::vector<std::unordered_map<std::string, std::string>>::const_iterator |
◆ at() [1/4]
unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::at |
( |
size_t | index | ) |
|
Access to row.
- Parameters
-
- Returns
- Row
- Exceptions
-
std::out_of_range | Wrong index |
Definition at line 57 of file SQLiteResult.cpp.
◆ at() [2/4]
const unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::at |
( |
size_t | index | ) |
const |
Const access to row.
- Parameters
-
- Returns
- Row
- Exceptions
-
std::out_of_range | Wrong index |
Definition at line 62 of file SQLiteResult.cpp.
◆ at() [3/4]
std::string & framework::sqlite::utility::SQLiteResult::at |
( |
size_t | index, |
|
|
const std::string & | columnName ) |
Access to column in row.
- Parameters
-
index | Row index |
columnName | Column name |
- Returns
- Value in column
- Exceptions
-
std::out_of_range | Wrong index |
◆ at() [4/4]
const std::string & framework::sqlite::utility::SQLiteResult::at |
( |
size_t | index, |
|
|
const std::string & | columnName ) const |
Const access to column in row.
- Parameters
-
index | Row index |
columnName | Column name |
- Returns
- Value in column
- Exceptions
-
std::out_of_range | Wrong index |
◆ back() [1/2]
unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::back |
( |
| ) |
|
Access to last row.
- Returns
- Last row
- Exceptions
-
Definition at line 47 of file SQLiteResult.cpp.
◆ back() [2/2]
const unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::back |
( |
| ) |
const |
Const access to last row.
- Returns
- Last row
- Exceptions
-
Definition at line 52 of file SQLiteResult.cpp.
◆ begin()
SQLiteResult::const_iterator framework::sqlite::utility::SQLiteResult::begin |
( |
| ) |
const |
|
noexcept |
Begin iterator.
- Returns
- Iterator to first row
Definition at line 77 of file SQLiteResult.cpp.
◆ end()
SQLiteResult::const_iterator framework::sqlite::utility::SQLiteResult::end |
( |
| ) |
const |
|
noexcept |
End iterator.
- Returns
- Iterator to row after last
Definition at line 82 of file SQLiteResult.cpp.
◆ front() [1/2]
unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::front |
( |
| ) |
|
Access to first row.
- Returns
- First row
- Exceptions
-
Definition at line 37 of file SQLiteResult.cpp.
◆ front() [2/2]
const unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::front |
( |
| ) |
const |
Const access to first row.
- Returns
- First row
- Exceptions
-
Definition at line 42 of file SQLiteResult.cpp.
◆ isEmpty()
bool framework::sqlite::utility::SQLiteResult::isEmpty |
( |
| ) |
const |
◆ operator[]() [1/2]
unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::operator[] |
( |
size_t | index | ) |
|
Access operator.
- Parameters
-
- Returns
- Column value
- Exceptions
-
std::out_of_range | Wrong index |
Definition at line 27 of file SQLiteResult.cpp.
◆ operator[]() [2/2]
const unordered_map< string, string > & framework::sqlite::utility::SQLiteResult::operator[] |
( |
size_t | index | ) |
const |
Const access operator.
- Parameters
-
- Returns
- Column value
- Exceptions
-
std::out_of_range | Wrong index |
Definition at line 32 of file SQLiteResult.cpp.
◆ size()
size_t framework::sqlite::utility::SQLiteResult::size |
( |
| ) |
const |
The documentation for this class was generated from the following files: