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

#include <secretdatabase.h>

Inheritance diagram for DBSecret::SecretDataBase:
Inheritance graph
Collaboration diagram for DBSecret::SecretDataBase:
Collaboration graph

Public Member Functions

 SecretDataBase ()
 
QVariantMap defaultDbParams () const override
 
QSharedPointer< iRecordgetRecordByAlias (const QString &alias, bool ifNotExistsCreate) override
 Get a user by their ID.
 
QSharedPointer< iRecordgetRecordByHash (const QByteArray &hash, bool ifNotExistsCreate) override
 getRecordByHash Get record by hash.
 
bool saveRecord (const QSharedPointer< iRecord > &record) override
 saveRecord This method save a record object into database.
 
bool removeRecordByAlias (const QString &alias) override
 removeRecordByAlias This method will remove record by alias.
 
bool removeRecordByKey (const QByteArray &hash) override
 removeRecordByKey This method will remove record by hash key.
 
- Public Member Functions inherited from DBSecret::IDataBase
 IDataBase ()
 

Detailed Description

Definition at line 17 of file secretdatabase.h.

Constructor & Destructor Documentation

◆ SecretDataBase()

DBSecret::SecretDataBase::SecretDataBase ( )

Definition at line 17 of file secretdatabase.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ defaultDbParams()

QVariantMap DBSecret::SecretDataBase::defaultDbParams ( ) const
override

Definition at line 29 of file secretdatabase.cpp.

◆ getRecordByAlias()

QSharedPointer< iRecord > DBSecret::SecretDataBase::getRecordByAlias ( const QString &  alias,
bool  ifNotExistsCreate 
)
overridevirtual

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.

Implements DBSecret::IDataBase.

Definition at line 38 of file secretdatabase.cpp.

Here is the call graph for this function:

◆ getRecordByHash()

QSharedPointer< iRecord > DBSecret::SecretDataBase::getRecordByHash ( const QByteArray &  hash,
bool  ifNotExistsCreate 
)
overridevirtual

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.

Implements DBSecret::IDataBase.

Definition at line 43 of file secretdatabase.cpp.

Here is the call graph for this function:

◆ removeRecordByAlias()

bool DBSecret::SecretDataBase::removeRecordByAlias ( const QString &  alias)
overridevirtual

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.

Implements DBSecret::IDataBase.

Definition at line 51 of file secretdatabase.cpp.

Here is the call graph for this function:

◆ removeRecordByKey()

bool DBSecret::SecretDataBase::removeRecordByKey ( const QByteArray &  hash)
overridevirtual

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.

Implements DBSecret::IDataBase.

Definition at line 55 of file secretdatabase.cpp.

Here is the call graph for this function:

◆ saveRecord()

bool DBSecret::SecretDataBase::saveRecord ( const QSharedPointer< iRecord > &  record)
overridevirtual

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

Implements DBSecret::IDataBase.

Definition at line 47 of file secretdatabase.cpp.


The documentation for this class was generated from the following files: