| Portability | portable | 
|---|---|
| Stability | experimental | 
| Maintainer | chucky@dtek.chalmers.se | 
| Safe Haskell | None | 
Database.HaskellDB.DriverAPI
Description
This exports an API that all drivers must conform to. It is used by the end user to load drivers either dynamically or statically.
- data DriverInterface = DriverInterface {}
 - class Monad m => MonadIO m
 - defaultdriver :: DriverInterface
 - getOptions :: Monad m => [String] -> [(String, String)] -> m [String]
 - getAnnotatedOptions :: Monad m => [(String, String)] -> [(String, String)] -> m [String]
 - getGenerator :: Monad m => [(String, String)] -> m SqlGenerator
 
Documentation
data DriverInterface Source
Interface which drivers should implement.
   The connect function takes some driver specific name, value pairs
   use to setup the database connection, and a database action to run.
   requiredOptions lists all required options with a short description,
   that is printed as help in the DBDirect program.
Constructors
| DriverInterface | |
defaultdriver :: DriverInterfaceSource
Default dummy driver, real drivers should overload this
Arguments
| :: Monad m | |
| => [String] | names of options to get  | 
| -> [(String, String)] | options given  | 
| -> m [String] | a list of the same length as the first argument with the values of each option. Fails in the given monad if any options is not found.  | 
Can be used by drivers to get option values from the given list of name, value pairs.
Arguments
| :: Monad m | |
| => [(String, String)] | names and descriptions of options to get  | 
| -> [(String, String)] | options given  | 
| -> m [String] | a list of the same length as the first argument with the values of each option. Fails in the given monad if any options is not found.  | 
Can be used by drivers to get option values from the given
   list of name, value pairs.
   It is intended for use with the requiredOptions value of the driver.
Arguments
| :: Monad m | |
| => [(String, String)] | options given  | 
| -> m SqlGenerator | An SQL generator. If there was no generator option, the default is used. Fails if the generator is unknown  | 
Gets an SqlGenerator from the generator option in the given list.
   Currently available generators: mysql, postgresql, sqlite, default