Overview of the backends

A backend (or driver) is a library libgixsql-<driver> that implements the access to one kind of database. libgixsql loads it when a program connects, according to the prefix of the connection string. A program can use several backends at the same time, with several connections.

Driver Database Connection string Chapter
pgsql PostgreSQL pgsql://host[:port]/database PostgreSQL
oracle Oracle Database oracle://host[:port]/service Oracle
mysql MySQL, MariaDB mysql://host[:port]/database MySQL and MariaDB
odbc any ODBC data source odbc://dsn ODBC
sqlite SQLite sqlite://path SQLite

Feature support

Feature pgsql oracle mysql odbc sqlite
Autocommit native autocommit transactions autocommit driver ?
Native cursors yes (default) yes emulated driver emulated
Updatable cursors native cursors yes emulated driver emulated
client_encoding yes no (NLS_LANG) yes ? no
Default placeholder $1 :1 (accepts $1) ? ? any
NoteTo be verified

Every cell of this table, and the cells marked “?”.

Choosing the placeholder style

The SQL statements of the program are generated with the placeholder style chosen at precompile time (-z, Parameter placeholders). It must be accepted by the backend used at run time:

  • -z d (default): PostgreSQL, Oracle, SQLite;
  • -z a: ODBC, MySQL, SQLite;
  • -z c: Oracle, SQLite.