generic-persistence-0.3.0.1: Database persistence using generics
Safe HaskellSafe-Inferred
LanguageGHC2021

Database.GP.Conn

Synopsis

Documentation

data Conn Source #

This module defines a wrapper around an HDBC IConnection. Using this wrapper Conn simplifies the signature of the functions in the GP module. It allows to use any HDBC connection without having to define a new function for each connection type. It also provides additional attributes to the connection, like the database type and the implicit commit flag. These attributes can be used to implement database specific functionality, modify transaction behaviour, etc.

This code has been inspired by the HDBC ConnectionWrapper and some parts have been copied from the HDBC Database.HDBC.Types module.

A wrapper around an HDBC IConnection.

Constructors

forall conn.IConnection conn => Conn 

Fields

Instances

Instances details
IConnection Conn Source #

manually implement the IConnection type class for the Conn type.

Instance details

Defined in Database.GP.Conn

connect :: forall conn. IConnection conn => Database -> conn -> Conn Source #

a smart constructor for the Conn type.

data Database Source #

An enumeration of the supported database types.

Constructors

Postgres 
MySQL 
SQLite 
Oracle 
MSSQL 

Instances

Instances details
Enum Database Source # 
Instance details

Defined in Database.GP.Conn

Show Database Source # 
Instance details

Defined in Database.GP.Conn

Eq Database Source # 
Instance details

Defined in Database.GP.Conn