AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
sqlite3ResultSet.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/resultSet.hpp"
24
25struct sqlite3_stmt;
26
27
28namespace anch {
29 namespace sql {
30
41
42 // Attributes +
43 private:
45 sqlite3_stmt* _stmt;
46
48 bool _prepared;
49
51 int _nbFields;
52 // Attributes -
53
54 // Constructors +
55 public:
62 SQLite3ResultSet(sqlite3_stmt* stmt, bool prepared = false) noexcept;
63 // Constructors -
64
65 // Destructor +
66 public:
70 virtual ~SQLite3ResultSet();
71 // Destructor -
72
73 // Methods +
74 public:
82 virtual bool next();
83
84 protected:
93 virtual bool getValue(std::size_t idx, std::string& out) override;
94
104 virtual std::optional<std::string> getValue(std::size_t idx) override;
105
111 virtual const anch::date::DateFormatter& getDateFormatter() override;
112
118 virtual const anch::date::DateFormatter& getTimeFormatter() override;
119
125 virtual const anch::date::DateFormatter& getTimestampFormatter() override;
126 // Methods -
127
128 };
129
130 }
131}
132
133#endif // ANCH_SQL_SQLITE3
virtual const anch::date::DateFormatter & getTimestampFormatter() override
virtual bool getValue(std::size_t idx, std::string &out) override
virtual const anch::date::DateFormatter & getDateFormatter() override
SQLite3ResultSet(sqlite3_stmt *stmt, bool prepared=false) noexcept
virtual const anch::date::DateFormatter & getTimeFormatter() override
Date namespace.
SQL namespace.
Definition clauses.hpp:26
AnCH framework base namespace.
Definition app.hpp:28