Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better quotes in processing/ogr import to postgis tools
  • Loading branch information
Giovanni Manghi committed Mar 1, 2015
1 parent 3628b43 commit dfc5670
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -88,7 +88,7 @@ def defineCharacteristics(self):
self.tr('Primary key (existing field, used if the above option is left empty)'),
self.INPUT_LAYER, optional=True))
self.addParameter(ParameterString(self.WHERE,
self.tr('Select features using a SQL "WHERE" statement (Ex: column="value")'),
self.tr('Select features using a SQL "WHERE" statement (Ex: column=\'value\')'),
'', optional=True))
self.addParameter(ParameterString(self.GT,
self.tr('Group N features per transaction (Default: 20000)'),
Expand Down Expand Up @@ -128,7 +128,7 @@ def processAlgorithm(self, progress):
pkstring = "-lco FID="+pk
primary_key = self.getParameterValue(self.PRIMARY_KEY)
where = unicode(self.getParameterValue(self.WHERE))
wherestring = "-where '"+where+"'"
wherestring = '-where "'+where+'"'
gt = unicode(self.getParameterValue(self.GT))
overwrite = self.getParameterValue(self.OVERWRITE)
append = self.getParameterValue(self.APPEND)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgis.py
Expand Up @@ -122,7 +122,7 @@ def defineCharacteristics(self):
self.tr('Clip the input layer using the above (rectangle) extent'),
False))
self.addParameter(ParameterString(self.WHERE,
self.tr('Select features using a SQL "WHERE" statement (Ex: column="value")'),
self.tr('Select features using a SQL "WHERE" statement (Ex: column=\'value\')'),
'', optional=True))
self.addParameter(ParameterString(self.GT,
self.tr('Group N features per transaction (Default: 20000)'),
Expand Down Expand Up @@ -175,7 +175,7 @@ def processAlgorithm(self, progress):
ogrspat = self.ogrConnectionString(spat)
clip = self.getParameterValue(self.CLIP)
where = unicode(self.getParameterValue(self.WHERE))
wherestring = "-where '"+where+"'"
wherestring = '-where "'+where+'"'
gt = unicode(self.getParameterValue(self.GT))
overwrite = self.getParameterValue(self.OVERWRITE)
append = self.getParameterValue(self.APPEND)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Expand Up @@ -124,7 +124,7 @@ def defineCharacteristics(self):
self.tr('Clip the input layer using the above (rectangle) extent'),
False))
self.addParameter(ParameterString(self.WHERE,
self.tr('Select features using a SQL "WHERE" statement (Ex: column="value")'),
self.tr('Select features using a SQL "WHERE" statement (Ex: column=\'value\')'),
'', optional=True))
self.addParameter(ParameterString(self.GT,
self.tr('Group N features per transaction (Default: 20000)'),
Expand Down Expand Up @@ -181,7 +181,7 @@ def processAlgorithm(self, progress):
ogrspat = self.ogrConnectionString(spat)
clip = self.getParameterValue(self.CLIP)
where = unicode(self.getParameterValue(self.WHERE))
wherestring = "-where '"+where+"'"
wherestring = '-where "'+where+'"'
gt = unicode(self.getParameterValue(self.GT))
overwrite = self.getParameterValue(self.OVERWRITE)
append = self.getParameterValue(self.APPEND)
Expand Down

0 comments on commit dfc5670

Please sign in to comment.