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: bool¶
Canceled flag for user canceled queries.
- error: str¶
Error reported by the provider, normally blank
- fetchedRows: int¶
Number of fetched/affected rows.
Warning
Not all providers support this information.
- finishedTime: int¶
Time when the query finished (in milliseconds since epoch), if available.
- initiatorClass: str¶
The QGIS class which initiated the query.
c++ code can automatically populate this through the
QgsSetQueryLogClass
macro.
- origin: str¶
Code file location for the query origin.
c++ code can automatically populate this through the
QgsSetQueryLogClass
macro.
- provider: str¶
Provider key
- query: str¶
The logged database query (e.g. the SQL query)
- queryId: int¶
Unique query ID.
This ID will automatically be set on creation of a new
QgsDatabaseQueryLogEntry
object.
- startedTime: int¶
Time when the query started (in milliseconds since epoch).
This will be automatically recorded on creation of a new
QgsDatabaseQueryLogEntry
object.
- uri: str¶
Database URI