Class: QgsPostgresStringUtils¶
-
class
qgis.core.
QgsPostgresStringUtils
¶ Bases:
sip.wrapper
The
QgsPostgresStringUtils
provides functions to handle postgres array like formatted lists in strings.Methods
Build a postgres array like formatted list in a string from a QVariantList
Returns a QVariantList created out of a string containing an array in postgres array format {1,2,3} or {“a”,”b”,”c”}
-
buildArray
(list: Iterable[Any]) → str¶ Build a postgres array like formatted list in a string from a QVariantList
- Parameters
list (Iterable[Any]) – The list that needs to be stored to the string
New in version 3.8.
- Return type
str
-
parseArray
(string: str) → List[Any]¶ Returns a QVariantList created out of a string containing an array in postgres array format {1,2,3} or {“a”,”b”,”c”}
- Parameters
string (str) – The formatted list in a string
New in version 3.8.
- Return type
List[Any]
-