Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

dbapi.h File Reference

Public database API. More...

#include "forms.h"

Include dependency graph for dbapi.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _dbconnector
 Data passed from the application to the driver when initiating a connection. More...

struct  _keyword
 Auto-completion keyword list. More...

struct  db_conn
 Per-connection database structure. More...

struct  DBFieldDef
 Field record. More...

struct  DBTableDef
 Table record. More...


typedef _dbconnector DBConnector
 DBConnector is the type used to refer to the _dbconnector structure.

typedef _keyword Keyword
 Auto-completion keyword list.

typedef db_conn DBConnection
 DBConnection is the type used to refer to the db_conn structure.

typedef DBConnector *(* db_register_func )(void(*error_dialog)(char *, char *))
 Returns an initialised DBConnector for the database driver.


enum  QueryStatus
 Query Status codes.

enum  ConnectStatus
 How to connect.


DBConnectiondb_connect (DBConnector *dbc)
 Connects to the database defined in the current workspace.

DBConnectiondb_connect_url (char *url)
 Connects to the database specified in th URL.

void db_disconnect (DBConnection *conn, void(*display_error)(char *, char *))
 Disconnect from database.

DBConnectordbconnector_new (void)
 Allocates a new empty DBConnector.

Detailed Description

Public database API.

Lionel ULMER , Darryl Luff
This file describes the API functions supported by the database module, and available for use by other modules.

Definition in file dbapi.h.

Function Documentation

DBConnection* db_connect DBConnector   dbc

Connects to the database defined in the current workspace.

dbc  The connector to use.
A pointer to the new DBConnection structure, or NULL on error.

Definition at line 76 of file dbapi.c.

References db_conn::connectionStatus, and _dbconnector::db_connect_callback.

Referenced by db_connect_dialog_reconnect().

DBConnection* db_connect_url char *    url

Connects to the database specified in th URL.

url  The database URL to connect to.
The DBConnection.

Definition at line 42 of file dbapi.c.

References db_conn::connectionStatus, _dbconnector::db_connect_callback, _dbconnector::db_frm, dburl_get_connector(), and _dbconnector::url_to_form.

Referenced by cfg_parse_cmdline(), and lic_connect().

void db_disconnect DBConnection   conn,
void(*    display_error)(char *, char *)

Disconnect from database.

conn  The connection to disconnect.
display_error  A pointer to an error function with this signature: void display_error(char *title, char *msg). If not NULL, this function is called to display error messages if required.

Definition at line 91 of file dbapi.c.

References db_conn::DBdisconnect, and display_error().

Referenced by gui_disconnect().

DBConnector* dbconnector_new void   

Allocates a new empty DBConnector.

All fields are NULL-filled.

A pointer to a new DBConnector.

Definition at line 68 of file dbapi.c.

Referenced by register_PostgreSQL(), and register_XPath().

Generated on Sun May 9 19:19:21 2004 for GtkSQL by doxygen1.2.18