- open dbtype dbinitprocedure
Opens a connection to the database of type dbtype with connection information in the dbinit alist. An opaque db handle is returned.
The following symbols are accepted as dbtype:
- sqlite3
- pg
- mysql
Depending on the backend, the dbinit alist supports the following keys:
- dbname: The database name (pg), schema name (mysql) or filename (sqlite3).
- host: The host to connect to (pg, mysql).
- user: The user to connect as (pg, mysql).
- password: The user's password (pg, mysql).
If any are omitted, the database driver's defaults are used. In the case of MySQL, this means .my.cnf is consulted, and in the case of Postgres, .pgpass and various PG environment variables are consulted. Check the manual of your database system for more info.