Class: QgsSqliteUtils

Contains utilities for working with Sqlite data sources.

Added in version 3.4.

Static Methods

quotedIdentifier

Returns a properly quoted version of identifier.

quotedString

Returns a quoted string value, surround by ' characters and with special characters correctly escaped.

quotedValue

Returns a properly quoted and escaped version of value for use in SQL strings.

systemTables

Returns a string list of SQLite (and spatialite) system tables

class qgis.core.QgsSqliteUtils[source]

Bases: object

static quotedIdentifier(identifier: str | None) str[source]

Returns a properly quoted version of identifier.

Added in version 3.6.

Parameters:

identifier (Optional[str])

Return type:

str

static quotedString(value: str | None) str[source]

Returns a quoted string value, surround by ‘ characters and with special characters correctly escaped.

Parameters:

value (Optional[str])

Return type:

str

static quotedValue(value: Any) str[source]

Returns a properly quoted and escaped version of value for use in SQL strings.

Added in version 3.6.

Parameters:

value (Any)

Return type:

str

static systemTables() List[str][source]

Returns a string list of SQLite (and spatialite) system tables

Added in version 3.8.

Return type:

List[str]