Fixing travis test

This commit is contained in:
Ailurupoda 2019-02-07 13:10:37 +01:00
parent 63c010dbb5
commit 277d4fefae
7 changed files with 28 additions and 30 deletions

View File

@ -232,4 +232,5 @@ class DBConnector(object):
return []
def getQueryBuilderDictionary(self):
return {}

View File

@ -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]:

View File

@ -193,7 +193,6 @@ class PostGisDBConnector(DBConnector):
self._close_cursor(c)
return res
def getSpatialInfo(self):
""" returns tuple about PostGIS support:
- lib version

View File

@ -419,7 +419,6 @@ class PGTableField(TableField):
return ''
class PGTableConstraint(TableConstraint):
def __init__(self, row, table):

View File

@ -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):

View File

@ -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)