17 #ifndef REMWHAREAD_SQLITE_HPP 18 #define REMWHAREAD_SQLITE_HPP 20 #include <experimental/filesystem> 25 #include <sqlite/connection.hpp> 29 namespace fs = std::experimental::filesystem;
32 using std::chrono::system_clock;
33 using time_point = system_clock::time_point;
61 operator bool()
const;
68 const time_point &start = time_point(),
69 const time_point &end = system_clock::now())
const;
73 std::unique_ptr<sqlite::connection> _con;
80 #endif // REMWHAREAD_SQLITE_HPP struct remwharead::Database::entry entry
Describes a database entry.
Store and retrieve files from/to SQLite.
Definition: sqlite.hpp:36
void store(const entry &data) const
Store a Database::entry in the database.
Definition: sqlite.cpp:87
Describes a database entry.
Definition: sqlite.hpp:40
Definition: search.cpp:23
friend bool operator==(const Database::entry &a, const Database::entry &b)
Returns true if date and time are equal.
Definition: sqlite.cpp:66
const string fulltext_oneline() const
The full text in one line.
Definition: sqlite.cpp:76
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:114
Database()
Connects to the database and creates it if necessary.
Definition: sqlite.cpp:31