mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fixing travis test
This commit is contained in:
parent
63c010dbb5
commit
277d4fefae
@ -232,4 +232,5 @@ class DBConnector(object):
|
||||
return []
|
||||
|
||||
def getQueryBuilderDictionary(self):
|
||||
return {}
|
||||
|
||||
return {}
|
||||
|
@ -475,16 +475,16 @@ class OracleDBConnector(DBConnector):
|
||||
|
||||
def singleGeomTypes(self, geomtypes, srids):
|
||||
"""Intelligent wkbtype grouping (multi with non multi)"""
|
||||
if (QgsWkbTypes.Polygon in geomtypes
|
||||
and QgsWkbTypes.MultiPolygon in geomtypes):
|
||||
if (QgsWkbTypes.Polygon in geomtypes
|
||||
and QgsWkbTypes.MultiPolygon in geomtypes):
|
||||
srids.pop(geomtypes.index(QgsWkbTypes.Polygon))
|
||||
geomtypes.pop(geomtypes.index(QgsWkbTypes.Polygon))
|
||||
if (QgsWkbTypes.Point in geomtypes
|
||||
and QgsWkbTypes.MultiPoint in geomtypes):
|
||||
if (QgsWkbTypes.Point in geomtypes
|
||||
and QgsWkbTypes.MultiPoint in geomtypes):
|
||||
srids.pop(geomtypes.index(QgsWkbTypes.Point))
|
||||
geomtypes.pop(geomtypes.index(QgsWkbTypes.Point))
|
||||
if (QgsWkbTypes.LineString in geomtypes
|
||||
and QgsWkbTypes.MultiLineString in geomtypes):
|
||||
if (QgsWkbTypes.LineString in geomtypes
|
||||
and QgsWkbTypes.MultiLineString in geomtypes):
|
||||
srids.pop(geomtypes.index(QgsWkbTypes.LineString))
|
||||
geomtypes.pop(geomtypes.index(QgsWkbTypes.LineString))
|
||||
if QgsWkbTypes.Unknown in geomtypes and len(geomtypes) > 1:
|
||||
@ -1306,7 +1306,7 @@ class OracleDBConnector(DBConnector):
|
||||
"""Rename a schema in the database."""
|
||||
# Unsupported in Oracle
|
||||
pass
|
||||
|
||||
|
||||
def commentTable(self, schema, tablename, comment):
|
||||
"""Comment the table"""
|
||||
return ''
|
||||
|
@ -408,18 +408,18 @@ class ORTable(Table):
|
||||
for idx in indexes:
|
||||
if idx.isUnique and len(idx.columns) == 1:
|
||||
fld = idx.fields()[idx.columns[0]]
|
||||
if (fld.dataType == u"NUMBER" and
|
||||
not fld.modifier and
|
||||
fld.notNull and
|
||||
fld not in ret):
|
||||
if (fld.dataType == u"NUMBER"
|
||||
and not fld.modifier
|
||||
and fld.notNull
|
||||
and fld not in ret):
|
||||
ret.append(fld)
|
||||
|
||||
# and finally append the other suitable fields
|
||||
for fld in self.fields():
|
||||
if (fld.dataType == u"NUMBER" and
|
||||
not fld.modifier and
|
||||
fld.notNull and
|
||||
fld not in ret):
|
||||
if (fld.dataType == u"NUMBER"
|
||||
and not fld.modifier
|
||||
and fld.notNull
|
||||
and fld not in ret):
|
||||
ret.append(fld)
|
||||
|
||||
if onlyOne:
|
||||
@ -519,15 +519,15 @@ class ORTableField(TableField):
|
||||
|
||||
# find out whether fields are part of primary key
|
||||
for con in self.table().constraints():
|
||||
if (con.type == ORTableConstraint.TypePrimaryKey and
|
||||
self.name == con.column):
|
||||
if (con.type == ORTableConstraint.TypePrimaryKey
|
||||
and self.name == con.column):
|
||||
self.primaryKey = True
|
||||
break
|
||||
|
||||
def type2String(self):
|
||||
if (u"TIMESTAMP" in self.dataType or
|
||||
self.dataType in [u"DATE", u"SDO_GEOMETRY",
|
||||
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
|
||||
if (u"TIMESTAMP" in self.dataType
|
||||
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
|
||||
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
|
||||
return u"{}".format(self.dataType)
|
||||
if self.charMaxLen in [None, -1]:
|
||||
return u"{}".format(self.dataType)
|
||||
|
@ -193,7 +193,6 @@ class PostGisDBConnector(DBConnector):
|
||||
self._close_cursor(c)
|
||||
return res
|
||||
|
||||
|
||||
def getSpatialInfo(self):
|
||||
""" returns tuple about PostGIS support:
|
||||
- lib version
|
||||
|
@ -399,7 +399,7 @@ class PGTableField(TableField):
|
||||
if con.type == TableConstraint.TypePrimaryKey and self.num in con.columns:
|
||||
self.primaryKey = True
|
||||
break
|
||||
|
||||
|
||||
def getComment(self):
|
||||
"""Returns the comment for a field"""
|
||||
tab = self.table()
|
||||
@ -419,7 +419,6 @@ class PGTableField(TableField):
|
||||
return ''
|
||||
|
||||
|
||||
|
||||
class PGTableConstraint(TableConstraint):
|
||||
|
||||
def __init__(self, row, table):
|
||||
|
@ -591,13 +591,13 @@ class SpatiaLiteDBConnector(DBConnector):
|
||||
self._execute_and_commit(sql)
|
||||
self._execute(None, sql)
|
||||
|
||||
sql = u"SELECT InvalidateLayerStatistics(%s)" % (self.quoteId(table))
|
||||
self._execute(None, sql)
|
||||
# sql = u"SELECT InvalidateLayerStatistics(%s)" % (self.quoteId(table))
|
||||
# self._execute(None, sql)
|
||||
|
||||
sql = u"SELECT UpdateLayerStatistics(%s)" % (self.quoteId(table))
|
||||
self._execute(None, sql)
|
||||
# sql = u"SELECT UpdateLayerStatistics(%s)" % (self.quoteId(table))
|
||||
# self._execute(None, sql)
|
||||
|
||||
self._commit()
|
||||
# self._commit()
|
||||
return True
|
||||
|
||||
def deleteTableColumn(self, table, column):
|
||||
|
@ -42,7 +42,6 @@ class DlgFieldProperties(QDialog, Ui_Dialog):
|
||||
for item in self.db.connector.fieldTypes():
|
||||
self.cboType.addItem(item)
|
||||
|
||||
|
||||
supportCom = self.db.supportsComment()
|
||||
if supportCom != True:
|
||||
self.label_6.setVisible(False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user