WORM 0.2
A C++ DAL/ORM code generation framework
|
00001 /* 00002 WORM - a DAL/ORM code generation framework 00003 Copyright (C) 2011 Erik Winn <erikwinnmail@yahoo.com> 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 3 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, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #include "wmysqlresult.h" 00020 #include "wmysqldriver.h" 00021 namespace WSql 00022 { 00023 00035 WMysqlResult::WMysqlResult( const WSql::WSqlDriver* driver ): WSqlResult( driver ) 00036 { 00037 _mysqlResult=0; 00038 } 00039 00040 // WMysqlResult::WMysqlResult( const WMysqlResult& other ) 00041 // { 00042 // 00043 // } 00044 00045 WMysqlResult::~WMysqlResult() 00046 { 00047 freegetResult(); 00048 } 00049 00050 // WMysqlResult& WMysqlResult::operator=( const WMysqlResult & other ) 00051 // { 00052 // ///!\todo 00053 // return *this; 00054 // } 00055 // 00056 // bool WMysqlResult::operator==( const WMysqlResult& other ) const 00057 // { 00058 // ///!\todo return ...; 00059 // } 00060 00061 void WMysqlResult::freegetResult() 00062 { 00063 mysql_free_result(_mysqlResult); 00064 } 00065 00066 WSqlRecord WMysqlResult::current() 00067 { 00068 if(_isCached) 00069 return WSql::WSqlResult::current(); 00070 } 00071 00072 WSqlRecord WMysqlResult::fetch( int i ) 00073 { 00074 if(_isCached) 00075 return WSql::WSqlResult::fetch( i ); 00076 } 00077 00078 WSqlRecord WMysqlResult::fetchFirst() 00079 { 00080 if(_isCached) 00081 return WSql::WSqlResult::fetchFirst(); 00082 } 00083 00084 WSqlRecord WMysqlResult::fetchLast() 00085 { 00086 if(_isCached) 00087 return WSql::WSqlResult::fetchLast(); 00088 } 00089 00090 WSqlRecord WMysqlResult::fetchNext() 00091 { 00092 if(_isCached) 00093 return WSql::WSqlResult::fetchNext(); 00094 } 00095 00096 WSqlRecord WMysqlResult::fetchPrevious() 00097 { 00098 if(_isCached) 00099 return WSql::WSqlResult::fetchPrevious(); 00100 } 00101 00102 bool WMysqlResult::first() 00103 { 00104 if(_isCached) 00105 return WSql::WSqlResult::first(); 00106 } 00107 00108 bool WMysqlResult::last() 00109 { 00110 if(_isCached) 00111 return WSql::WSqlResult::last(); 00112 } 00113 00114 bool WMysqlResult::next() 00115 { 00116 if(_isCached) 00117 return WSql::WSqlResult::next(); 00118 } 00119 00120 bool WMysqlResult::previous() 00121 { 00122 if(_isCached) 00123 return WSql::WSqlResult::previous(); 00124 } 00125 00126 bool WMysqlResult::seek( int i, bool relative ) 00127 { 00128 if(_isCached) 00129 return WSql::WSqlResult::seek( i, relative ); 00130 } 00131 00132 } //namespace WSql