napkin-0.5.12
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Napkin.Run.PGCommon

Description

 
Synopsis

Documentation

data Named a #

Constructors

Named 

Fields

Instances

Instances details
Eq a => Eq (Named a) # 
Instance details

Defined in Napkin.Run.PGCommon

Methods

(==) :: Named a -> Named a -> Bool #

(/=) :: Named a -> Named a -> Bool #

Ord a => Ord (Named a) # 
Instance details

Defined in Napkin.Run.PGCommon

Methods

compare :: Named a -> Named a -> Ordering #

(<) :: Named a -> Named a -> Bool #

(<=) :: Named a -> Named a -> Bool #

(>) :: Named a -> Named a -> Bool #

(>=) :: Named a -> Named a -> Bool #

max :: Named a -> Named a -> Named a #

min :: Named a -> Named a -> Named a #

Show a => Show (Named a) # 
Instance details

Defined in Napkin.Run.PGCommon

Methods

showsPrec :: Int -> Named a -> ShowS #

show :: Named a -> String #

showList :: [Named a] -> ShowS #

FromField (Named Value) # 
Instance details

Defined in Napkin.Run.PGCommon

namedMap :: [Named a] -> Map Text a #

class HasPostgresConn a where #

Instances

Instances details
HasPostgresConn Redshift # 
Instance details

Defined in Napkin.Run.Redshift

HasPostgresConn Postgres # 
Instance details

Defined in Napkin.Run.Postgres

query :: (Katip m, RenderSql q b, HasPostgresConn b) => b -> BackendConn b -> q -> m [Map Text Value] #

execute :: (Katip m, RenderSql a1 b, HasPostgresConn a2) => b -> BackendConn a2 -> a1 -> m Int64 #

checkTableExists #

Arguments

:: (Katip f, HasPostgresConn bk, RenderSql Query bk) 
=> bk 
-> BackendConn bk 
-> Ref Table

table

-> f Bool 

Check if tableviewrelation exists. Schema is inferred if Ref contains multiple segments.

relationSchema :: forall bk f viewMeta t1. (Katip f, HasPostgresConn bk, viewMeta ~ BackendViewMeta bk, Command DropView t1 bk, RenderSql DropView bk, Command (CreateViewAs viewMeta) t1 bk, MonadQueryStats f, Default viewMeta) => bk -> BackendConn bk -> Relation -> f (Fields Field) #

Introspect schema of a Relation

Orphan instances

FromRow (Map Text Value) # 
Instance details