17 #ifndef REMWHAREAD_SQLITE_HPP 18 #define REMWHAREAD_SQLITE_HPP 20 #include <experimental/filesystem> 26 #include <Poco/Data/Session.h> 30 namespace fs = std::experimental::filesystem;
33 using std::chrono::system_clock;
34 using time_point = system_clock::time_point;
36 using Poco::Data::Session;
93 operator bool()
const;
108 const time_point &start = time_point(),
109 const time_point &end = system_clock::now())
const;
113 std::unique_ptr<Session> _session;
120 #endif // REMWHAREAD_SQLITE_HPP struct remwharead::Database::entry entry
Describes a database entry.
const list< entry > retrieve(const time_point &start=time_point(), const time_point &end=system_clock::now()) const
Retrieve a vector of Database::entry from the database.
Definition: sqlite.cpp:115
Store and retrieve files from/to SQLite.
Definition: sqlite.hpp:45
void store(const entry &data) const
Store a Database::entry in the database.
Definition: sqlite.cpp:84
Describes a database entry.
Definition: sqlite.hpp:55
friend bool operator==(const Database::entry &a, const Database::entry &b)
Returns true if date and time are equal.
Definition: sqlite.cpp:68
const string fulltext_oneline() const
The full text in one line.
Definition: sqlite.cpp:73
Database()
Connects to the database and creates it if necessary.
Definition: sqlite.cpp:33