From f60d534b73838c2f3c461b0086f6da02576697f3 Mon Sep 17 00:00:00 2001 From: click Date: Sat, 8 May 2010 05:03:32 +0200 Subject: Cleanup on some database-related files: merge some DB-related files, add some consistency to callhandles in sourcetree (M + combine MySQL-specific files into main database-files (click) + fix vcproj-files, adjust handler-function names for consistency (Machiavelli) --HG-- branch : trunk --- src/shared/Database/QueryResult.h | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/shared/Database/QueryResult.h') diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h index 5c380c0d5d1..4eec9915362 100644 --- a/src/shared/Database/QueryResult.h +++ b/src/shared/Database/QueryResult.h @@ -26,15 +26,21 @@ #include "Field.h" +#ifdef WIN32 +#define FD_SETSIZE 1024 +#include +#include +#else +#include +#endif + class QueryResult { public: - QueryResult(uint64 rowCount, uint32 fieldCount) - : mFieldCount(fieldCount), mRowCount(rowCount) {} - - virtual ~QueryResult() {} + QueryResult(MYSQL_RES *result, MYSQL_FIELD *fields, uint64 rowCount, uint32 fieldCount); + ~QueryResult(); - virtual bool NextRow() = 0; + bool NextRow(); Field *Fetch() const { return mCurrentRow; } @@ -47,6 +53,12 @@ class QueryResult Field *mCurrentRow; uint32 mFieldCount; uint64 mRowCount; + + private: + enum Field::DataTypes ConvertNativeType(enum_field_types mysqlType) const; + void EndQuery(); + MYSQL_RES *mResult; + }; typedef ACE_Refcounted_Auto_Ptr QueryResult_AutoPtr; -- cgit v1.2.3