00001 /* 00002 MyMySQL++ - Another MySQL++ API providing basic and easy access to MySQL functionality. 00003 Copyright (C) 2003 Stefan Schadt 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00027 #pragma once 00028 00029 #include "MyMySQLPPRow.h" 00030 #include "MyMySQLPPField.h" 00031 00032 class CMyMySQLPPResult 00033 { 00034 private: 00035 MYSQL_RES* m_res; 00036 public: 00037 CMyMySQLPPResult(void); 00038 ~CMyMySQLPPResult(void); 00039 void Free(void); 00040 MYSQL_RES* Detach(void); 00041 void Attach(MYSQL_RES* Result); 00042 MYSQL_ROW_OFFSET RowTell(void); 00043 MYSQL_ROW_OFFSET RowSeek(MYSQL_ROW_OFFSET Offset); 00044 void DataSeek(__int64 Offset); 00045 BOOL EndOfFile(void); 00046 unsigned int NumFields(void); 00047 __int64 NumRows(void); 00048 BOOL FetchRow(CMyMySQLPPRow* row); 00049 CMyMySQLPPRow FetchRow(void); 00050 BOOL FetchRow(CMyMySQLPPRow* row, __int64 offset); 00051 CMyMySQLPPRow FetchRow(__int64 offset); 00052 CMyMySQLPPRow operator[](__int64 offset); 00053 unsigned long* FetchLengths(void); 00054 BOOL FetchField(CMyMySQLPPField* field); 00055 CMyMySQLPPField FetchField(void); 00056 BOOL FetchField(CMyMySQLPPField* field, unsigned int fieldnr); 00057 CMyMySQLPPField FetchField(unsigned int fieldnr); 00058 MYSQL_FIELD_OFFSET FieldSeek(MYSQL_FIELD_OFFSET offset); 00059 MYSQL_FIELD_OFFSET FieldTell(void); 00060 };