diff --git a/db/db.connect/db.connect.html b/db/db.connect/db.connect.html index 48d6dbee02f..434124b4e65 100644 --- a/db/db.connect/db.connect.html +++ b/db/db.connect/db.connect.html @@ -36,7 +36,7 @@

SQLite (default backend)

PostgreSQL (local connection)

Local storage, database tables stored in database "mydb" -(may require the use of db.login): +(may require the use of db.login):
 db.connect driver=pg database=mydb
@@ -49,7 +49,7 @@ 

PostgreSQL (local connection)

PostgreSQL (network connection)

Network storage, database tables stored in database "mydb" -(may require the use of db.login): +(may require the use of db.login):
 db.connect driver=pg database=mydb
@@ -62,7 +62,7 @@ 

PostgreSQL (network connection)

MySQL (local connection)

Local storage, database tables stored in database "mydb" (may require -the use of db.login): +the use of db.login):
 db.connect driver=mysql database=mydb
@@ -75,7 +75,7 @@ 

MySQL (local connection)

MySQL (network connection)

Network storage, database tables stored in database "mydb" -(may require the use of db.login): +(may require the use of db.login):
 db.connect driver=mysql database=mydb
@@ -88,7 +88,7 @@ 

MySQL (network connection)

ODBC

Network storage, database tables stored in database "mydb" -(may require the use of db.login): +(may require the use of db.login):
 db.connect driver=odbc database=mydb
diff --git a/db/drivers/README b/db/drivers/README
deleted file mode 100644
index e2a2d435f2e..00000000000
--- a/db/drivers/README
+++ /dev/null
@@ -1,28 +0,0 @@
-This directory contains drivers for the DBMI library.
-The driver functions are for internal usage.
-
-The DBMI API to be used for module programming is available in:
-lib/db/
-
-
-NOTE:
-db__driver_* functions are implemented in a driver.  If some of them
-are not used or defined, the driver will use stub functions in
-lib/db/stubs/
-
-For some platforms like Cygwin, multiply defined symbols are not
-resolved in a way that UNIX does.  Even worse is that it is impossible
-to build shared libraries with undefined symbols.  For example,
-libgrass_dbmidriver.so cannot be built without any implementations
-of db__driver_* functions which should be specific to a db driver.
-
-To work around this problem, function pointers are defined to use
-driver's implementations instead of those of the db stubs library.
-To do this automatically, run '../mk_dbdriver_h.sh' in driver's
-directory, #include "dbdriver.h" from main.c, and execute init_dbdriver().
-
-Function pointers are defined in grass6/lib/db/dbmi_driver/dbstubs.h
-This header file can be generated with
-lib/db/dbmi_driver/mk_dbstubs_h.sh
-
-Please read lib/db/README
diff --git a/db/drivers/README.md b/db/drivers/README.md
new file mode 100644
index 00000000000..e98c617267c
--- /dev/null
+++ b/db/drivers/README.md
@@ -0,0 +1,30 @@
+This directory contains drivers for the DBMI library.
+The driver functions are for internal usage.
+
+The DBMI API to be used for module programming is available in:
+`lib/db/`
+
+NOTE:
+`db__driver_*` functions are implemented in a driver. If some of them
+are not used or defined, the driver will use stub functions in
+`lib/db/stubs/`.
+
+For some platforms like Cygwin, multiply defined symbols are not
+resolved in a way that UNIX does. Even worse is that it is impossible
+to build shared libraries with undefined symbols. For example,
+`libgrass*dbmidriver.so` cannot be built without any implementations
+of `db__driver*\*` functions which should be specific to a db driver.
+
+To work around this problem, function pointers are defined to use
+driver's implementations instead of those of the db stubs library.
+To do this automatically, run `../mk_dbdriver_h.sh` (GRASS GIS 6)
+in driver's directory, `#include "dbdriver.h"` from `main.c`, and
+execute `init_dbdriver()`.
+
+Function pointers are defined in `lib/db/dbmi_driver/dbstubs.h`
+This header file can be generated with
+`lib/db/dbmi_driver/mk_dbstubs_h.sh` (GRASS GIS 6).
+
+Please read lib/db/README.md and
+
+
diff --git a/db/drivers/mysql/grass-mesql.html b/db/drivers/mysql/grass-mesql.html
index e04b30a2a8f..1cbe952da41 100644
--- a/db/drivers/mysql/grass-mesql.html
+++ b/db/drivers/mysql/grass-mesql.html
@@ -1,28 +1,7 @@
-
-
-
-GRASS-MySQL embedded driver - GRASS GIS manual
- 
- 
- 
- 
-
-
-
-GRASS logo
- -

