17 #ifndef REMWHAREAD_SQLITE_HPP 18 #define REMWHAREAD_SQLITE_HPP 20 #include <experimental/filesystem> 25 #include <Poco/Data/Session.h> 29 namespace fs = std::experimental::filesystem;
32 using std::chrono::system_clock;
33 using time_point = system_clock::time_point;
34 using Poco::Data::Session;
91 operator bool()
const;
106 const time_point &start = time_point(),
107 const time_point &end = system_clock::now())
const;
111 std::unique_ptr<Session> _session;
118 #endif // REMWHAREAD_SQLITE_HPP struct remwharead::Database::entry entry
Describes a database entry.
Store and retrieve files from/to SQLite.
Definition: sqlite.hpp:43
void store(const entry &data) const
Store a Database::entry in the database.
Definition: sqlite.cpp:84
Describes a database entry.
Definition: sqlite.hpp:53
Definition: bookmarks.cpp:22
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
const vector< 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
Database()
Connects to the database and creates it if necessary.
Definition: sqlite.cpp:33