Table of Contents
- Getting started
- Virtual methods for providers
- Synchronous / asynchronous mode
- Multi threaded environment
- Methods - provider's information
- Methods - connection management
- Methods - DDL queries
- Methods - transactions management
- Methods - DML queries
- Methods - data representation
- Methods - metadata
- Methods - misc.
- Virtual methods for recordsets
- Virtual methods for Blob operations
- SQL parser
- Assembling all the parts
- Providers' support API
- GdaServerProvider — Base class for all the DBMS providers
- Subclassing GdaDataSelect — Base class for all the data models returned by DBMS providers when a SELECT statement is executed
- GdaPstmt — Base class for prepared statement's
- Quark list — Manages lists of KEY=VALUE pairs
- SQL rendering API — Adapting the SQL to the database's own SQL dialect
- Misc API for database providers — Methods dedicated to implementing providers
For each database engine, Libgda requires an object which maps Libgda's API to the native API offered by that database engine. That object, a database provider needs to inherit GdaServerProvider and implement its virtual methods.
Database provider objects are generally instantiated once by the Libgda framework and can be used several times to open and work on connections to several databases of the same type.
Since Libgda itself is developed in the C language, and that most
providers are also implemented in that language, the Libgda library
itself contains a set of helper classes and functions to guide you
in the addition of a new provider to the GDA framework. Two reference implementations
are provided in the
directory of Libgda's sources:
providers/skel-implementation/capi: a skeleton implementation from scratch for a database accessed through a C API, where all the methods to implement are partially coded
providers/skel-implementation/models: a skeleton implementation to write a provider for sources which are not databases (which do not implement any SQL) such as the Berkeley DB provider (a BDB database is a key/value collection) or the MDB (MS Access files) provider. This kind of provider "export" tables which are in fact data models.
The helper objects and functions to write database providers are documented in the Providers' support API section.