mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -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 {}
|
@ -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,14 +519,14 @@ 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",
|
||||
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]:
|
||||
|
@ -193,7 +193,6 @@ class PostGisDBConnector(DBConnector):
|
||||
self._close_cursor(c)
|
||||
return res
|
||||
|
||||
|
||||
def getSpatialInfo(self):
|
||||
""" returns tuple about PostGIS support:
|
||||
- lib version
|
||||
|
@ -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