Skip to content
Permalink
Browse files

[oracle] Fix some errors using oracle connector in db manager

  • Loading branch information
nyalldawson committed Apr 19, 2018
1 parent 9627f73 commit 2eca7ffbe208601a98d74899d2986feac4174f30
@@ -144,7 +144,7 @@ def scroll(self, row):
return self.qry.seek(row)

def fetchone(self):
if not next(self.qry):
if not self.qry.next():
return None

row = []
@@ -541,11 +541,11 @@ def getVectorTablesCache(self, schema=None):
buf = list(item)
geomtype = geomtypes[j]
srid = srids[j]
datatype = Qgis.featureType(Qgis.singleType(geomtype))
geo = datatype[3:].upper().strip(u"25D")
datatype = QgsWkbTypes.displayString(QgsWkbTypes.flatType(QgsWkbTypes.singleType(geomtype)))
geo = datatype.upper()
buf.append(geo)
buf.append(geomtype)
buf.append(Qgis.wkbDimensions(geomtype)) # Dimensions
buf.append(QgsWkbTypes.coordDimensions(geomtype)) # Dimensions
buf.append(srid)
buf.append(None) # To respect ORTableVector row
buf.append(None) # To respect ORTableVector row
@@ -636,11 +636,11 @@ def getVectorTables(self, schema=None):
for j in range(len(geomtypes)):
buf = list(item)
geomtype = geomtypes[j]
datatype = Qgis.featureType(Qgis.singleType(geomtype))
geo = datatype[3:].upper().strip(u"25D")
datatype = QgsWkbTypes.displayString(QgsWkbTypes.flatType(QgsWkbTypes.singleType(geomtype)))
geo = datatype.upper()
buf.append(geo) # Geometry type as String
buf.append(geomtype) # Qgis.WkbType
buf.append(Qgis.wkbDimensions(geomtype)) # Dimensions
buf.append(QgsWkbTypes.coordDimensions(geomtype)) # Dimensions
buf.append(detectedSrid) # srid
if not self.onlyExistingTypes:
geomMultiTypes.append(0)
@@ -24,7 +24,7 @@
"""

from qgis.PyQt.QtWidgets import QApplication
from qgis.core import Qgis
from qgis.core import QgsWkbTypes

from ..info_model import TableInfo, VectorTableInfo, DatabaseInfo
from ..html_elems import HtmlContent, HtmlSection, HtmlParagraph, \
@@ -576,7 +576,7 @@ def spatialInfo(self):
self.table.geomType),
(QApplication.translate("DBManagerPlugin",
"Qgis Geometry type:"),
Qgis.featureType(self.table.wkbType))
QgsWkbTypes.displayString(self.table.wkbType))
]

# only if we have info from geometry_columns

0 comments on commit 2eca7ff

Please sign in to comment.
You can’t perform that action at this time.