GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-847944e18e
driver_state.c File Reference

DBMI Library (driver) - drivers state. More...

#include <stdlib.h>
#include <grass/dbmi.h>
#include "dbstubs.h"
Include dependency graph for driver_state.c:

Go to the source code of this file.

Functions

void db__init_driver_state (void)
 Initialize driver state. More...
 
dbDriverStatedb__get_driver_state (void)
 Get driver state. More...
 
int db__test_database_open (void)
 Test database connection. More...
 
void db__mark_database_open (const char *dbname, const char *dbschema)
 Mark database as opened. More...
 
void db__mark_database_closed (void)
 Mark database as closed. More...
 
void db__add_cursor_to_driver_state (dbCursor *cursor)
 Add cursor do driver state. More...
 
void db__drop_cursor_from_driver_state (dbCursor *cursor)
 Drop cursor from driver state. More...
 
void db__close_all_cursors (void)
 Close all cursors. More...
 

Detailed Description

DBMI Library (driver) - drivers state.

(C) 1999-2008 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 driver_state.c.

Function Documentation

◆ db__add_cursor_to_driver_state()

void db__add_cursor_to_driver_state ( dbCursor cursor)

Add cursor do driver state.

Parameters
cursordb cursor to be added

Definition at line 78 of file driver_state.c.

References db_realloc(), list, NULL, and state.

◆ db__close_all_cursors()

void db__close_all_cursors ( void  )

Close all cursors.

Definition at line 120 of file driver_state.c.

References db_driver_close_cursor, db_free(), NULL, and state.

Referenced by db_d_close_database().

◆ db__drop_cursor_from_driver_state()

void db__drop_cursor_from_driver_state ( dbCursor cursor)

Drop cursor from driver state.

Parameters
cursordb cursor to be dropped

Definition at line 108 of file driver_state.c.

References NULL, and state.

Referenced by db_d_close_cursor().

◆ db__get_driver_state()

dbDriverState* db__get_driver_state ( void  )

Get driver state.

Returns
pointer to dbDriverState

Definition at line 34 of file driver_state.c.

References state.

◆ db__init_driver_state()

void db__init_driver_state ( void  )

Initialize driver state.

Definition at line 24 of file driver_state.c.

References db_zero(), and state.

Referenced by db_d_close_database().

◆ db__mark_database_closed()

void db__mark_database_closed ( void  )

Mark database as closed.

Definition at line 66 of file driver_state.c.

References db_free(), and state.

Referenced by db_d_close_database().

◆ db__mark_database_open()

void db__mark_database_open ( const char *  dbname,
const char *  dbschema 
)

Mark database as opened.

Parameters
dbnamedatabase name
dbschemadatabase schema name

Definition at line 56 of file driver_state.c.

References db_store(), and state.

Referenced by db_d_open_database().

◆ db__test_database_open()

int db__test_database_open ( void  )

Test database connection.

Returns
1 opened
0 closed

Definition at line 45 of file driver_state.c.

References state.

Referenced by db_d_close_database(), and db_d_open_database().