TnFXSQLDB_sqlite3.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                            SQLite3 Database Support                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005-2008 by Niall Douglas.   All Rights Reserved.              *
00007 *       NOTE THAT I DO NOT PERMIT ANY OF MY CODE TO BE PROMOTED TO THE GPL      *
00008 *********************************************************************************
00009 * This code is free software; you can redistribute it and/or modify it under    *
00010 * the terms of the GNU Library General Public License v2.1 as published by the  *
00011 * Free Software Foundation EXCEPT that clause 3 does not apply ie; you may not  *
00012 * "upgrade" this code to the GPL without my prior written permission.           *
00013 * Please consult the file "License_Addendum2.txt" accompanying this file.       *
00014 *                                                                               *
00015 * This code is distributed in the hope that it will be useful,                  *
00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                          *
00018 *********************************************************************************
00019 * $Id:                                                                          *
00020 ********************************************************************************/
00021 #if FX_SQLMODULE
00022 
00023 #ifndef TNFXSQLDB_SQLITE3_H
00024 #define TNFXSQLDB_SQLITE3_H
00025 
00026 #include "TnFXSQLDB.h"
00027 
00028 namespace FX {
00029 
00081 struct TnFXSQLDB_sqlite3Private;
00082 class FXSQLMODULEAPI TnFXSQLDB_sqlite3 : public TnFXSQLDB
00083 {
00084     TnFXSQLDB_sqlite3Private *p;
00085     TnFXSQLDB_sqlite3(const TnFXSQLDB_sqlite3 &);
00086     TnFXSQLDB_sqlite3 &operator=(const TnFXSQLDB_sqlite3 &);
00087     inline FXDLLLOCAL bool fxerrhsqlite3(int retcode, const char *file, const char *function, int lineno);
00088 public:
00089     static const FXString MyName;
00091     TnFXSQLDB_sqlite3(const FXString &dbpath, const FXString &user=FXString::nullStr(), const QHostAddress &host=QHOSTADDRESS_LOCALHOST, FXushort port=0);
00092     ~TnFXSQLDB_sqlite3();
00093 
00094     virtual const FXString &versionInfo() const;
00095 
00096     virtual void open(const FXString &password=FXString::nullStr());
00097     virtual void close();
00098     virtual TnFXSQLDBStatementRef prepare(const FXString &text);
00099 
00100     void FXDLLLOCAL int_throwSQLite3Error(int errcode, const char *file, const char *function, int lineno);
00101     void FXDLLLOCAL int_waitOnSQLite3File();
00102 };
00103 
00104 
00105 }
00106 
00107 #endif
00108 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:26 2009 for TnFOX by doxygen v1.4.7