|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-6050dcdd58
|
DBMI Library (base) - connect to DB. More...

Go to the source code of this file.
Functions | |
| int | db_set_connection (dbConnection *connection) |
| Set default DB connection settings. | |
| int | db_get_connection (dbConnection *connection) |
| Get default DB connection settings for the current mapset. | |
DBMI Library (base) - connect to DB.
(C) 1999-2009, 2011 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.
Definition in file db/dbmi_base/connect.c.
| int db_get_connection | ( | dbConnection * | connection | ) |
Get default DB connection settings for the current mapset.
| [out] | connection | pointer to dbConnection to be modified |
Definition at line 73 of file db/dbmi_base/connect.c.
References DB_FAILED, db_get_login(), DB_OK, G_getenv_nofatal2(), G_VAR_MAPSET, G_zero(), and NULL.
Referenced by db_start_driver(), V1_close_nat(), and Vect_default_field_info().
| int db_set_connection | ( | dbConnection * | connection | ) |
Set default DB connection settings.
This function sets environmental variables as DB_DRIVER, DB_DATABASE, DB_SCHEMA, DB_GROUP.
| connection | pointer to dbConnection with default settings |
Definition at line 28 of file db/dbmi_base/connect.c.
References DB_OK, G_setenv2(), G_unsetenv2(), and G_VAR_MAPSET.
Referenced by db_set_default_connection().