Pārlūkot izejas kodu

v.db.addcolumn, v.db.addtable + manual: clarify and standardize name and type of new column(s)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68770 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 gadi atpakaļ
vecāks
revīzija
8246103d7a

+ 4 - 0
lib/db/sqlp/sql.html

@@ -76,6 +76,10 @@ d.vect map where="individual='juvenile' and area='beach'"
 <li> DBF column names are limited to 10 characters (DBF API definition).</li>
 </ul>
 
+<h3>Database table column types</h3>
+
+The supported types of columns depend on the database backend. However, all backends
+should support VARCHAR, INT, DOUBLE PRECISION and DATE.
 
 <h2>EXAMPLES</h2>
 

+ 3 - 1
scripts/v.db.addcolumn/v.db.addcolumn.py

@@ -34,8 +34,10 @@
 #% key: columns
 #% type: string
 #% label: Name and type of the new column(s) ('name type [,name type, ...]')
-#% description: Data types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE
+#% description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), type integer'
 #% required: yes
+#% multiple: yes
+#% key_desc: name type
 #%end
 
 import sys

+ 3 - 3
scripts/v.db.addtable/v.db.addtable.html

@@ -9,8 +9,8 @@ the MAPSET database settings (see <em>db.connect</em>).
 
 <em>v.db.addtable</em> is a front-end to <em>db.execute</em> to allow easier
 usage.
-
-v.db.addtable will only insert category values into the table for those features 
+<p>
+<em>v.db.addtable</em> will only insert category values into the table for those features 
 which actually have a category value in the relevant layer. The use can add 
 category values automatically by using <em>v.category</em> or manually with 
 <em><a href="wxGUI.vdigit.html">wxGUI vector digitizer</a></em>
@@ -18,7 +18,7 @@ before running v.db.addtable. Or one can run v.db.addtable first
 and then use either a combinatino of <em>v.category</em> + <em>v.to.db</em> or 
 <em><a href="wxGUI.vdigit.html">wxGUI vector digitizer</a></em>
 to add the relevant lines to the table.
-
+<p>
 The supported types of columns depend on the database backend. However, all
 backends should support VARCHAR, INT, DOUBLE PRECISION and DATE.
 <p>The existing database connection(s) can be verified with <em>v.db.connect</em>.

+ 2 - 2
scripts/v.db.addtable/v.db.addtable.py

@@ -44,8 +44,8 @@
 #%option
 #% key: columns
 #% type: string
-#% label: Name and type of the new column(s)
-#% description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: "label varchar(250), type integer"
+#% label: Name and type of the new column(s) ('name type [,name type, ...]')
+#% description: Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: 'label varchar(250), type integer'
 #% required: no
 #% multiple: yes
 #% key_desc: name type