napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

Napkin.Run.Effects.Languages.SqlRead

Synopsis

Documentation

data TableKind #

Instances

Instances details
Bounded TableKind # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Enum TableKind # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Show TableKind # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Eq TableKind # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Ord TableKind # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

FromRow TableKind # 
Instance details

Defined in Napkin.Run.MsSql

FromRow TableKind # 
Instance details

Defined in Napkin.Run.PGCommon

RenderSql TableKind MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> TableKind -> ME Doc #

Command GetTableKind TableKind BigQuery # 
Instance details

Defined in Napkin.Run.BigQuery

Command GetTableKind TableKind MsSql # 
Instance details

Defined in Napkin.Run.MsSql

Command GetTableKind TableKind Postgres # 
Instance details

Defined in Napkin.Run.Postgres

Command GetTableKind TableKind Redshift # 
Instance details

Defined in Napkin.Run.Redshift

Command GetTableKind TableKind Sqlite # 
Instance details

Defined in Napkin.Run.Sqlite

data SqlRead (b :: k) (m :: k1) a where #

Constructors

RunQuery :: forall {k} {k1} (b :: k) (m :: k1). Query -> SqlRead b m [Map Text Value] 
CheckTableExists :: forall {k} {k1} (b :: k) (m :: k1). Ref Table -> SqlRead b m Bool 
GetTableKind :: forall {k} {k1} (b :: k) (m :: k1). Ref Table -> SqlRead b m TableKind 
GetRelationSchema' :: forall {k} {k1} (b :: k) (m :: k1). Ref Table -> Relation -> SqlRead b m [BackendSchemaField b] 

Instances

Instances details
(IsRenderable SExp b, IsRenderable Query b, IsRenderable String b) => ToDumpItem (b :: k) (SqlRead b :: (Type -> Type) -> Type -> Type) # 
Instance details

Defined in Napkin.Run.Effects.Interceptors.LogProgram

Methods

toDumpItem :: forall (r :: EffectRow) x. SqlRead b (Sem r) x -> DumpItem b #

GShow (SqlRead b m :: Type -> Type) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Methods

gshowsPrec :: Int -> SqlRead b m a -> ShowS #

Show (SqlRead b m a) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Methods

showsPrec :: Int -> SqlRead b m a -> ShowS #

show :: SqlRead b m a -> String #

showList :: [SqlRead b m a] -> ShowS #

Eq (SqlRead b m a) # 
Instance details

Defined in Napkin.Run.Effects.Languages.SqlRead

Methods

(==) :: SqlRead b m a -> SqlRead b m a -> Bool #

(/=) :: SqlRead b m a -> SqlRead b m a -> Bool #

runQuery :: forall {k} (b :: k) (r :: EffectRow). Member (SqlRead b :: (Type -> Type) -> Type -> Type) r => Query -> Sem r [Map Text Value] #

checkTableExists :: forall {k} (b :: k) (r :: EffectRow). Member (SqlRead b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Sem r Bool #

getTableKind :: forall {k} (b :: k) (r :: EffectRow). Member (SqlRead b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Sem r TableKind #

getRelationSchema' :: forall {k} (b :: k) (r :: EffectRow). Member (SqlRead b :: (Type -> Type) -> Type -> Type) r => Ref Table -> Relation -> Sem r [BackendSchemaField b] #

runQuerySingleAnswer :: forall {k} (b :: k) a (r :: EffectRow). (Val a, Member (SqlRead b :: (Type -> Type) -> Type -> Type) r) => Query -> Sem r (Maybe a) #

Run a query and pull out the first column from its first row. Meant for queries that return a single result.

getRelationSchema :: forall {k} (b :: k) (r :: EffectRow). Members '[SqlRead b :: (Type -> Type) -> Type -> Type, Input TemporaryTableName :: (Type -> Type) -> Type -> Type] r => Relation -> Sem r [BackendSchemaField b] #