Shadowrun: Awakened 29 September 2011 - Build 871
mysql_driver.h
Go to the documentation of this file.
00001 /*
00002    Copyright 2007 - 2008 MySQL AB, 2008 - 2009 Sun Microsystems, Inc.  All rights reserved.
00003 
00004    The MySQL Connector/C++ is licensed under the terms of the GPL
00005    <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
00006    MySQL Connectors. There are special exceptions to the terms and
00007    conditions of the GPL as it is applied to this software, see the
00008    FLOSS License Exception
00009    <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
00010 */
00011 
00012 #ifndef _MYSQL_DRIVER_H_
00013 #define _MYSQL_DRIVER_H_
00014 
00015 #include <cppconn/driver.h>
00016 
00017 
00018 namespace sql
00019 {
00020 namespace mysql
00021 {
00022 class Connection;
00023 class ConnectProperty;
00024 
00025 class CPPCONN_PUBLIC_FUNC MySQL_Driver : public sql::Driver
00026 {
00027 public:
00028     MySQL_Driver(); /* DON'T CALL THIS, USE Instance() */
00029     virtual ~MySQL_Driver();/* DON'T CALL THIS, MEMORY WILL BE AUTOMAGICALLY CLEANED */
00030 
00031     static MySQL_Driver * Instance();
00032 
00033     sql::Connection * connect(const std::string& hostName,
00034                             const std::string& userName,
00035                             const std::string& password);
00036 
00037     sql::Connection * connect(std::map<std::string, sql::ConnectPropertyVal> & options);
00038 
00039     int getMajorVersion();
00040 
00041     int getMinorVersion();
00042 
00043     int getPatchVersion();
00044 
00045     const std::string & getName();
00046 
00047 private:
00048     /* Prevent use of these */
00049     MySQL_Driver(const MySQL_Driver &);
00050     void operator=(MySQL_Driver &);
00051 };
00052 
00053 CPPCONN_PUBLIC_FUNC MySQL_Driver *get_mysql_driver_instance();
00054 
00055 
00056 } /* namespace mysql */
00057 } /* namespace sql */
00058 
00059 #endif // _MYSQL_DRIVER_H_
00060 
00061 /*
00062  * Local variables:
00063  * tab-width: 4
00064  * c-basic-offset: 4
00065  * End:
00066  * vim600: noet sw=4 ts=4 fdm=marker
00067  * vim<600: noet sw=4 ts=4
00068  */

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net