[GRASS-SVN] r42467 - in grass/trunk/db: db.execute db.select

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 3 11:36:22 EDT 2010


Author: martinl
Date: 2010-06-03 11:36:20 -0400 (Thu, 03 Jun 2010)
New Revision: 42467

Modified:
   grass/trunk/db/db.execute/main.c
   grass/trunk/db/db.select/main.c
Log:
db.exectute/select: guisections clean up


Modified: grass/trunk/db/db.execute/main.c
===================================================================
--- grass/trunk/db/db.execute/main.c	2010-06-03 15:23:30 UTC (rev 42466)
+++ grass/trunk/db/db.execute/main.c	2010-06-03 15:36:20 UTC (rev 42467)
@@ -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-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
@@ -117,14 +117,17 @@
 
     driver = G_define_standard_option(G_OPT_DB_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_DB_DATABASE);
+    database->guisection = _("Connection");
     if ((db = db_get_default_database_name()))
 	database->answer = (char *) db;
 
     schema = G_define_standard_option(G_OPT_DB_SCHEMA);
+    schema->guisection = _("Connection");
     if ((schema_name = db_get_default_schema_name()))
 	schema->answer = (char *) schema_name;
 

Modified: grass/trunk/db/db.select/main.c
===================================================================
--- grass/trunk/db/db.select/main.c	2010-06-03 15:23:30 UTC (rev 42466)
+++ grass/trunk/db/db.select/main.c	2010-06-03 15:36:20 UTC (rev 42467)
@@ -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_DB_TABLE);
-    table->guisection = _("Query");
-
-    database = G_define_standard_option(G_OPT_DB_DATABASE);
-    if ((db = db_get_default_database_name()))
-	database->answer = (char *) db;
-    database->guisection = _("Query");
-
-    driver = G_define_standard_option(G_OPT_DB_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_DB_TABLE);
+    table->guisection = _("Connection");
 
+    database = G_define_standard_option(G_OPT_DB_DATABASE);
+    if ((db = db_get_default_database_name()))
+	database->answer = (char *) db;
+    database->guisection = _("Connection");
+
+    driver = G_define_standard_option(G_OPT_DB_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