Skip to content
Permalink
Browse files

Merge pull request #1935 from gioman/processing_ogr_better_quotes

better quotes in processing/ogr import to postgis tools
  • Loading branch information
alexbruy committed Mar 1, 2015
2 parents 3628b43 + 1fd43c4 commit dacddf6e2f6df102a568a4b1838ec1f63a485f27
@@ -70,7 +70,7 @@ def dbConnectionNames(self):
return settings.childGroups()

def defineCharacteristics(self):
self.name = 'Import layer/table as table into PostGIS database (available connections)'
self.name = 'Import layer/table as geometryless table into PostgreSQL database'
self.group = '[OGR] Miscellaneous'
self.DB_CONNECTIONS = self.dbConnectionNames()
self.addParameter(ParameterSelection(self.DATABASE,
@@ -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)'),
@@ -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)
@@ -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)'),
@@ -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)
@@ -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)'),
@@ -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)

0 comments on commit dacddf6

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