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

Napkin.Render.Types

Description

 
Synopsis

Documentation

sqlToFile :: RenderSql a b => b -> a -> FilePath -> IO () #

Render to a local SQL file, mainly for debugging/devel help.

sqlToFileCollapsed :: RenderSql a b => b -> a -> FilePath -> IO () #

printSql :: RenderSql a b => b -> a -> IO () #

renderSql' :: RenderSql a b => b -> a -> String #

renderSqlWith :: RenderSql a b => Style -> b -> a -> String #

renderSqlCollapsed :: RenderSql a b => b -> a -> String #

class RenderSql a backend where #

If one day we support multiple backends, one option would be for this typeclass to take a (Proxy backend) argument to dispatch on the right backend.

Methods

renderSql :: backend -> a -> Doc #

Instances

Instances details
RenderSql String Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> String -> Doc #

RenderSql String Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> String -> Doc #

RenderSql String Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> String -> Doc #

RenderSql String BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> String -> Doc #

ToDbBackend anyBackend => RenderSql NativeQuery anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeQuery -> Doc #

RenderSql Query Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Query -> Doc #

RenderSql Query Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Query -> Doc #

RenderSql Query Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Query -> Doc #

RenderSql Query BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Query -> Doc #

RenderSql From Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> From -> Doc #

RenderSql From Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> From -> Doc #

RenderSql From Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> From -> Doc #

RenderSql From BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> From -> Doc #

RenderSql Relation Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Relation -> Doc #

RenderSql Relation Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Relation -> Doc #

RenderSql Relation Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Relation -> Doc #

RenderSql Relation BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Relation -> Doc #

ToDbBackend anyBackend => RenderSql NativeExpr anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeExpr -> Doc #

RenderSql SExp Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> SExp -> Doc #

RenderSql SExp Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SExp -> Doc #

RenderSql SExp Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> SExp -> Doc #

RenderSql SExp BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> SExp -> Doc #

RenderSql Name Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Name -> Doc #

RenderSql Name Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Name -> Doc #

RenderSql Name Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Name -> Doc #

RenderSql Name BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Name -> Doc #

(RenderSql SExp b, RenderSql Name b, RenderSql From b, RenderSql (Alias (Ref Table)) b) => RenderSql UpdateQuery b # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: b -> UpdateQuery -> Doc #

RenderSql Grant Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Grant -> Doc #

RenderSql Grant Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Grant -> Doc #

RenderSql Actor Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Actor -> Doc #

RenderSql Actor Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Actor -> Doc #

RenderSql Object Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Object -> Doc #

RenderSql Object Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Object -> Doc #

RenderSql Object Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Object -> Doc #

RenderSql Privilege Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Privilege -> Doc #

RenderSql Privilege Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Privilege -> Doc #

RenderSql DeleteFrom Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DeleteFrom -> Doc #

RenderSql DeleteFrom Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql DeleteFrom Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql DeleteFrom BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql InsertIntoQuery Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

RenderSql InsertIntoQuery Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql InsertIntoQuery Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql InsertIntoQuery BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql DropTable Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropTable -> Doc #

RenderSql DropTable Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DropTable -> Doc #

RenderSql DropTable Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> DropTable -> Doc #

RenderSql DropView Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropView -> Doc #

RenderSql DropView Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DropView -> Doc #

RenderSql DropView Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> DropView -> Doc #

RenderSql RenameTable Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> RenameTable -> Doc #

RenderSql RenameTable Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql RenameTable Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql SortKey Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SortKey -> Doc #

RenderSql SortStyle Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SortStyle -> Doc #

RenderSql DistStyle Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DistStyle -> Doc #

RenderSql CreateIndex Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql SetTableSchema Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql SetTableSchema Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql ML_Predict BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql CreateModel BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql ModelOptions BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql ModelType BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> ModelType -> Doc #

RenderSql Replacement BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql (Alias SExp) backend => RenderSql [Alias SExp] backend # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: backend -> [Alias SExp] -> Doc #

RenderSql a backend => RenderSql (Maybe a) backend # 
Instance details

Defined in Napkin.Render.Types

Methods

renderSql :: backend -> Maybe a -> Doc #

RenderSql a Sqlite => RenderSql (Alias a) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Alias a -> Doc #

RenderSql a Redshift => RenderSql (Alias a) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Alias a -> Doc #

RenderSql a Postgres => RenderSql (Alias a) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Alias a -> Doc #

RenderSql a BigQuery => RenderSql (Alias a) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Alias a -> Doc #

RenderSql Query backend => RenderSql (Q a) backend #

Monadic query interface

Instance details

Defined in Napkin.Render.Types

Methods

renderSql :: backend -> Q a -> Doc #

RenderSql (CreateMaterializedViewAs ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql (CreateMaterializedViewAs SqliteMaterializedViewMeta) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

RenderSql (CreateMaterializedViewAs MaterializedViewMeta) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql (CreateMaterializedViewAs MaterializedViewMeta) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql (CreateViewAs ()) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> CreateViewAs () -> Doc #

RenderSql (CreateViewAs ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> CreateViewAs () -> Doc #

RenderSql (CreateViewAs ()) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> CreateViewAs () -> Doc #

RenderSql (CreateViewAs ()) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> CreateViewAs () -> Doc #

RenderSql (CreateTableAs ()) Sqlite #

Commands

Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> CreateTableAs () -> Doc #

RenderSql (CreateTableAs ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> CreateTableAs () -> Doc #

RenderSql (CreateTableAs TableMeta) Redshift #

Commands

Instance details

Defined in Napkin.Render.Redshift

RenderSql (CreateTableAs TableMeta) Postgres #

Commands

Instance details

Defined in Napkin.Render.Postgres

RenderSql (CreateTableAs TableMeta) BigQuery #

Used for dump command only; BigQuery can create stuff via SQL, but for tables we are using API now

Instance details

Defined in Napkin.Render.BigQuery

RenderSql (Ref t) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Ref t -> Doc #

RenderSql (Ref t) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Ref t -> Doc #

RenderSql (Ref t) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Ref t -> Doc #

RenderSql (Ref t) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Ref t -> Doc #

data RenderedSql #

Constructors

forall a backend.RenderSql a backend => RenderedSql backend a