GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-f63024f571
db.c File Reference

DBMI Library (client) - open/close driver/database connection. More...

#include <grass/dbmi.h>
#include <grass/glocale.h>
#include "macros.h"
Include dependency graph for db.c:

Go to the source code of this file.

Functions

dbDriverdb_start_driver_open_database (const char *drvname, const char *dbname)
 Open driver/database connection. More...
 
int db_close_database_shutdown_driver (dbDriver *driver)
 Close driver/database connection. More...
 

Detailed Description

DBMI Library (client) - open/close driver/database connection.

(C) 1999-2009 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.

Author
Joel Jones (CERL/UIUC), Radim Blazek

Definition in file db.c.

Function Documentation

◆ db_close_database_shutdown_driver()

int db_close_database_shutdown_driver ( dbDriver driver)

Close driver/database connection.

Parameters
driverdb driver
Returns
DB_OK or DB_FAILED

Definition at line 61 of file db.c.

References db_close_database(), DB_FAILED, DB_OK, db_shutdown_driver(), and G_debug().

Referenced by db_delete_table(), db_get_table_number_of_rows(), V1_close_ogr(), V1_close_pg(), and Vect_cats_set_constraint().

◆ db_start_driver_open_database()

dbDriver* db_start_driver_open_database ( const char *  drvname,
const char *  dbname 
)

Open driver/database connection.

Parameters
drvnamedriver name
dbnamedatabase name
Returns
pointer to dbDriver structure
NULL on failure

Definition at line 28 of file db.c.

References _, db_init_handle(), DB_OK, db_open_database(), db_set_handle(), db_shutdown_driver(), db_start_driver(), driver, G_debug(), G_warning(), and NULL.

Referenced by db_delete_table(), and Vect_cats_set_constraint().