QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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.
 

Public Attributes

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

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 28 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: