The IDataBase class Main database.
More...
#include <idatabase.h>
|
| IDataBase () |
|
virtual QSharedPointer< iRecord > | getRecordByAlias (const QString &alias, bool ifNotExistsCreate=false)=0 |
| Get a user by their ID.
|
|
virtual QSharedPointer< iRecord > | getRecordByHash (const QByteArray &hash, bool ifNotExistsCreate=false)=0 |
| getRecordByHash Get record by hash.
|
|
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 bool | removeRecordByKey (const QByteArray &hash)=0 |
| removeRecordByKey This method will remove record by hash key.
|
|
The IDataBase class Main database.
Definition at line 22 of file idatabase.h.
◆ IDataBase()
DBSecret::IDataBase::IDataBase |
( |
| ) |
|
◆ getRecordByAlias()
virtual QSharedPointer< iRecord > DBSecret::IDataBase::getRecordByAlias |
( |
const QString & |
alias, |
|
|
bool |
ifNotExistsCreate = false |
|
) |
| |
|
pure virtual |
Get a user by their ID.
- Parameters
-
id | The ID of the user to retrieve. |
ifNotExistsCreate | - this option will create a new object if object with id is not existst into database. But object wil not save into database. |
- Returns
- A QSharedPointer to the user object if found, nullptr otherwise.
Implemented in DBSecret::SecretDataBase.
◆ getRecordByHash()
virtual QSharedPointer< iRecord > DBSecret::IDataBase::getRecordByHash |
( |
const QByteArray & |
hash, |
|
|
bool |
ifNotExistsCreate = false |
|
) |
| |
|
pure virtual |
getRecordByHash Get record by hash.
- Parameters
-
hash | The hash of the user to retrieve. |
ifNotExistsCreate | - this option will create a new object if object with id is not existst into database. But object wil not save into database. |
- Returns
- A QSharedPointer to the user object if found, nullptr otherwise.
Implemented in DBSecret::SecretDataBase.
◆ removeRecordByAlias()
virtual bool DBSecret::IDataBase::removeRecordByAlias |
( |
const QString & |
alias | ) |
|
|
pure virtual |
removeRecordByAlias This method will remove record by alias.
- Parameters
-
alias | alias of the record that will be removed. |
- Returns
- true if function finished succesful else false.
Implemented in DBSecret::SecretDataBase.
◆ removeRecordByKey()
virtual bool DBSecret::IDataBase::removeRecordByKey |
( |
const QByteArray & |
hash | ) |
|
|
pure virtual |
removeRecordByKey This method will remove record by hash key.
- Parameters
-
hash | is the key of the record that will be removed. |
- Returns
- true if function finished succesful else false.
Implemented in DBSecret::SecretDataBase.
◆ saveRecord()
virtual bool DBSecret::IDataBase::saveRecord |
( |
const QSharedPointer< iRecord > & |
record | ) |
|
|
pure virtual |
saveRecord This method save a record object into database.
- Parameters
-
record | - this is object tah will be saved into database |
- Returns
- true if the object will save
Implemented in DBSecret::SecretDataBase.
The documentation for this class was generated from the following files: