Skip to content

Commit 5fab46f

Browse files
committedAug 21, 2018
[processing][needs-docs] Refine names for 'Import into PostGIS' algs
Renames the existing algorithms for clarity and consistency to the format 'Export to PostgreSQL...'. Add tags so that they still show when searching for the old names, and add descriptions to make their use more obvious from the toolbox. Fixes #19658
1 parent a7bf4f1 commit 5fab46f

File tree

5 files changed

+39
-5
lines changed

5 files changed

+39
-5
lines changed
 

‎python/plugins/processing/algs/gdal/OgrToPostGis.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,15 @@ def name(self):
163163
return 'importvectorintopostgisdatabasenewconnection'
164164

165165
def displayName(self):
166-
return self.tr('Import vector into PostGIS database (new connection)')
166+
return self.tr('Export to PostgreSQL (new connection)')
167+
168+
def shortDescription(self):
169+
return self.tr('Exports a vector layer to a new PostgreSQL database connection')
170+
171+
def tags(self):
172+
t = self.tr('import,into,postgis,database,vector').split(',')
173+
t.extend(super().tags())
174+
return t
167175

168176
def group(self):
169177
return self.tr('Vector miscellaneous')

‎python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,15 @@ def name(self):
171171
return 'importvectorintopostgisdatabaseavailableconnections'
172172

173173
def displayName(self):
174-
return self.tr('Import vector into PostGIS database (available connections)')
174+
return self.tr('Export to PostgreSQL (available connections)')
175+
176+
def shortDescription(self):
177+
return self.tr('Exports a vector layer to an existing PostgreSQL database connection')
178+
179+
def tags(self):
180+
t = self.tr('import,into,postgis,database,vector').split(',')
181+
t.extend(super().tags())
182+
return t
175183

176184
def group(self):
177185
return self.tr('Vector miscellaneous')

‎python/plugins/processing/algs/qgis/ImportIntoPostGIS.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ def name(self):
115115
return 'importintopostgis'
116116

117117
def displayName(self):
118-
return self.tr('Import into PostGIS')
118+
return self.tr('Export to PostgreSQL')
119+
120+
def shortDescription(self):
121+
return self.tr('Exports a vector layer to a PostgreSQL database')
122+
123+
def tags(self):
124+
return self.tr('import,postgis,table,layer,into,copy').split(',')
119125

120126
def processAlgorithm(self, parameters, context, feedback):
121127
connection = self.parameterAsString(parameters, self.DATABASE, context)

‎python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ def name(self):
8989
return 'postgisexecuteandloadsql'
9090

9191
def displayName(self):
92-
return self.tr('PostGIS execute and load SQL')
92+
return self.tr('PostgreSQL execute and load SQL')
93+
94+
def shortDescription(self):
95+
return self.tr('Executes a SQL command on a PostgreSQL database and loads the result as a table')
96+
97+
def tags(self):
98+
return self.tr('postgis,table,database').split(',')
9399

94100
def processAlgorithm(self, parameters, context, feedback):
95101
connection = self.parameterAsString(parameters, self.DATABASE, context)

‎python/plugins/processing/algs/qgis/PostGISExecuteSQL.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def name(self):
5858
return 'postgisexecutesql'
5959

6060
def displayName(self):
61-
return self.tr('PostGIS execute SQL')
61+
return self.tr('PostgreSQL execute SQL')
62+
63+
def shortDescription(self):
64+
return self.tr('Executes a SQL command on a PostgreSQL database')
65+
66+
def tags(self):
67+
return self.tr('postgis,database').split(',')
6268

6369
def processAlgorithm(self, parameters, context, feedback):
6470
connection = self.parameterAsString(parameters, self.DATABASE, context)

0 commit comments

Comments
 (0)
Please sign in to comment.