The Libgda library allows several connections to databases to be opened at once. Once a connection (manipulated through the GdaConnection object) has been created and is opened, it is able to proceed GdaStatement statements.
Each GdaStatement can only hold one SQL statement (such as SELECT, INSERT, CREATE TABLE, BEGIN, etc); statements can be grouped together into GdaBatch batches objects. There are two ways for creating a GdaStatement object:
either by passing an SQL string to a parser (a GdaSqlParser).
Libgda unifies the way variables (also known as "placeholders") are defined (because each database type has its own syntax for doing so); consult the GdaSqlParser object's documentation for a description of this syntax.
by building it from its structure: see the GdaSqlStatement for reference. However keep in mind that this API is meant to be used primarily by database provider's implementations and for Libgda's internal usage. A more user friendly API will be added in the future.
The following schema illustrates how a statement is created and executed:

As each database implements its own SQL variant (all variants more or less close to the SQL92 or SQL99 standards), the Libgda library allows one to use either a generic SQL parser, or a parser provided by each database adapter (database provider), through the gda_connection_create_parser() method.
The following schema illustrates how a statement is executed:
