Kexi API Documentation (2.0 alpha)

mysqlconnection_p.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Martin Ellis <martin.ellis@kdemail.net>
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 KEXIDB_MYSQLCLIENT_P_H
00021 #define KEXIDB_MYSQLCLIENT_P_H
00022 
00023 #include <kexidb/connection_p.h>
00024 
00025 #ifdef Q_WS_WIN
00026 #include <my_global.h>
00027 #endif
00028 #include <mysql_version.h>
00029 #include <mysql.h>
00030 
00031 typedef struct st_mysql MYSQL;
00032 #undef bool
00033 
00034 class QCString;
00035 class QString;
00036 
00037 #ifdef MYSQLMIGRATE_H
00038 #define NAMESPACE KexiMigration
00039 #else
00040 #define NAMESPACE KexiDB
00041 #endif
00042 
00043 namespace KexiDB {
00044     class ConnectionData;
00045 }
00046 
00047 namespace NAMESPACE {
00048 
00050 
00054 class MySqlConnectionInternal : public KexiDB::ConnectionInternal
00055 {
00056     public:
00057         MySqlConnectionInternal(KexiDB::Connection* connection);
00058         virtual ~MySqlConnectionInternal();
00059 
00061         bool db_connect(const KexiDB::ConnectionData& data);
00062 
00064         bool db_disconnect();
00065 
00067         bool useDatabase(const QString &dbName = QString::null);
00068         
00070         bool executeSQL( const QString& statement );
00071 
00073         virtual void storeResult();
00074 
00076         QString escapeIdentifier(const QString& str) const;
00077 
00078         MYSQL *mysql;
00079         bool mysql_owned; 
00080         QString errmsg; 
00081         int res; 
00082 };
00083 
00084 
00086 
00087 class MySqlCursorData : public MySqlConnectionInternal
00088 {
00089     public:
00090         MySqlCursorData(KexiDB::Connection* connection);
00091         virtual ~MySqlCursorData();
00092 
00093         MYSQL_RES *mysqlres;
00094         MYSQL_ROW mysqlrow;
00095         unsigned long *lengths;
00096         unsigned long numRows;
00097 };
00098 
00099 }
00100 
00101 #endif
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:48:45 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003