mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[DB Manager] Fix broken geometry type of GeoPackage based SQL Layers. Fixes #33232
This commit is contained in:
parent
0d84e35839
commit
dbdc397fd8
@ -178,8 +178,7 @@ class GPKGDatabase(Database):
|
|||||||
def toSqlLayer(self, sql, geomCol, uniqueCol, layerName="QueryLayer", layerType=None, avoidSelectById=False, filter=""):
|
def toSqlLayer(self, sql, geomCol, uniqueCol, layerName="QueryLayer", layerType=None, avoidSelectById=False, filter=""):
|
||||||
from qgis.core import QgsVectorLayer
|
from qgis.core import QgsVectorLayer
|
||||||
|
|
||||||
vl = QgsVectorLayer(self.uri().database(), layerName, 'ogr')
|
vl = QgsVectorLayer(self.uri().database() + '|subset=' + sql, layerName, 'ogr')
|
||||||
vl.setSubsetString(sql)
|
|
||||||
return vl
|
return vl
|
||||||
|
|
||||||
def supportsComment(self):
|
def supportsComment(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user