[GRASS-SVN] r42468 - grass/branches/develbranch_6/db/base
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 3 11:42:35 EDT 2010
Author: martinl
Date: 2010-06-03 11:42:34 -0400 (Thu, 03 Jun 2010)
New Revision: 42468
Modified:
grass/branches/develbranch_6/db/base/execute.c
grass/branches/develbranch_6/db/base/select.c
Log:
db.exectute/select: guisections clean up
Modified: grass/branches/develbranch_6/db/base/execute.c
===================================================================
--- grass/branches/develbranch_6/db/base/execute.c 2010-06-03 15:36:20 UTC (rev 42467)
+++ grass/branches/develbranch_6/db/base/execute.c 2010-06-03 15:42:34 UTC (rev 42468)
@@ -5,7 +5,7 @@
* AUTHOR(S): Radim Blazek <radim.blazek gmail.com> (original contributor)
* Huidae Cho <grass4u gmail.com>, Glynn Clements <glynn gclements.plus.com>, Hamish Bowman <hamish_b yahoo.com>, Markus Neteler <neteler itc.it>, Stephan Holl
* PURPOSE: process one non-select sql statement
- * COPYRIGHT: (C) 2002-2006 by the GRASS Development Team
+ * COPYRIGHT: (C) 2002-2006, 2010 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
@@ -111,13 +111,16 @@
input = G_define_standard_option(G_OPT_F_INPUT);
input->required = NO;
input->description = _("Name of file containing SQL statements");
-
+ input->guisection = _("Query");
+
driver = G_define_standard_option(G_OPT_DRIVER);
driver->options = db_list_drivers();
+ driver->guisection = _("Connection");
if ((drv = db_get_default_driver_name()))
driver->answer = (char *) drv;
database = G_define_standard_option(G_OPT_DATABASE);
+ database->guisection = _("Connection");
if ((db = db_get_default_database_name()))
database->answer = (char *) db;
Modified: grass/branches/develbranch_6/db/base/select.c
===================================================================
--- grass/branches/develbranch_6/db/base/select.c 2010-06-03 15:36:20 UTC (rev 42467)
+++ grass/branches/develbranch_6/db/base/select.c 2010-06-03 15:42:34 UTC (rev 42468)
@@ -9,7 +9,7 @@
* Markus Neteler <neteler itc.it>
* Stephan Holl
* PURPOSE: Process one sql select statement
- * COPYRIGHT: (C) 2002-2009 by the GRASS Development Team
+ * COPYRIGHT: (C) 2002-2010 by the GRASS Development Team
*
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
@@ -187,20 +187,6 @@
/* Initialize the GIS calls */
G_gisinit(argv[0]);
- table = G_define_standard_option(G_OPT_TABLE);
- table->guisection = _("Query");
-
- database = G_define_standard_option(G_OPT_DATABASE);
- if ((db = db_get_default_database_name()))
- database->answer = (char *) db;
- database->guisection = _("Query");
-
- driver = G_define_standard_option(G_OPT_DRIVER);
- driver->options = db_list_drivers();
- if ((drv = db_get_default_driver_name()))
- driver->answer = (char *) drv;
- driver->guisection = _("Query");
-
sql = G_define_option();
sql->key = "sql";
sql->type = TYPE_STRING;
@@ -212,9 +198,23 @@
input = G_define_standard_option(G_OPT_F_INPUT);
input->required = NO;
- input->description = _("Name of file with sql statement");
+ input->description = _("Name of file with SQL select statement(s)");
input->guisection = _("Query");
+ table = G_define_standard_option(G_OPT_TABLE);
+ table->guisection = _("Connection");
+
+ database = G_define_standard_option(G_OPT_DATABASE);
+ if ((db = db_get_default_database_name()))
+ database->answer = (char *) db;
+ database->guisection = _("Connection");
+
+ driver = G_define_standard_option(G_OPT_DRIVER);
+ driver->options = db_list_drivers();
+ if ((drv = db_get_default_driver_name()))
+ driver->answer = (char *) drv;
+ driver->guisection = _("Connection");
+
fs = G_define_standard_option(G_OPT_F_SEP);
fs->description = _("Output field separator");
fs->guisection = _("Format");
More information about the grass-commit
mailing list