[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:
megamage
2009-06-01 21:52:17 -05:00
parent b05ebfa8e9
commit 7344a5ef6f
11 changed files with 164 additions and 70 deletions

View File

@@ -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()