postgresql-simple-opts-0.3.0.1: An optparse-applicative parser for postgresql-simple's connection options

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Simple.Options

Description

A resuable optparse-applicative parser for creating a postgresql-simple Connection

Synopsis

Documentation

data Options Source #

Instances
Eq Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Methods

(==) :: Options -> Options -> Bool #

(/=) :: Options -> Options -> Bool #

Ord Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Read Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Show Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Generic Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Associated Types

type Rep Options :: * -> * #

Methods

from :: Options -> Rep Options x #

to :: Rep Options x -> Options #

type Rep Options Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

type Rep Options = D1 (MetaData "Options" "Database.PostgreSQL.Simple.Options" "postgresql-simple-opts-0.3.0.1-G67Jz9qUWuFHcTdlN7r8QZ" False) (C1 (MetaCons "Options" PrefixI True) ((((S1 (MetaSel (Just "oHost") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "oHostaddr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) :*: (S1 (MetaSel (Just "oPort") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 (MetaSel (Just "oUser") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "oPassword") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))))) :*: ((S1 (MetaSel (Just "oDbname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Just "oConnectTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "oClientEncoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)))) :*: (S1 (MetaSel (Just "oOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: (S1 (MetaSel (Just "oFallbackApplicationName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "oKeepalives") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)))))) :*: (((S1 (MetaSel (Just "oKeepalivesIdle") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 (MetaSel (Just "oKeepalivesCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "oSslmode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)))) :*: (S1 (MetaSel (Just "oRequiressl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 (MetaSel (Just "oSslcompression") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: S1 (MetaSel (Just "oSslcert") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))))) :*: ((S1 (MetaSel (Just "oSslkey") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: (S1 (MetaSel (Just "oSslrootcert") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "oRequirepeer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)))) :*: (S1 (MetaSel (Just "oKrbsrvname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: (S1 (MetaSel (Just "oGsslib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "oService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))))))))

data PartialOptions Source #

An optional version of Options. This includes an instance of | ParseRecord which provides the optparse-applicative Parser.

Instances
Eq PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Ord PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Read PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Show PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Generic PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Associated Types

type Rep PartialOptions :: * -> * #

Semigroup PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Monoid PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

Default PartialOptions Source #

The PartialOptions version of defaultOptions

Instance details

Defined in Database.PostgreSQL.Simple.Options

Methods

def :: PartialOptions #

ParseRecord PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

type Rep PartialOptions Source # 
Instance details

Defined in Database.PostgreSQL.Simple.Options

type Rep PartialOptions = D1 (MetaData "PartialOptions" "Database.PostgreSQL.Simple.Options" "postgresql-simple-opts-0.3.0.1-G67Jz9qUWuFHcTdlN7r8QZ" False) (C1 (MetaCons "PartialOptions" PrefixI True) ((((S1 (MetaSel (Just "host") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: S1 (MetaSel (Just "hostaddr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String))) :*: (S1 (MetaSel (Just "port") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: (S1 (MetaSel (Just "user") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: S1 (MetaSel (Just "password") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String))))) :*: ((S1 (MetaSel (Just "dbname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: (S1 (MetaSel (Just "connectTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: S1 (MetaSel (Just "clientEncoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)))) :*: (S1 (MetaSel (Just "options") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: (S1 (MetaSel (Just "fallbackApplicationName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: S1 (MetaSel (Just "keepalives") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)))))) :*: (((S1 (MetaSel (Just "keepalivesIdle") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: (S1 (MetaSel (Just "keepalivesCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: S1 (MetaSel (Just "sslmode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)))) :*: (S1 (MetaSel (Just "requiressl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: (S1 (MetaSel (Just "sslcompression") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last Int)) :*: S1 (MetaSel (Just "sslcert") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String))))) :*: ((S1 (MetaSel (Just "sslkey") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: (S1 (MetaSel (Just "sslrootcert") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: S1 (MetaSel (Just "requirepeer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)))) :*: (S1 (MetaSel (Just "krbsrvname") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: (S1 (MetaSel (Just "gsslib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String)) :*: S1 (MetaSel (Just "service") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Last String))))))))

mkLast :: a -> Last a Source #

getLast' :: Applicative f => Last a -> f (Maybe a) Source #

completeParser :: Parser Options Source #

Useful for testing or if only Options are needed.

run :: Options -> IO Connection Source #

Create a connection with an Option