MySQL embedded driver in GRASS

- -

KEYWORDS

- -database, attribute table, driver - -

DESCRIPTION

-MySQL database driver in GRASS enables GRASS to store vector -attributes in MySQL embedded database without necessity -to run MySQL server. +MySQL database driver enables GRASS to store vector attributes +in MySQL embedded database without necessity to run MySQL server.

Driver and database name

@@ -68,14 +47,7 @@

Troubleshooting: SQL syntax error

Attempting to use a reserved SQL word as column or table name will result in a "SQL syntax" error. The list of reserved words for MySQL can be -found in the MySQL manual. - -

SEE ALSO

- - -db.connect, -SQL support in GRASS GIS - +found in the MySQL manual.

AUTHOR

@@ -84,11 +56,11 @@

AUTHOR

Credits: Development of the driver was sponsored by Faunalia (Italy) -as part of a project for ATAC. +as part of a project for ATAC. +

SEE ALSO

-
-

Main index - Database index - Topics index - Keywords Index - Full index

-

© 2003-2022 GRASS Development Team, GRASS GIS 8 Reference Manual

- - + +db.connect, +SQL support in GRASS GIS + diff --git a/db/drivers/mysql/grass-mysql.html b/db/drivers/mysql/grass-mysql.html index af8c0273d98..8fdbc831a31 100644 --- a/db/drivers/mysql/grass-mysql.html +++ b/db/drivers/mysql/grass-mysql.html @@ -1,7 +1,7 @@ -MySQL database driver enables GRASS to store vector attributes in -MySQL server. +MySQL database driver enables GRASS to store vector attributes +in MySQL server.

Because vector attribute tables @@ -36,30 +36,31 @@

