AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
sqlite3PreparedStatement.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/preparedStatement.hpp"
24#include "sql/sqlite3Connection.hpp"
25
26#include <atomic>
27
28struct sqlite3;
29struct sqlite3_stmt;
30
31
32namespace anch {
33 namespace sql {
34
36
47
48 // Attributes +
49 private:
51 static std::atomic<std::uint64_t> _counter;
52
54 sqlite3* _conn;
55
57 sqlite3_stmt* _stmt;
58 // Attributes -
59
60 // Constructors +
61 public:
70 SQLite3PreparedStatement(sqlite3* dbCon, const std::string& query);
71 // Constructors -
72
73 // Destructor +
74 public:
78 virtual ~SQLite3PreparedStatement() noexcept;
79 // Destructor -
80
81 // Methods +
82 public:
90 virtual ResultSet* executeQuery() override;
91
99 virtual uint64_t executeUpdate() override;
100 // Methods -
101
102 };
103
104 }
105}
106
107#endif // ANCH_SQL_SQLITE3
SQL result representation.
Definition resultSet.hpp:50
SQLite3 connection.
Definition sqlite3Connection.hpp:40
virtual uint64_t executeUpdate() override
SQLite3PreparedStatement(sqlite3 *dbCon, const std::string &query)
virtual ~SQLite3PreparedStatement() noexcept
virtual ResultSet * executeQuery() override
SQL namespace.
Definition clauses.hpp:26
AnCH framework base namespace.
Definition app.hpp:28