digiKam Developer Documentation: Digikam::FaceDbBackend Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::FaceDbBackend Class Reference
Inheritance diagram for Digikam::FaceDbBackend:

## Public Member Functions
| FaceDbBackend (DbEngineLocking *const locking, const QString &backendName=QLatin1String("faceDatabase-"))
bool | initSchema (FaceDbSchemaUpdater *const updater)
| Initialize the database schema to the current version, carry out upgrades if necessary.
Public Member Functions inherited from Digikam::BdEngineBackend
| BdEngineBackend (const QString &backendName, DbEngineLocking *const locking)
| Creates a database backend.
| BdEngineBackend (const QString &backendName, DbEngineLocking *const locking, BdEngineBackendPrivate &dd)
QDateTime | asDBDateTime (const QDateTime &dateTime) const
| Depending on the database backend return a local or UTC date format.
BdEngineBackend::QueryState | beginTransaction ()
| Begin a database transaction.
bool | checkOrSetWALMode ()
| Check or set WAL mode for SQLite database if enabled in settings.
void | close ()
| Close the database connection.
BdEngineBackend::QueryState | commitTransaction ()
| Commit the current database transaction.
DbEngineConfigSettings | configElement () const
| Return config read from XML, corresponding to this backend's database type.
bool | connectionErrorHandling (int retries)
| Called when an attempted connection to the database failed.
QSqlQuery | copyQuery (const QSqlQuery &old)
| Creates a faithful copy of the passed query, with the current db connection.
DbType | databaseType () const
| Return the database type.
bool | exec (QSqlQuery &query)
| Calls exec/execBatch on the query, and handles debug output if something went wrong.
bool | execBatch (QSqlQuery &query)
QueryState | execDBAction (const DbEngineAction &action, const QMap< QString, QVariant > &bindingMap, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
| Performs the database action on the current database.
QueryState | execDBAction (const DbEngineAction &action, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
| Performs the database action on the current database.
QueryState | execDBAction (const QString &action, const QMap< QString, QVariant > &bindingMap, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execDBAction (const QString &action, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QSqlQuery | execDBActionQuery (const DbEngineAction &action, const QMap< QString, QVariant > &bindingMap)
| Performs the database action on the current database.
QSqlQuery | execDBActionQuery (const QString &action, const QMap< QString, QVariant > &bindingMap)
QueryState | execDirectSql (const QString &query)
| Calls exec on the query, and handles debug output if something went wrong.
QueryState | execDirectSqlWithResult (const QString &query, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
| Calls exec on the query, and handles debug output if something went wrong.
QSqlQuery | execQuery (const QString &sql)
| Executes the statement and returns the query object.
QSqlQuery | execQuery (const QString &sql, const QList< QVariant > &boundValues)
QSqlQuery | execQuery (const QString &sql, const QMap< QString, QVariant > &bindingMap)
| Method which accept a hashmap with key, values which are used for named binding.
QSqlQuery | execQuery (const QString &sql, const QVariant &boundValue1)
QSqlQuery | execQuery (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2)
QSqlQuery | execQuery (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3)
QSqlQuery | execQuery (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, const QVariant &boundValue4)
void | execQuery (QSqlQuery &preparedQuery, const QList< QVariant > &boundValues)
void | execQuery (QSqlQuery &preparedQuery, const QVariant &boundValue1)
| Binds the values and executes the prepared query.
void | execQuery (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2)
void | execQuery (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3)
void | execQuery (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, const QVariant &boundValue4)
QueryState | execSql (const QString &sql, const QList< QVariant > &boundValues, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (const QString &sql, const QMap< QString, QVariant > &bindingMap, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
| Method which accepts a map for named binding.
QueryState | execSql (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, const QVariant &boundValue4, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (const QString &sql, const QVariant &boundValue1, const QVariant &boundValue2, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (const QString &sql, const QVariant &boundValue1, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (const QString &sql, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
| Executes the SQL statement, and write the returned data into the values list.
QueryState | execSql (QSqlQuery &preparedQuery, const QList< QVariant > &boundValues, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, const QVariant &boundValue4, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2, const QVariant &boundValue3, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (QSqlQuery &preparedQuery, const QVariant &boundValue1, const QVariant &boundValue2, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (QSqlQuery &preparedQuery, const QVariant &boundValue1, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execSql (QSqlQuery &preparedQuery, QList< QVariant > *const values=nullptr, QVariant *const lastInsertId=nullptr)
QueryState | execUpsertDBAction (const DbEngineAction &action, const QVariant &id, const QStringList &fieldNames, const QList< QVariant > &values)
| Performs a special DBAction that is usually needed to "INSERT or UPDATE" entries in a table.
QueryState | execUpsertDBAction (const QString &action, const QVariant &id, const QStringList &fieldNames, const QList< QVariant > &values)
DbEngineAction | getDBAction (const QString &actionName) const
| Returns a database action with name, specified in actionName, for the current database.
QSqlQuery | getQuery ()
| Creates an empty query object waiting for the statement.
QueryState | handleQueryResult (QSqlQuery &query, QList< QVariant > *const values, QVariant *const lastInsertId)
| Checks if there was a connection error.
bool | isCompatible (const DbEngineParameters &parameters)
| Checks if the parameters can be used for this database backend.
bool | isInTransaction () const
| Returns if the database is in a different thread in a transaction.
bool | isOpen () const
bool | isReady () const
QString | lastError ()
| Returns a description of the last error that occurred on this database.
QSqlError | lastSQLError ()
| Returns the last error that occurred on this database.
int | maximumBoundValues () const
| Returns the maximum number of bound parameters allowed per query.
bool | open (const DbEngineParameters &parameters)
| Open the database connection.
QSqlQuery | prepareQuery (const QString &sql)
| Creates a query object prepared with the statement, waiting for bound values.
bool | queryErrorHandling (QSqlQuery &query, int retries)
| Called with a failed query.
QList< QVariant > | readToList (QSqlQuery &query)
| Reads data of returned result set into a list which is returned.
void | rollbackTransaction ()
| Rollback the current database transaction.
void | setDbEngineErrorHandler (DbEngineErrorHandler *const handler)
| Add a DbEngineErrorHandler.
void | setForeignKeyChecks (bool check)
| Enables or disables FOREIGN_KEY_CHECKS for the database.
Status | status () const
| Returns the current status of the database backend.
QStringList | tables ()
| Returns a list with the names of tables in the database.
bool | transactionErrorHandling (const QSqlError &lastError, int retries)

## Additional Inherited Members
Public Types inherited from Digikam::BdEngineBackend
enum | DbType { SQLite , MySQL }
enum | QueryOperationStatus { ExecuteNormal , Wait , AbortQueries }
enum | QueryStateEnum { NoErrors , SQLError , ConnectionError }
enum | Status { Unavailable , Open , OpenSchemaChecked }
Protected Attributes inherited from Digikam::BdEngineBackend
BdEngineBackendPrivate *const | d_ptr = nullptr

## Member Function Documentation

## ◆ initSchema()

bool Digikam::FaceDbBackend::initSchema | ( | FaceDbSchemaUpdater *const | updater | ) |

Shall only be called from the thread that called open().