mysqldataprovider.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: mysqldataprovider.h 2475 2006-07-27 17:20:22Z gmelquio $
00021  */
00022 
00023 
00024 #ifndef _TMWSERV_MYSQL_DATA_PROVIDER_H_
00025 #define _TMWSERV_MYSQL_DATA_PROVIDER_H_
00026 
00027 
00028 #include <iosfwd>
00029 
00030 #include <mysql/mysql.h>
00031 
00032 #include "dataprovider.h"
00033 
00034 namespace dal
00035 {
00036 
00037 
00041 class MySqlDataProvider: public DataProvider
00042 {
00043     public:
00047         MySqlDataProvider(void)
00048             throw();
00049 
00050 
00054         ~MySqlDataProvider(void)
00055             throw();
00056 
00057 
00063         DbBackends
00064         getDbBackend(void) const
00065             throw();
00066 
00067 
00077         void
00078         connect(const std::string& dbName,
00079                 const std::string& userName,
00080                 const std::string& password);
00081 
00082 
00094         const RecordSet&
00095         execSql(const std::string& sql,
00096                 const bool refresh = false);
00097 
00098 
00104         void
00105         disconnect(void);
00106 
00107 
00108     private:
00109         MYSQL* mDb; 
00110 };
00111 
00112 
00113 } // namespace dal
00114 
00115 #endif // _TMWSERV_MYSQL_DATA_PROVIDER_H_

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