#include "QueryResult.h"
◆ ResultSet() [1/2]
  167                                                                                                :
  172{
  175 
  177    {
  180    }
  181}
std::uint32_t uint32
Definition Define.h:107
Class used to access individual fields of database query result.
Definition Field.h:98
void SetMetadata(QueryResultFieldMetadata const *fieldMeta)
Definition Field.cpp:189
uint32 _fieldCount
Definition QueryResult.h:85
Field * _currentRow
Definition QueryResult.h:84
uint64 _rowCount
Definition QueryResult.h:83
MySQLField * _fields
Definition QueryResult.h:92
std::vector< QueryResultFieldMetadata > _fieldMetadata
Definition QueryResult.h:82
MySQLResult * _result
Definition QueryResult.h:91
References _currentRow, _fieldCount, _fieldMetadata, _fields, and Field::SetMetadata().
 
 
◆ ~ResultSet()
      
        
          | ResultSet::~ResultSet | ( |  | ) |  | 
      
 
  184{
  186}
void CleanUp()
Definition QueryResult.cpp:222
References CleanUp().
 
 
◆ ResultSet() [2/2]
  
  | 
        
          | ResultSet::ResultSet | ( | ResultSet const & | right | ) |  |  | privatedelete | 
 
 
◆ AssertRows()
  
  | 
        
          | void ResultSet::AssertRows | ( | std::size_t | sizeRows | ) |  |  | private | 
 
 
◆ begin()
  
  | 
        
          | auto ResultSet::begin | ( |  | ) |  |  | inline | 
 
Definition QueryResult.h:29
 
 
 
◆ CleanUp()
  
  | 
        
          | void ResultSet::CleanUp | ( |  | ) |  |  | private | 
 
 
◆ end()
  
  | 
        
          | static auto ResultSet::end | ( |  | ) |  |  | inlinestatic | 
 
 
◆ Fetch()
  
  | 
        
          | Field * ResultSet::Fetch | ( |  | ) | const |  | inline | 
 
 
◆ FetchTuple()
template<typename... Ts> 
  
  | 
        
          | std::tuple< Ts... > ResultSet::FetchTuple | ( |  | ) |  |  | inline | 
 
   64    {
   66 
   67        std::tuple<Ts...> theTuple = {};
   68 
   69        std::apply([this](Ts&... args)
   70        {
   73        }, theTuple);
   74 
   75        return theTuple;
   76    }
std::uint8_t uint8
Definition Define.h:109
std::enable_if_t< std::is_arithmetic_v< T >, T > Get() const
Definition Field.h:112
void AssertRows(std::size_t sizeRows)
Definition QueryResult.cpp:243
 
 
◆ GetFieldCount()
  
  | 
        
          | uint32 ResultSet::GetFieldCount | ( |  | ) | const |  | inline | 
 
 
◆ GetFieldName()
      
        
          | std::string ResultSet::GetFieldName | ( | uint32 | index | ) | const | 
      
 
 
◆ GetRowCount()
  
  | 
        
          | uint64 ResultSet::GetRowCount | ( |  | ) | const |  | inline | 
 
 
◆ NextRow()
      
        
          | bool ResultSet::NextRow | ( |  | ) |  | 
      
 
  189{
  190    MYSQL_ROW row;
  191 
  193        return false;
  194 
  195    row = mysql_fetch_row(
_result);
 
  196    if (!row)
  197    {
  199        return false;
  200    }
  201 
  202    unsigned long* lengths = mysql_fetch_lengths(
_result);
 
  203    if (!lengths)
  204    {
  205        LOG_WARN(
"sql.sql", 
"{}:mysql_fetch_lengths, cannot retrieve value lengths. Error {}.", __FUNCTION__, mysql_error(
_result->handle));
 
  207        return false;
  208    }
  209 
  211        _currentRow[i].SetStructuredValue(row[i], lengths[i]);
 
  212 
  213    return true;
  214}
#define LOG_WARN(filterType__,...)
Definition Log.h:162
References _currentRow, _fieldCount, _result, CleanUp(), and LOG_WARN.
Referenced by BasicStatementTask::Execute(), and DatabaseWorkerPool< T >::Query().
 
 
◆ operator=()
◆ operator[]()
      
        
          | Field const  & ResultSet::operator[] | ( | std::size_t | index | ) | const | 
      
 
 
◆ _currentRow
  
  | 
        
          | Field* ResultSet::_currentRow |  | protected | 
 
 
◆ _fieldCount
◆ _fieldMetadata
◆ _fields
◆ _result
◆ _rowCount
The documentation for this class was generated from the following files: