Skip to content
Permalink
Browse files

[processing] Fix invalid parameter definitions for spatialite algs

  • Loading branch information
nyalldawson committed Feb 5, 2018
1 parent 1a117cf commit 5ba69ea9457993bf97e0a36ba824b68762846a67
@@ -66,7 +66,7 @@ def __init__(self):

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT, self.tr('Layer to import')))
self.addParameter(QgsProcessingParameterVectorLayer(self.DATABASE, self.tr('File database'), [], False, False))
self.addParameter(QgsProcessingParameterVectorLayer(self.DATABASE, self.tr('File database'), optional=False))
self.addParameter(QgsProcessingParameterString(self.TABLENAME, self.tr('Table to import to (leave blank to use layer name)'), optional=True))
self.addParameter(QgsProcessingParameterField(self.PRIMARY_KEY, self.tr('Primary key field'), None, self.INPUT, QgsProcessingParameterField.Any, False, True))
self.addParameter(QgsProcessingParameterString(self.GEOMETRY_COLUMN, self.tr('Geometry column'), 'geom'))
@@ -52,7 +52,7 @@ def initAlgorithm(self, config=None):
'widget_wrapper': {
'class': 'processing.gui.wrappers_postgis.ConnectionWidgetWrapper'}})
self.addParameter(db_param)
self.addParameter(QgsProcessingParameterString(self.SQL, self.tr('SQL query')))
self.addParameter(QgsProcessingParameterString(self.SQL, self.tr('SQL query'), multiLine=True))

def name(self):
return 'postgisexecutesql'
@@ -50,8 +50,8 @@ def __init__(self):
super().__init__()

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterVectorLayer(self.DATABASE, self.tr('File Database'), [], False, False))
self.addParameter(QgsProcessingParameterString(self.SQL, self.tr('SQL query'), '', True))
self.addParameter(QgsProcessingParameterVectorLayer(self.DATABASE, self.tr('File Database'), optional=False))
self.addParameter(QgsProcessingParameterString(self.SQL, self.tr('SQL query'), multiLine=True))

def name(self):
return 'spatialiteexecutesql'

0 comments on commit 5ba69ea

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