AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
sqlite3Connection.hpp
1/*
2 ANCH Framework: ANother C++ Hack is a C++ framework based on C++11 standard
3 Copyright (C) 2012 Vincent Lachenal
4
5 This file is part of ANCH Framework.
6
7 ANCH Framework is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 ANCH Framework is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with ANCH Framework. If not, see <http://www.gnu.org/licenses/>.
19*/
20#ifdef ANCH_SQL_SQLITE3
21#pragma once
22
23#include "sql/connection.hpp"
24
25#include "sqlite3.h"
26
27
28namespace anch {
29 namespace sql {
30
41
42 // Attributes +
43 private:
45 sqlite3* _conn;
46 // Attributes -
47
48 // Constructors +
49 public:
57 SQLite3Connection(const std::string& database);
58
67
72 // Constructors -
73
74 // Destructor +
78 virtual ~SQLite3Connection() noexcept;
79 // Destructor -
80
81 // Methods +
82 protected:
92 virtual ResultSet* executeQuery(const std::string& query) override;
93
103 virtual uint64_t executeUpdate(const std::string& query) override;
104
110 virtual void sendCommit() override;
111
117 virtual void sendRollback() override;
118
124 virtual void sendStartTransaction() override;
125
135 virtual PreparedStatement* makePrepared(const std::string& query) override;
136 // Methods -
137
138 };
139
140 }
141}
142
143#endif // ANCH_SQL_SQLITE3
ResultSet * query(const std::string &query)
SQL prepared statement.
Definition preparedStatement.hpp:43
SQL result representation.
Definition resultSet.hpp:50
SQLite3Connection(const SQLite3Connection &)=delete
virtual void sendRollback() override
virtual uint64_t executeUpdate(const std::string &query) override
virtual PreparedStatement * makePrepared(const std::string &query) override
SQLite3Connection(const SqlConnectionConfiguration &config)
virtual ResultSet * executeQuery(const std::string &query) override
SQLite3Connection(const std::string &database)
virtual void sendStartTransaction() override
virtual ~SQLite3Connection() noexcept
virtual void sendCommit() override
SQL namespace.
Definition clauses.hpp:26
AnCH framework base namespace.
Definition app.hpp:28
SQL database connection configuration.
Definition connection.hpp:39