mysqlpreparedstatement.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef MYSQLPREPAREDSTATEMENT_H 00021 #define MYSQLPREPAREDSTATEMENT_H 00022 00023 #include <kexidb/preparedstatement.h> 00024 #include "mysqlconnection_p.h" 00025 00026 //todo 1.1 - unfinished: #define KEXI_USE_MYSQL_STMT 00027 // for 1.0 we're using unoptimized version 00028 00029 namespace KexiDB 00030 { 00031 00033 class MySqlPreparedStatement : public PreparedStatement, public MySqlConnectionInternal 00034 { 00035 public: 00036 MySqlPreparedStatement(StatementType type, ConnectionInternal& conn, FieldList& fields); 00037 00038 virtual ~MySqlPreparedStatement(); 00039 00040 virtual bool execute(); 00041 00042 QCString m_tempStatementString; 00043 00044 #ifdef KEXI_USE_MYSQL_STMT 00045 int m_realParamCount; 00046 MYSQL_STMT *m_statement; 00047 MYSQL_BIND *m_mysqlBind; 00048 #endif 00049 bool m_resetRequired : 1; 00050 00051 protected: 00052 bool init(); 00053 void done(); 00054 }; 00055 } 00056 #endif
