Hets - the Heterogeneous Tool Set

Safe HaskellNone

Persistence.DBConfig

Documentation

data DBContext Source #

Constructors

DBContext 

Fields

Instances

Eq DBContext Source # 

Methods

(==) :: DBContext -> DBContext -> Bool

(/=) :: DBContext -> DBContext -> Bool

Show DBContext Source # 

Methods

showsPrec :: Int -> DBContext -> ShowS

show :: DBContext -> String

showList :: [DBContext] -> ShowS

data ExtDBConfig Source #

Constructors

ExtDBConfig 

Fields

Instances

Show ExtDBConfig Source # 

Methods

showsPrec :: Int -> ExtDBConfig -> ShowS

show :: ExtDBConfig -> String

showList :: [ExtDBConfig] -> ShowS

Generic ExtDBConfig Source # 

Associated Types

type Rep ExtDBConfig :: * -> *

Methods

from :: ExtDBConfig -> Rep ExtDBConfig x

to :: Rep ExtDBConfig x -> ExtDBConfig

FromJSON ExtDBConfig Source # 

Methods

parseJSON :: Value -> Parser ExtDBConfig

parseJSONList :: Value -> Parser [ExtDBConfig]

type Rep ExtDBConfig Source # 
type Rep ExtDBConfig = D1 (MetaData "ExtDBConfig" "Persistence.DBConfig" "main" False) (C1 (MetaCons "ExtDBConfig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "development") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DBConfig))) ((:*:) (S1 (MetaSel (Just Symbol "test") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DBConfig))) (S1 (MetaSel (Just Symbol "production") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe DBConfig))))))

data DBConfig Source #

Constructors

DBConfig 

Fields

Instances

Show DBConfig Source # 

Methods

showsPrec :: Int -> DBConfig -> ShowS

show :: DBConfig -> String

showList :: [DBConfig] -> ShowS

Generic DBConfig Source # 

Associated Types

type Rep DBConfig :: * -> *

Methods

from :: DBConfig -> Rep DBConfig x

to :: Rep DBConfig x -> DBConfig

FromJSON DBConfig Source # 

Methods

parseJSON :: Value -> Parser DBConfig

parseJSONList :: Value -> Parser [DBConfig]

type Rep DBConfig Source # 
type Rep DBConfig = D1 (MetaData "DBConfig" "Persistence.DBConfig" "main" False) (C1 (MetaCons "DBConfig" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "adapter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) (S1 (MetaSel (Just Symbol "database") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) ((:*:) (S1 (MetaSel (Just Symbol "username") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) ((:*:) (S1 (MetaSel (Just Symbol "password") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) (S1 (MetaSel (Just Symbol "host") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "port") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) ((:*:) (S1 (MetaSel (Just Symbol "template") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) (S1 (MetaSel (Just Symbol "encoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))))) ((:*:) (S1 (MetaSel (Just Symbol "locale") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) ((:*:) (S1 (MetaSel (Just Symbol "pool") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Just Symbol "needMigration") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Bool))))))))

parseDatabaseConfig :: FilePath -> FilePath -> String -> Bool -> IO DBConfig Source #