12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef _SQL_DRIVER_H_
- #define _SQL_DRIVER_H_
- #include "connection.h"
- #include "build_config.h"
- namespace sql
- {
- class CPPCONN_PUBLIC_FUNC Driver
- {
- protected:
- virtual ~Driver() {}
- public:
-
- virtual Connection * connect(const sql::SQLString& hostName, const sql::SQLString& userName, const sql::SQLString& password) = 0;
- virtual Connection * connect(ConnectOptionsMap & options) = 0;
- virtual int getMajorVersion() = 0;
- virtual int getMinorVersion() = 0;
- virtual int getPatchVersion() = 0;
- virtual const sql::SQLString & getName() = 0;
- virtual void threadInit() = 0;
- virtual void threadEnd() = 0;
- };
- }
- extern "C"
- {
- CPPCONN_PUBLIC_FUNC sql::Driver * get_driver_instance();
-
- CPPCONN_PUBLIC_FUNC sql::Driver * get_driver_instance_by_name(const char * const clientlib);
- }
- #endif
|