Driver and database name

  • port - server port number +

    Examples of connection parameters:

    -  db.connect driver=mysql database=mytest
    -  db.connect driver=mysql database='dbname=mytest,host=test.grass.org'
    +db.connect driver=mysql database=mytest
    +db.connect driver=mysql database='dbname=mytest,host=test.grass.org'
     

    Data types

    GRASS supports almost all MySQL data types with following limitations:
      -
    • Binary columns (BINARY, VARBINARY, TINYBLOB, MEDIUMBLOB, - BLOB, LONGBLOB) are not not supported. - If a table with binary column(s) is used in GRASS - a warning is printed and only the supported columns are - returned in query results. +
    • Binary columns (BINARY, VARBINARY, TINYBLOB, MEDIUMBLOB, +BLOB, LONGBLOB) are not not supported. +If a table with binary column(s) is used in GRASS +a warning is printed and only the supported columns are +returned in query results. -
    • Columns of type SET and ENUM are represented as string (VARCHAR). +
    • Columns of type SET and ENUM are represented as string (VARCHAR). -
    • Very large integers in columns of type BIGINT can be lost - or corrupted because GRASS does not support 64 bin integeres - on most platforms. +
    • Very large integers in columns of type BIGINT can be lost +or corrupted because GRASS does not support 64 bin integeres +on most platforms. -
    • GRASS does not currently distinguish types TIMESTAMP and - DATETIME. Both types are in GRASS interpreted as TIMESTAMP. +
    • GRASS does not currently distinguish types TIMESTAMP and +DATETIME. Both types are in GRASS interpreted as TIMESTAMP.

    Indexes

    @@ -104,7 +105,16 @@

    Troubleshooting: SQL syntax error

    Attempting to use a reserved SQL word as column or table name will result in a "SQL syntax" error. The list of reserved words for MySQL can be -found in the MySQL manual. +found in the MySQL manual. + +

    AUTHOR

    + +Radim Blazek + +

    +Credits: Development of the driver was sponsored by +Faunalia (Italy) +as part of a project for ATAC.

    SEE ALSO

    @@ -112,13 +122,3 @@

    SEE ALSO

    db.connect, SQL support in GRASS GIS - -

    Credits

    - -Development of the driver was sponsored by -Faunalia (Italy) -as part of a project for ATAC. - -

    AUTHOR

    - -Radim Blazek diff --git a/db/drivers/postgres/execute.c b/db/drivers/postgres/execute.c index fa6dd556101..99a6c79df11 100644 --- a/db/drivers/postgres/execute.c +++ b/db/drivers/postgres/execute.c @@ -1,7 +1,7 @@ /*! \file db/driver/postgres/execute.c - \brief DBMI - Low Level PostgreSQL database driver - execute statemets + \brief DBMI - Low Level PostgreSQL database driver - execute statements This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details. diff --git a/db/drivers/sqlite/grass-sqlite.html b/db/drivers/sqlite/grass-sqlite.html index ae59def1e52..ea2f9526506 100644 --- a/db/drivers/sqlite/grass-sqlite.html +++ b/db/drivers/sqlite/grass-sqlite.html @@ -69,9 +69,13 @@

    SEE ALSO

    db.connect, db.execute, db.select -

    + +

    + SQL support in GRASS GIS -

    +
    +

    + SQLite web site, SQLite manual, sqlite - Management Tools diff --git a/doc/vector/TODO b/doc/vector/TODO index 75671559263..d43bffca15d 100644 --- a/doc/vector/TODO +++ b/doc/vector/TODO @@ -205,7 +205,7 @@ implemented in all drivers. SQLite driver ------------- Current implementation is very slow with large updates/inserts. I -think that it is because all statemets are parsed and it should be +think that it is because all statements are parsed and it should be possible to improve by insert/update cursors (see above). DBF driver diff --git a/lib/db/README b/lib/db/README deleted file mode 100644 index 9dc8faf9ab6..00000000000 --- a/lib/db/README +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** - * - * MODULE: DBMI library - * AUTHOR(S): Joel Jones (CERL/UIUC) - * Radim Blazek , - * Brad Douglas , - * Glynn Clements , - * Roberto Flor, Hamish Bowman , - * Markus Neteler , - * Huidae Cho , - * Paul Kelly , - * Martin Landa , - * Moritz Lennert , - * Daniel Calvelo Aros , - * Bernhard Reiter , - * Alex Shevlakov - * PURPOSE: database management functions for modules and drivers - * COPYRIGHT: (C) 2003-2006 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 - * for details. - * - *****************************************************************************/ - -DBMI Library - -Original author: Joel Jones (jjones * zorro.cecer.army.mil | jjones * uiuc.edu ) - Ref: https://lists.osgeo.org/pipermail/grass-dev/1995-February/002015.html - -Directory contents: - -dbmi: DataBase Management Interface (db_*() functions) - dbmi_base: contains functions for modules, drivers (../../db/drivers/) - dbmi_client: contains functions for modules - dbmi_driver: contains functions for drivers (../../db/drivers/) - -sqlp: SQL parser library -stubs: stubs for unimplemented DB functions - -The DBMI drivers are stored in -../../db/drivers/ - -The DBMI user modules are stored in -../../db/base/ - -NOTE: - Please read db/drivers/README - -To generate dbmi_driver/dbstubs.h automatically, run './mk_dbstubs_h.sh' in -dbmi_driver/ directory. diff --git a/lib/db/README.md b/lib/db/README.md new file mode 100644 index 00000000000..227d628fa48 --- /dev/null +++ b/lib/db/README.md @@ -0,0 +1,59 @@ +## DBMI library + +### Purpose + +Database management functions for modules and drivers. + +### Authors + +Original author: + +- Joel Jones (CERL/UIUC) (jjones zorro.cecer.army.mil) + +Ref: + +Further authors: + +- Radim Blazek (radim.blazek gmail.com) +- Brad Douglas (rez touchofmadness.com) +- Glynn Clements (glynn gclements.plus.com) +- Roberto Flor, Hamish Bowman (hamish_b yahoo.com) +- Markus Neteler (neteler itc.it) +- Huidae Cho (grass4u gmail.com) +- Paul Kelly (paul-grass stjohnspoint.co.uk) +- Martin Landa (landa.martin gmail.com) +- Moritz Lennert (mlennert club.worldonline.be) +- Daniel Calvelo Aros (dca.gis gmail.com) +- Bernhard Reiter (bernhard intevation.de) +- Alex Shevlakov (sixote yahoo.com) + +### Copyright + +(C) 2003-2024 by the GRASS Development Team + +### License + +This program is free software under the GNU General Public +License (>=v2). Read the file COPYING that comes with GRASS +for details. + +### Directory contents + +- `dbmi/`: DataBase Management Interface (`db_*()` functions) + - `dbmi_base/`: contains functions for modules, drivers (`../../db/drivers/`) + - `dbmi_client/`: contains functions for modules + - `dbmi_driver/`: contains functions for drivers (`../../db/drivers/`) +- `sqlp/`: SQL parser library +- `stubs/`: stubs for unimplemented DB functions + +The DBMI drivers are stored in +`../../db/drivers/` + +The DBMI user modules are stored in +`../../db/base/` + +NOTE: +Please read db/drivers/README.md + +To generate `dbmi_driver/dbstubs.h` automatically, run `./mk_dbstubs_h.sh` in +`dbmi_driver/` directory (GRASS GIS 6). diff --git a/lib/db/dbmi_client/c_update.c b/lib/db/dbmi_client/c_update.c index 9a8a0d6e4cd..399f19d8155 100644 --- a/lib/db/dbmi_client/c_update.c +++ b/lib/db/dbmi_client/c_update.c @@ -1,7 +1,7 @@ /*! * \file db/dbmi_client/c_update.c * - * \brief DBMI Library (client) - update statemets + * \brief DBMI Library (client) - update statements * * (C) 1999-2008 by the GRASS Development Team * diff --git a/lib/db/dbmi_driver/d_update.c b/lib/db/dbmi_driver/d_update.c index 5d601679082..ed7a501a7c4 100644 --- a/lib/db/dbmi_driver/d_update.c +++ b/lib/db/dbmi_driver/d_update.c @@ -1,7 +1,7 @@ /*! * \file db/dbmi_driver/d_update.c * - * \brief DBMI Library (driver) - update statemets + * \brief DBMI Library (driver) - update statements * * (C) 1999-2008 by the GRASS Development Team * diff --git a/lib/db/sqlp/README b/lib/db/sqlp/README deleted file mode 100644 index 9a23b0925e8..00000000000 --- a/lib/db/sqlp/README +++ /dev/null @@ -1,18 +0,0 @@ -sqlp is SQL parser library - -sqp is intended as library for simple dbmi drivers (like dbf, txt). -yac.y and lex.l was originally stolen from unixODBC 3/2001 and modified. - -An input may be subset of SQL statements. Currently supported: -SELECT FROM WHERE -INSERT INTO -UPDATE WHERE -DELETE FROM WHERE -CREATE TABLE -DROP TABLE -[...] - -New types have to be added in yac.y, lex.l, print.c and -../../../include/sqlp.h . -In ./test/ is a test program to the the SQL parser (see -README there). diff --git a/lib/db/sqlp/README.md b/lib/db/sqlp/README.md new file mode 100644 index 00000000000..852126fb157 --- /dev/null +++ b/lib/db/sqlp/README.md @@ -0,0 +1,24 @@ +## SQL parser library + +sqlp is the SQL parser library. + +sqp is intended as library for simple dbmi drivers (like dbf, txt). +`yac.y` and `lex.l` was originally stolen from unixODBC 3/2001 and modified. + +An input may be subset of SQL statements. Currently supported: + +```sql +SELECT FROM WHERE +INSERT INTO +UPDATE WHERE +DELETE FROM WHERE +CREATE TABLE +DROP TABLE +[...] +``` + +New types have to be added in `yac.y`, `lex.l`, `print.c` and +`../../../include/sqlp.h`. + +In `./test/` is a test program to the the SQL parser (see +README.md there). diff --git a/lib/db/sqlp/sql.html b/lib/db/sqlp/sql.html index eaed6a74b70..a2dc32da2a5 100644 --- a/lib/db/sqlp/sql.html +++ b/lib/db/sqlp/sql.html @@ -29,19 +29,19 @@

    Database drivers

    - + - + - + @@ -237,4 +237,4 @@

    SEE ALSO

    AUTHOR

    -Radmin Blazek +Radim Blazek diff --git a/lib/db/sqlp/test/README b/lib/db/sqlp/test/README deleted file mode 100644 index d703f03bd0c..00000000000 --- a/lib/db/sqlp/test/README +++ /dev/null @@ -1,6 +0,0 @@ -Test of sql parser library. - -sqlptest reads sql statements (one per row) from standard -input and writes results of parser to standard output. - -Some test statemets are in ./test diff --git a/lib/db/sqlp/test/README.md b/lib/db/sqlp/test/README.md new file mode 100644 index 00000000000..a6aae0fe947 --- /dev/null +++ b/lib/db/sqlp/test/README.md @@ -0,0 +1,6 @@ +## Test of SQL parser library + +`sqlptest` reads SQL statements (one per row) from standard +input and writes results of parser to standard output. + +Some test statements are in `./test`. diff --git a/lib/htmldriver/htmldriver.html b/lib/htmldriver/htmldriver.html index 3e14f240805..3ed24c7662d 100644 --- a/lib/htmldriver/htmldriver.html +++ b/lib/htmldriver/htmldriver.html @@ -185,7 +185,9 @@

    SEE ALSO

    PNG driver, HTML driver, variables -

    + +

    + d.rast, d.vect, d.mon, diff --git a/lib/pngdriver/pngdriver.html b/lib/pngdriver/pngdriver.html index d0eab9f4125..1b1f6b2a2cb 100644 --- a/lib/pngdriver/pngdriver.html +++ b/lib/pngdriver/pngdriver.html @@ -99,7 +99,9 @@

    SEE ALSO

    PS driver, HTML driver, variables -

    +
    +

    + d.rast, d.vect, d.mon, diff --git a/lib/psdriver/psdriver.html b/lib/psdriver/psdriver.html index 3cc9bf7404f..31af82fae88 100644 --- a/lib/psdriver/psdriver.html +++ b/lib/psdriver/psdriver.html @@ -85,7 +85,9 @@

    SEE ALSO

    PNG driver, HTML driver, variables -

    +
    +

    + d.rast, d.vect, d.mon, diff --git a/raster/r.basins.fill/r.basins.fill.html b/raster/r.basins.fill/r.basins.fill.html index a92e242d198..2e210b8298d 100644 --- a/raster/r.basins.fill/r.basins.fill.html +++ b/raster/r.basins.fill/r.basins.fill.html @@ -22,7 +22,6 @@

    DESCRIPTION

    If the resulting map layer from this program appears to have holes within a subbasin, the program should be rerun with a higher number of passes. -

    NOTES

    sqliteData storage in SQLite database files (default DB backend)http://sqlite.org/
    https://sqlite.org/
    dbfData storage in DBF files http://shapelib.maptools.org/dbf_api.html
    pgData storage in PostgreSQL RDBMShttp://postgresql.org/
    https://postgresql.org/
    mysqlData storage in MySQL RDBMShttp://mysql.org/
    https://www.mysql.org/
    odbcData storage via UnixODBC (PostgreSQL, Oracle, etc.) https://www.unixodbc.org/