:: String | The type of the database, which can be one of odbc, mysql,
sqlite or postgresql.
| -> [String] | An ordered list of arguments needed to connect to the database.
| -> (Database -> IO a) | Function/query to be performed on the database.
| -> IO a | Result of the function/query.
| The function genericConnect connects to a database and performs
a given function on the database and return the result of the funtion.
The funtion takes as argument the type of the database, an
ordered list of arguments depends on which depends on the type of
the database.
- odbc
- dsn, userid and password.
- mysql
- server, database, userid and password.
- sqlite
- filepath and IOMode.
- postgresql
- server, database, userid and password.
|
|