Libgda's sources contain templates to get started in creating a new database provider. The following templates are available:
the template in the
providers/skel-implementation/capidirectory which can be used when writing a provider using the database's C or C++ API (for example the PostgreSQL or MySQL providers)the template in the
providers/skel-implementation/modelsdirectory which can be used when writing a provider for a system which is not a relational database (or does offer a very limited API, such as for the MS Access or Berkeley DB systems).
In any case, for example to create a DummyDb provider, follow these steps:
copy one of the template's directory into a new directory named
dummydbFrom inside that new directory, run the
providers/prepare_provider_sources.shscript with the name of the provider ("dummydb" here), the author's name and the author's email adress, which replaces all the class and object names with the name of the provider and renames the files correctly. These new sources should be compilable without any modification.Edit the
Makefile.amto add provider specific compilation and link flagsIntegrate the provider's new code into a compilation unit: either Libgda's sources in the
providersdirectory or in your own application (this step usually involves modifying theconfigure.acorconfigure.infiles).Implement the missing parts (it is usually a good idea to look how other provider's implementations are done to get ideas).
