Actual DBMS implementation

In this section are some recommandations on how to handle some specific items for each DBMS.

Data types handling

libgda has some defined data types, covering all the usual data types (strings, numbers, dates, binary, etc). However, because each DBMS has some more specific data types (like for example arrays, IP adresses), and it is sometimes possible to create some user defined data types, not all the data types can be known by libgda.

So, for the most common ones where a libgda data type exists, it will be used, and otherwise the Gda_TypeUnknown will be used (and then is it up to the application programmer using libgda to take good care of that information).

Schemas requests

Under libgda, the client application cannot know the DBMS to which it is connected, but as it can know if the DBMS supports some features and what are the tables, sequences, indexes, etc in the DB.

One of the most time consuming jobs is to write the fuctions to return answers to all these client requests.

Functions to implement

The basic work to do is implement a set of functions necessary for the gda-server library to manipulate the provider. When a provider wants to start, it has to give pointers to these fuctions in a structure (see the main-DBMS.c file for this).

The other sets of functions to implement are schemas requests functions. Among the functions that you MUST implement is a function to request schemas. This function can be implemented in the way you want, but a common practice (used in all the 'standard' libgda providers), is to have this function call other functions depending on the type of schema requested by the client application.