QGIS API Documentation 3.27.0-Master (95e00c50d2)
Public Member Functions | Public Attributes | List of all members
QgsDatabaseQueryLogEntry Class Reference

Encapsulates a logged database query. More...

#include <qgsdbquerylog.h>

Public Member Functions

 QgsDatabaseQueryLogEntry (const QString &query=QString())
 Constructor for QgsDatabaseQueryLogEntry. More...
 

Public Attributes

bool canceled = false
 Canceled flag for user canceled queries. More...
 
QString error
 Error reported by the provider, normally blank. More...
 
long long fetchedRows = -1
 Number of fetched/affected rows. More...
 
quint64 finishedTime = 0
 Time when the query finished (in milliseconds since epoch), if available. More...
 
QString initiatorClass
 The QGIS class which initiated the query. More...
 
QString origin
 Code file location for the query origin. More...
 
QString provider
 Provider key. More...
 
QString query
 The logged database query (e.g. the SQL query) More...
 
int queryId = 0
 Unique query ID. More...
 
quint64 startedTime = 0
 Time when the query started (in milliseconds since epoch). More...
 
QString uri
 Database URI. More...
 

Detailed Description

Encapsulates a logged database query.

Since
QGIS 3.24

Definition at line 31 of file qgsdbquerylog.h.

Constructor & Destructor Documentation

◆ QgsDatabaseQueryLogEntry()

QgsDatabaseQueryLogEntry::QgsDatabaseQueryLogEntry ( const QString &  query = QString())

Constructor for QgsDatabaseQueryLogEntry.

Definition at line 26 of file qgsdbquerylog.cpp.

Member Data Documentation

◆ canceled

bool QgsDatabaseQueryLogEntry::canceled = false

Canceled flag for user canceled queries.

Definition at line 96 of file qgsdbquerylog.h.

◆ error

QString QgsDatabaseQueryLogEntry::error

Error reported by the provider, normally blank.

Definition at line 91 of file qgsdbquerylog.h.

◆ fetchedRows

long long QgsDatabaseQueryLogEntry::fetchedRows = -1

Number of fetched/affected rows.

Warning
Not all providers support this information.

Definition at line 86 of file qgsdbquerylog.h.

◆ finishedTime

quint64 QgsDatabaseQueryLogEntry::finishedTime = 0

Time when the query finished (in milliseconds since epoch), if available.

Definition at line 66 of file qgsdbquerylog.h.

◆ initiatorClass

QString QgsDatabaseQueryLogEntry::initiatorClass

The QGIS class which initiated the query.

c++ code can automatically populate this through the QgsSetQueryLogClass macro.

Definition at line 73 of file qgsdbquerylog.h.

◆ origin

QString QgsDatabaseQueryLogEntry::origin

Code file location for the query origin.

c++ code can automatically populate this through the QgsSetQueryLogClass macro.

Definition at line 80 of file qgsdbquerylog.h.

◆ provider

QString QgsDatabaseQueryLogEntry::provider

Provider key.

Definition at line 51 of file qgsdbquerylog.h.

◆ query

QString QgsDatabaseQueryLogEntry::query

The logged database query (e.g. the SQL query)

Definition at line 54 of file qgsdbquerylog.h.

◆ queryId

int QgsDatabaseQueryLogEntry::queryId = 0

Unique query ID.

This ID will automatically be set on creation of a new QgsDatabaseQueryLogEntry object.

Definition at line 45 of file qgsdbquerylog.h.

◆ startedTime

quint64 QgsDatabaseQueryLogEntry::startedTime = 0

Time when the query started (in milliseconds since epoch).

This will be automatically recorded on creation of a new QgsDatabaseQueryLogEntry object.

Definition at line 61 of file qgsdbquerylog.h.

◆ uri

QString QgsDatabaseQueryLogEntry::uri

Database URI.

Definition at line 48 of file qgsdbquerylog.h.


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