sqliteconnection_p.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 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 KEXIDB_SQLITECONN_P_H 00021 #define KEXIDB_SQLITECONN_P_H 00022 00023 #include <kexidb/connection_p.h> 00024 00025 #include "sqlite.h" 00026 00027 //for compatibility 00028 #ifdef _SQLITE3_H_ 00029 # define SQLITE3 00030 typedef sqlite3 sqlite_struct; 00031 # define sqlite_free sqlite3_free 00032 # define sqlite_close sqlite3_close 00033 # define sqlite_exec sqlite3_exec 00034 # define sqlite_last_insert_rowid sqlite3_last_insert_rowid 00035 # define sqlite_error_string sqlite3_last_insert_row_id 00036 # define sqlite_libversion sqlite3_libversion 00037 # define sqlite_libencoding sqlite3_libencoding 00038 #else 00039 # ifndef SQLITE2 00040 # define SQLITE2 00041 # endif 00042 typedef struct sqlite sqlite_struct; 00043 # define sqlite_free sqlite_freemem 00044 #endif 00045 00046 namespace KexiDB 00047 { 00048 00050 class SQLiteConnectionInternal : public ConnectionInternal 00051 { 00052 public: 00053 SQLiteConnectionInternal(Connection* connection); 00054 virtual ~SQLiteConnectionInternal(); 00055 00057 virtual void storeResult(); 00058 00059 sqlite_struct *data; 00060 bool data_owned; 00061 QString errmsg; //<! server-specific message of last operation 00062 char *errmsg_p; //<! temporary: server-specific message of last operation 00063 int res; //<! result code of last operation on server 00064 00065 QCString temp_st; 00066 #ifdef SQLITE3 00067 const char *result_name; 00068 #endif 00069 }; 00070 00071 } 00072 00073 #endif
