SecretService 0.13.2d47dfe
SecretService is base back end library for your c++ Qt projects.
idatabase.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
8
9#ifndef IDATABASE_H
10#define IDATABASE_H
11
12#include <QSet>
13#include <QSharedPointer>
14#include "global.h"
15#include "irecord.h"
16
17
18namespace DBSecret {
23{
24public:
25 IDataBase();
26
33 virtual QSharedPointer<iRecord> getRecordByAlias(const QString& alias, bool ifNotExistsCreate = false) = 0;
34
41 virtual QSharedPointer<iRecord> getRecordByHash(const QByteArray& hash, bool ifNotExistsCreate = false) = 0;
42
48 virtual bool saveRecord(const QSharedPointer<iRecord>& record) = 0;
49
55 virtual bool removeRecordByAlias(const QString& alias) = 0;
56
62 virtual bool removeRecordByKey(const QByteArray& hash) = 0;
63};
64}
65
66
67#endif // IDATABASE_H
The IDataBase class Main database.
Definition idatabase.h:23
virtual QSharedPointer< iRecord > getRecordByHash(const QByteArray &hash, bool ifNotExistsCreate=false)=0
getRecordByHash Get record by hash.
virtual bool removeRecordByKey(const QByteArray &hash)=0
removeRecordByKey This method will remove record by hash key.
virtual bool saveRecord(const QSharedPointer< iRecord > &record)=0
saveRecord This method save a record object into database.
virtual bool removeRecordByAlias(const QString &alias)=0
removeRecordByAlias This method will remove record by alias.
virtual QSharedPointer< iRecord > getRecordByAlias(const QString &alias, bool ifNotExistsCreate=false)=0
Get a user by their ID.
#define SECRETDB_EXPORT
Definition global.h:16