![]() |
TrinityCore
|
#include <QueryResult.h>
Public Member Functions | |
| PreparedResultSet (MySQLStmt *stmt, MySQLResult *result, uint64 rowCount, uint32 fieldCount) | |
| ~PreparedResultSet () | |
| bool | NextRow () |
| uint64 | GetRowCount () const |
| uint32 | GetFieldCount () const |
| Field * | Fetch () const |
| Field const & | operator[] (std::size_t index) const |
| Field const & | operator[] (Trinity::DB::FieldLookupByAliasKey const &alias) const |
| QueryResultFieldMetadata const & | GetFieldMetadata (std::size_t index) const |
| QueryResultFieldMetadata const & | GetFieldMetadata (Trinity::DB::FieldLookupByAliasKey const &alias) const |
Protected Attributes | |
| std::vector< QueryResultFieldMetadata > | m_fieldMetadata |
| Trinity::DB::FieldAliasToIndexMap | m_fieldIndexByAlias |
| std::vector< Field > | m_rows |
| uint64 | m_rowCount |
| uint64 | m_rowPosition |
| uint32 | m_fieldCount |
Private Member Functions | |
| void | CleanUp () |
| bool | _NextRow () |
| PreparedResultSet (PreparedResultSet const &right)=delete | |
| PreparedResultSet & | operator= (PreparedResultSet const &right)=delete |
Private Attributes | |
| MySQLBind * | m_rBind |
| MySQLStmt * | m_stmt |
| MySQLResult * | m_metadataResult |
| Field metadata, returned by mysql_stmt_result_metadata. | |
Definition at line 83 of file QueryResult.h.
| PreparedResultSet::PreparedResultSet | ( | MySQLStmt * | stmt, |
| MySQLResult * | result, | ||
| uint64 | rowCount, | ||
| uint32 | fieldCount | ||
| ) |
All data is buffered, let go of mysql c api structures
Definition at line 415 of file QueryResult.cpp.
References _NextRow(), ASSERT, CleanUp(), m_fieldCount, m_fieldIndexByAlias, m_fieldMetadata, m_metadataResult, m_rBind, m_rowCount, m_rowPosition, m_rows, m_stmt, Name, Trinity::DB::FieldLookupByAliasKey::RuntimeInit, and TC_LOG_WARN.
| PreparedResultSet::~PreparedResultSet | ( | ) |
Definition at line 556 of file QueryResult.cpp.
References CleanUp().
|
privatedelete |
|
private |
Only called in low-level code, namely the constructor Will iterate over every row of data and buffer it
Definition at line 597 of file QueryResult.cpp.
References m_rowCount, m_rowPosition, and m_stmt.
Referenced by PreparedResultSet().
|
private |
Definition at line 623 of file QueryResult.cpp.
References m_metadataResult, and m_rBind.
Referenced by PreparedResultSet(), and ~PreparedResultSet().
| Field * PreparedResultSet::Fetch | ( | ) | const |
Definition at line 662 of file QueryResult.cpp.
References ASSERT, m_fieldCount, m_rowCount, m_rowPosition, and m_rows.
Referenced by WorldSocket::HandleAuthContinuedSessionCallback().
|
inline |
Definition at line 91 of file QueryResult.h.
| QueryResultFieldMetadata const & PreparedResultSet::GetFieldMetadata | ( | std::size_t | index | ) | const |
Definition at line 683 of file QueryResult.cpp.
References ASSERT, m_fieldCount, and m_fieldMetadata.
| QueryResultFieldMetadata const & PreparedResultSet::GetFieldMetadata | ( | Trinity::DB::FieldLookupByAliasKey const & | alias | ) | const |
Definition at line 689 of file QueryResult.cpp.
References ASSERT, m_fieldIndexByAlias, and m_fieldMetadata.
|
inline |
Definition at line 90 of file QueryResult.h.
Referenced by PreparedStatementTask::Query(), and SQLQueryHolderBase::SetPreparedResult().
| bool PreparedResultSet::NextRow | ( | ) |
Only updates the m_rowPosition so upper level code knows in which element of the rows vector to look
Definition at line 587 of file QueryResult.cpp.
References m_rowCount, and m_rowPosition.
|
privatedelete |
| Field const & PreparedResultSet::operator[] | ( | std::size_t | index | ) | const |
Definition at line 668 of file QueryResult.cpp.
References ASSERT, m_fieldCount, m_rowCount, m_rowPosition, and m_rows.
| Field const & PreparedResultSet::operator[] | ( | Trinity::DB::FieldLookupByAliasKey const & | alias | ) | const |
Definition at line 675 of file QueryResult.cpp.
References ASSERT, m_fieldCount, m_fieldIndexByAlias, m_rowCount, m_rowPosition, and m_rows.
|
protected |
Definition at line 106 of file QueryResult.h.
Referenced by Fetch(), GetFieldMetadata(), operator[](), operator[](), and PreparedResultSet().
|
protected |
Definition at line 102 of file QueryResult.h.
Referenced by GetFieldMetadata(), operator[](), and PreparedResultSet().
|
protected |
Definition at line 101 of file QueryResult.h.
Referenced by GetFieldMetadata(), GetFieldMetadata(), and PreparedResultSet().
|
private |
Field metadata, returned by mysql_stmt_result_metadata.
Definition at line 111 of file QueryResult.h.
Referenced by CleanUp(), and PreparedResultSet().
|
private |
Definition at line 109 of file QueryResult.h.
Referenced by CleanUp(), and PreparedResultSet().
|
protected |
Definition at line 104 of file QueryResult.h.
Referenced by _NextRow(), Fetch(), NextRow(), operator[](), operator[](), and PreparedResultSet().
|
protected |
Definition at line 105 of file QueryResult.h.
Referenced by _NextRow(), Fetch(), NextRow(), operator[](), operator[](), and PreparedResultSet().
|
protected |
Definition at line 103 of file QueryResult.h.
Referenced by Fetch(), operator[](), operator[](), and PreparedResultSet().
|
private |
Definition at line 110 of file QueryResult.h.
Referenced by _NextRow(), and PreparedResultSet().