mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7935] Move seldom used access to query data by field names to independent object.
This let not do preparation code for unused later functionlity.
This commit is contained in:
parent
626553c9ee
commit
c3c7187841
12 changed files with 165 additions and 71 deletions
|
|
@ -20,20 +20,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue