## For SQLite

The following arguments are used to connect to an SQLite database:

Table 2.

Argument name | Description | Required
--- | --- | ---
DB_NAME | Name of the database. This should be the name of the database file without the ".db" extension. However when opening a database, if a file named after the DB_NAME value exists then it is used (so beware, for example if DB_NAME is set to "mydb" and a file named "mydb" exists but is not an SQLite database, then an error will occur) | Yes
DB_DIR | The directory where the database file is; if not specified, the current working directory is used. | No
EXTRA_FUNCTIONS | If set to TRUE (or unspecified), then some extra functions defined by Libgda are added. The functions are: `gda_file_exists()`, `gda_hex_print()`, `gda_hex()`, `gda_rmdiacr()`, `gda_lower()` and `gda_upper()`; see below for more information about them. | No
EXTRA_COLLATIONS | If set to TRUE (or unspecified), then some extra collations defined by Libgda are added. They are: `LOCALE` (the strings are compared taking into account UTF8 sorting and the current locale) and `DCASE` (before comparison, all the diacritical signs (for example accents) are removed from the strings and they are converted to lower case). | No

### The `gda_file_exists()` function

This function accepts a filename as argument, and returns 0 if the file with that filename does not exist, or 1 if it does.

### The `gda_hex_print()` function

This function accepts at most 2 arguments, in that order:

- a blob value

- a length (not mandatory)

It returns a string suitable to be printed (where all the non ascii characters are converted to the "\xyz" syntax where "xyz" is the decimal value of the character), limited to the specified length if any.

### The `gda_hex()` function

This function accepts at most 2 arguments, in that order:

- a blob value

- a length (not mandatory)

It returns a hex dump string of the blob value, limited to the specified length if any.

### The `gda_rmdiacr()` function

This function accepts at most 2 arguments, in that order:

- a string value

- a case conversion to do (not mandatory), as a string which must be 'upper' or 'lower'

It returns a string where all the diacritical signs (for example accents) from the input string, and optionally converts the string to upper or lower case if specified. This function takes into account the current locale and is useful to do some text search.

### The `gda_upper()` and `gda_lower()` functions

These function accept one string argument and convert it to upper or lower case, taking into account the locale (the standard SQLite `upper()` and `lower()` functions only operating on ASCII characters).

Also refer to the SQLite's provider's limitations.