pqdataprovider.h

Go to the documentation of this file.
00001 /*
00002  *  The Mana World Server
00003  *  Copyright 2004 The Mana World Development Team
00004  *
00005  *  This file is part of The Mana World.
00006  *
00007  *  The Mana World  is free software; you can redistribute  it and/or modify it
00008  *  under the terms of the GNU General  Public License as published by the Free
00009  *  Software Foundation; either version 2 of the License, or any later version.
00010  *
00011  *  The Mana  World is  distributed in  the hope  that it  will be  useful, but
00012  *  WITHOUT ANY WARRANTY; without even  the implied warranty of MERCHANTABILITY
00013  *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00014  *  more details.
00015  *
00016  *  You should  have received a  copy of the  GNU General Public  License along
00017  *  with The Mana  World; if not, write to the  Free Software Foundation, Inc.,
00018  *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00019  *
00020  *  $Id: pqdataprovider.h 2475 2006-07-27 17:20:22Z gmelquio $
00021  */
00022 
00023 
00024 #ifndef _TMWSERV_PQDATAPROVIDER_H_
00025 #define _TMWSERV_PQDATAPROVIDER_H_
00026 
00027 
00028 #include <iosfwd>
00029 #include <libpq-fe.h>
00030 
00031 #include "dataprovider.h"
00032 
00033 namespace dal
00034 {
00035 
00036 
00040 class PqDataProvider: public DataProvider
00041 {
00042     public:
00046         PqDataProvider(void)
00047             throw();
00048 
00049 
00053         ~PqDataProvider(void)
00054             throw();
00055 
00056 
00062         DbBackends
00063         getDbBackend(void) const
00064             throw();
00065 
00066 
00076         void
00077         connect(const std::string& dbName,
00078                 const std::string& userName,
00079                 const std::string& password);
00080 
00081 
00093         const RecordSet&
00094         execSql(const std::string& sql,
00095                 const bool refresh = false);
00096 
00097 
00103         void
00104         disconnect(void);
00105 
00106 
00107     private:
00108         PGconn *mDb; 
00109 };
00110 
00111 
00112 } // namespace dal
00113 
00114 #endif // _TMWSERV_PQDATAPROVIDER_H_

Generated on Fri Mar 30 15:39:16 2007 for TMW Server by  doxygen 1.3.9.1