123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef _MYSQL_DRIVER_H_
- #define _MYSQL_DRIVER_H_
- #include "cppconn/driver.h"
- #include <boost/scoped_ptr.hpp>
- extern "C"
- {
- CPPCONN_PUBLIC_FUNC void * sql_mysql_get_driver_instance();
- }
- namespace sql
- {
- namespace mysql
- {
- namespace NativeAPI
- {
- class NativeDriverWrapper;
- }
- class CPPCONN_PUBLIC_FUNC MySQL_Driver : public sql::Driver
- {
- boost::scoped_ptr< ::sql::mysql::NativeAPI::NativeDriverWrapper > proxy;
- public:
- MySQL_Driver();
- MySQL_Driver(const ::sql::SQLString & clientLib);
- virtual ~MySQL_Driver();
- sql::Connection * connect(const sql::SQLString& hostName, const sql::SQLString& userName, const sql::SQLString& password);
- sql::Connection * connect(sql::ConnectOptionsMap & options);
- int getMajorVersion();
- int getMinorVersion();
- int getPatchVersion();
- const sql::SQLString & getName();
- void threadInit();
- void threadEnd();
- private:
-
- MySQL_Driver(const MySQL_Driver &);
- void operator=(MySQL_Driver &);
- };
- CPPCONN_PUBLIC_FUNC MySQL_Driver * get_driver_instance_by_name(const char * const clientlib);
- CPPCONN_PUBLIC_FUNC MySQL_Driver * get_driver_instance();
- static inline MySQL_Driver * get_mysql_driver_instance() { return get_driver_instance(); }
- }
- }
- #endif
|