mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
[7935] Move seldom used access to query data by field names to independent object. Author: VladimirMangos
This let not do preparation code for unused later functionlity. --HG-- branch : trunk
This commit is contained in:
@@ -22,20 +22,15 @@
|
||||
|
||||
#include "DatabaseEnv.h"
|
||||
|
||||
QueryResultMysql::QueryResultMysql(MYSQL_RES *result, uint64 rowCount, uint32 fieldCount) :
|
||||
QueryResult(rowCount, fieldCount), mResult(result)
|
||||
QueryResultMysql::QueryResultMysql(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount) :
|
||||
QueryResult(rowCount, fieldCount), mResult(result)
|
||||
{
|
||||
|
||||
mCurrentRow = new Field[mFieldCount];
|
||||
ASSERT(mCurrentRow);
|
||||
|
||||
MYSQL_FIELD *fields = mysql_fetch_fields(mResult);
|
||||
|
||||
for (uint32 i = 0; i < mFieldCount; i++)
|
||||
{
|
||||
mFieldNames[i] = fields[i].name;
|
||||
mCurrentRow[i].SetType(ConvertNativeType(fields[i].type));
|
||||
}
|
||||
}
|
||||
|
||||
QueryResultMysql::~QueryResultMysql()
|
||||
|
||||
Reference in New Issue
Block a user