Class: QgsDatabaseQueryLogEntry¶
Encapsulates a logged database query.
Added in version 3.24.
Attributes
Canceled flag for user canceled queries.  | 
|
Error reported by the provider, normally blank  | 
|
Number of fetched/affected rows.  | 
|
Time when the query finished (in milliseconds since epoch), if available.  | 
|
The QGIS class which initiated the query.  | 
|
Code file location for the query origin.  | 
|
Provider key  | 
|
The logged database query (e.g. the SQL query).  | 
|
Unique query ID.  | 
|
Time when the query started (in milliseconds since epoch).  | 
|
Database URI  | 
- class qgis.core.QgsDatabaseQueryLogEntry[source]¶
 Bases:
object- __init__(query: str | None = '')
 Constructor for QgsDatabaseQueryLogEntry.
- Parameters:
 query (Optional[str] = '')
- __init__(a0: QgsDatabaseQueryLogEntry)
 - Parameters:
 
- canceled¶
 Canceled flag for user canceled queries.
- error¶
 Error reported by the provider, normally blank
- fetchedRows¶
 Number of fetched/affected rows.
Warning
Not all providers support this information.
- finishedTime¶
 Time when the query finished (in milliseconds since epoch), if available.
- initiatorClass¶
 The QGIS class which initiated the query.
c++ code can automatically populate this through the
QgsSetQueryLogClassmacro.
- origin¶
 Code file location for the query origin.
c++ code can automatically populate this through the
QgsSetQueryLogClassmacro.
- provider¶
 Provider key
- query¶
 The logged database query (e.g. the SQL query)
- queryId¶
 Unique query ID.
This ID will automatically be set on creation of a new
QgsDatabaseQueryLogEntryobject.
- startedTime¶
 Time when the query started (in milliseconds since epoch).
This will be automatically recorded on creation of a new
QgsDatabaseQueryLogEntryobject.
- uri¶
 Database URI