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
20typedef struct st_mysql MYSQL;
21
22namespace litesql {
23
24 using namespace std;
26class MySQL : public Backend {
27 MYSQL* conn;
28 string host, user, passwd, database;
29 int port;
30public:
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
Classes Backend, Backend::Cursor and Backend::Result.
An abstract base class for interfacing with relational databases.
Definition backend.hpp:19
contains litesql's exception classes
helpful string utils
contains class Record and typedef Records

SourceForge.net Logo