Databaseconnectionclasses  0.5.3
hk_mysqlconnection.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_mysqlclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file COPYING included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 #ifndef HK_MYSQLCONNECTION
12 #define HK_MYSQLCONNECTION
13 #include <mysql.h>
14 #include "hk_connection.h"
15 #include <list>
16 #include <vector>
17 #include <algorithm>
18 //#include <hk_string.h>
19 
20 #ifndef mysql_library_init
21 #define mysql_library_init mysql_server_init
22 #endif
23 
24 #ifndef mysql_library_end
25 #define mysql_library_end mysql_server_end
26 #endif
27 
28 class hk_drivermanager;
29 extern "C"
30 {
31  hk_connection* create_connection(hk_drivermanager*);
32  hk_string hk_classesversion(void);
33 }
34 
35 
36 class hk_mysqldatabase;
38 {
39  public:
42  MYSQL* dbhandler(void);
43  void servermessage(void);
44 //virtual int server_supports(void);
45  virtual bool server_supports(support_enum)const;
46 //virtual int server_needs(void);
47  virtual bool server_needs(need_enum)const;
48  virtual hk_string drivername(void) const;
49  virtual unsigned int default_tcp_port(void) const;
50 
51  protected:
52  bool driver_specific_connect();
53  bool driver_specific_disconnect();
54  bool driver_specific_new_password(const hk_string&);
55  vector<hk_string>* driver_specific_dblist(void);
56  hk_database* driver_specific_new_database(void);
57 
58  private:
59 
60  MYSQL* p_SQL_Connection;
61 static int p_reference;
62 
63 } ;
64 #endif
represents a particular database on the SQL Server
Definition: hk_database.h:48
connects to the SQL Server
Definition: hk_connection.h:31
virtual bool server_supports(support_enum) const
Definition: hk_mysqlconnection.cpp:182
need_enum
Definition: hk_connection.h:169
Definition: hk_mysqldatabase.h:19
Definition: hk_mysqlconnection.h:37
virtual bool server_needs(need_enum) const
Definition: hk_mysqlconnection.cpp:248
virtual hk_string drivername(void) const
Definition: hk_mysqlconnection.cpp:240
virtual unsigned int default_tcp_port(void) const
Definition: hk_mysqlconnection.cpp:300
support_enum
Definition: hk_connection.h:104
Database Driver administration.
Definition: hk_drivermanager.h:38