SecretService 0.13.2d47dfe
SecretService is base back end library for your c++ Qt projects.
secretdatabase.h
Go to the documentation of this file.
1//#
2//# Copyright (C) 2024-2024 QuasarApp.
3//# Distributed under the GPLv3 software license, see the accompanying
4//# Everyone is permitted to copy and distribute verbatim copies
5//# of this license document, but changing it is not allowed.
6//#
7
9
10#include <database.h>
11
12#ifndef BOTDATABASE_H
13#define BOTDATABASE_H
14
15namespace DBSecret {
16
17class SecretDataBase: public IDataBase, public QH::DataBase
18{
19public:
21 QVariantMap defaultDbParams() const override;
22
23 // IDataBase interface
24public:
25 QSharedPointer<iRecord> getRecordByAlias(const QString &alias, bool ifNotExistsCreate) override;
26 QSharedPointer<iRecord> getRecordByHash(const QByteArray &hash, bool ifNotExistsCreate) override;
27 bool saveRecord(const QSharedPointer<iRecord> &record) override;
28
29 bool removeRecordByAlias(const QString &alias) override;
30 bool removeRecordByKey(const QByteArray &hash) override;
31};
32}
33#endif // BOTDATABASE_H
The IDataBase class Main database.
Definition idatabase.h:23
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.