SecretService 0.13.2d47dfe
SecretService is base back end library for your c++ Qt projects.
DBSecret::IDataBase Class Referenceabstract

The IDataBase class Main database. More...

#include <idatabase.h>

Inheritance diagram for DBSecret::IDataBase:
Inheritance graph
Collaboration diagram for DBSecret::IDataBase:
Collaboration graph

Public Member Functions

 IDataBase ()
 
virtual QSharedPointer< iRecordgetRecordByAlias (const QString &alias, bool ifNotExistsCreate=false)=0
 Get a user by their ID.
 
virtual QSharedPointer< iRecordgetRecordByHash (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.
 

Detailed Description

The IDataBase class Main database.

Definition at line 22 of file idatabase.h.

Constructor & Destructor Documentation

◆ IDataBase()

DBSecret::IDataBase::IDataBase ( )

Definition at line 11 of file idatabase.cpp.

Member Function Documentation

◆ getRecordByAlias()

virtual QSharedPointer< iRecord > DBSecret::IDataBase::getRecordByAlias ( const QString &  alias,
bool  ifNotExistsCreate = false 
)
pure virtual

Get a user by their ID.

Parameters
idThe 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
hashThe 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
aliasalias 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
hashis 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: