LiteSQL  0.3.10
mysql.hpp
Go to the documentation of this file.
1 /* LiteSQL
2  *
3  * The list of contributors at http://litesql.sf.net/
4  *
5  * See LICENSE for copyright information. */
6 
9 #ifndef _litesql_mysql_hpp
10 #define _litesql_mysql_hpp
11 
12 #ifdef HAVE_LIBMYSQLCLIENT
13 
14 
15 #include "litesql/except.hpp"
16 #include "litesql/types.hpp"
17 #include "litesql/string.hpp"
18 #include "litesql/backend.hpp"
19 
20 typedef struct st_mysql MYSQL;
21 
22 namespace litesql {
23 
24  using namespace std;
26 class MySQL : public Backend {
27  MYSQL* conn;
28  string host, user, passwd, database;
29  int port;
30 public:
31  class Cursor;
32  class Result;
33 
34  MySQL(const string& connInfo);
35  virtual ~MySQL();
36 
37  virtual bool supportsSequences() const;
38  virtual string getRowIDType() const;
39  virtual string getInsertID() const;
40  virtual void begin() const;
41  virtual void commit() const;
42  virtual void rollback() const;
43  Backend::Result* execute(const string& query) const;
44  Backend::Cursor* cursor(const string& query) const;
45 };
46 }
47 #endif
48 #endif
Definition: backend.hpp:14
contains class Record and typedef Records
contains litesql's exception classes
helpful string utils
Classes Backend, Backend::Cursor and Backend::Result.

SourceForge.net Logo