9 #include <SQLiteCpp/SQLiteCpp.h>
48 return "<unknown OrderBy>";
88 return "<unknown Order>";
97 #pragma endregion enums
128 static void getCipherChunks(
const std::int64_t ide,
const std::function<
bool(std::unique_ptr<CipherChunk>&& cc)>& callback);
152 static const std::unique_ptr<SQLite::Database>&
getStorage() noexcept {
return m_database; }
164 static
void Export(const fs::path& filename);
165 static
void Import(const fs::path& filename);
168 inline static std::unique_ptr<SQLite::
Database> m_database{
nullptr};
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
#define ENIGMA_ENUM_DECLARE_BEGIN_END(begin)
Allows looping over an enum by providing a BEGIN and END enum values NOTE: should be placed at the en...
static bool deleteEncryption(const std::int64_t ide)
static bool deleteAllEncryptions()
static std::unique_ptr< CipherChunk > getCipherChunk(const std::int64_t ide)
friend std::ostream & operator<<(std::ostream &os, const OrderBy order_by) noexcept
static std::int64_t addCipherChunk(const std::unique_ptr< CipherChunk > &cc)
static const std::unique_ptr< SQLite::Database > & getStorage() noexcept
static std::unique_ptr< Encryption > getEncryption(const std::int64_t ide)
friend std::ostream & operator<<(std::ostream &os, const Order order) noexcept
static std::int64_t addEncryption(const std::unique_ptr< Encryption > &e)
static void Import(const fs::path &filename)
static std::vector< std::unique_ptr< Encryption > > getAllEncryptions(const OrderBy order_by=OrderBy::ID, const Order order=Order::Descending)
friend const char * operator*(Order order)
static void getCipherChunks(const std::int64_t ide, const std::function< bool(std::unique_ptr< CipherChunk > &&cc)> &callback)
static void Export(const fs::path &filename)
static std::vector< std::unique_ptr< Encryption > > searchEncryptionsByTitle(const std::string &qtitle, OrderBy order_by=OrderBy::ID, Order order=Order::Descending)
friend const char * operator*(OrderBy order_by)
static void Vacuum() noexcept