9#include <QCoreApplication>
11#include <QCryptographicHash>
12#include <dbobjectsrequest.h>
22 [](
const QH::iObjectProvider*
database) ->
bool {
23 return database->doSql(
":/src/sql/SecretDB_1.sql");
31 {QH_DB_DRIVER,
"QSQLITE"},
32 {QH_DB_FILE_PATH, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
"/QASecret.sqlite" },
33 {QH_DB_BACKUP_PATH, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) +
"/QASecretBackUps"}
37QSharedPointer<iRecord>
42QSharedPointer<iRecord>
48 return db()->replaceObject(record.staticCast<
Record>(),
true);
void setAlias(const QString &alias) override
setAlias This method sets new alias for record.
void setHash(const QByteArray &source) override
setHash This method sets new hash of record.
bool removeRecordByKey(const QByteArray &hash) override
removeRecordByKey This method will remove record by hash key.
bool removeRecordByAlias(const QString &alias) override
removeRecordByAlias This method will remove record by alias.
bool saveRecord(const QSharedPointer< iRecord > &record) override
saveRecord This method save a record object into database.
QSharedPointer< iRecord > getRecordByAlias(const QString &alias, bool ifNotExistsCreate) override
Get a user by their ID.
QVariantMap defaultDbParams() const override
QSharedPointer< iRecord > getRecordByHash(const QByteArray &hash, bool ifNotExistsCreate) override
getRecordByHash Get record by hash.
QSharedPointer< IDataBase > database()