napkin-1.0.0
Safe HaskellNone
LanguageGHC2021

Napkin.Render.Types

Synopsis

Documentation

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 -> ME Doc #

Instances

Instances details
RenderSql AnnotateTableOrView Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql AnnotateTableOrView Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql ArrayStructExp Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql ArrayStructExp Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql TableKind MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql PartitionInterval BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql DeleteFrom BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql DeleteFrom MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql DeleteFrom Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql DeleteFrom Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql DeleteFrom Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DeleteFrom -> ME Doc #

RenderSql DropTable MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql DropTable Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql DropTable Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql DropTable Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropTable -> ME Doc #

RenderSql DropView MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql DropView Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> DropView -> ME Doc #

RenderSql DropView Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DropView -> ME Doc #

RenderSql DropView Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropView -> ME Doc #

RenderSql InsertIntoQuery BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql InsertIntoQuery MsSql # 
Instance details

Defined in Napkin.Render.MsSql

RenderSql InsertIntoQuery Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql InsertIntoQuery Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql InsertIntoQuery Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

RenderSql RenameTable MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql RenameTable Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql RenameTable Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql RenameTable Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

RenderSql JoinOnPredicate BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery.Merge

RenderSql Merge BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery.Merge

Methods

renderSql :: BigQuery -> Merge -> ME Doc #

RenderSql TableAlias BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery.Merge

RenderSql Actor MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Actor Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Actor -> ME Doc #

RenderSql Actor Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Actor -> ME Doc #

RenderSql Grant MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Grant Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Grant -> ME Doc #

RenderSql Grant Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Grant -> ME Doc #

RenderSql Object MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Object Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Object -> ME Doc #

RenderSql Object Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Object -> ME Doc #

RenderSql Object Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Object -> ME Doc #

RenderSql Privilege MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Privilege Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql Privilege Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql ExternFun Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql ExternFun Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql From BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> From -> ME Doc #

RenderSql From MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql From Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> From -> ME Doc #

RenderSql From Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> From -> ME Doc #

RenderSql From Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> From -> ME Doc #

RenderSql Name BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Name -> ME Doc #

RenderSql Name MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Name Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Name -> ME Doc #

RenderSql Name Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Name -> ME Doc #

RenderSql Name Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Name -> ME Doc #

ToDbBackend anyBackend => RenderSql NativeExpr anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeExpr -> ME Doc #

ToDbBackend anyBackend => RenderSql NativeQuery anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeQuery -> ME Doc #

RenderSql Query BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Query -> ME Doc #

RenderSql Query MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Query Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Query -> ME Doc #

RenderSql Query Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Query -> ME Doc #

RenderSql Query Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Query -> ME Doc #

RenderSql Relation BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Relation -> ME Doc #

RenderSql Relation MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql Relation Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Relation -> ME Doc #

RenderSql Relation Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Relation -> ME Doc #

RenderSql Relation Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Relation -> ME Doc #

RenderSql SExp BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> SExp -> ME Doc #

RenderSql SExp MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql SExp Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> SExp -> ME Doc #

RenderSql SExp Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SExp -> ME Doc #

RenderSql SExp Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> SExp -> ME 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 -> ME Doc #

RenderSql SetTableSchema MsSql # 
Instance details

Defined in Napkin.Render.MsSql

RenderSql CreateIndex Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql SetTableSchema Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql SetTableSchema Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql DistStyle Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql SortKey Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SortKey -> ME Doc #

RenderSql SortStyle Redshift # 
Instance details

Defined in Napkin.Render.Redshift

ToDbBackend anyBackend => RenderSql Statement anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> Statement -> ME Doc #

RenderSql String BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> String -> ME Doc #

RenderSql String MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql String Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> String -> ME Doc #

RenderSql String Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> String -> ME Doc #

RenderSql String Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> String -> ME Doc #

ToDbBackend anyBackend => RenderSql (NonEmpty Statement) anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NonEmpty Statement -> ME Doc #

RenderSql Query a => RenderSql (CreateTableAs a) a # 
Instance details

Defined in Napkin.Spec.Types.CreateTableAs

Methods

renderSql :: a -> CreateTableAs a -> ME Doc #

RenderSql (CreateMaterializedView MaterializedViewMeta) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql (CreateMaterializedView MaterializedViewMeta) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

RenderSql (CreateMaterializedView SqliteMaterializedViewMeta) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

RenderSql (CreateMaterializedView ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

RenderSql (CreateTable 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 (CreateTable TableMeta) MsSql #

Commands

Instance details

Defined in Napkin.Render.MsSql

RenderSql (CreateTable TableMeta) Postgres #

Commands

Instance details

Defined in Napkin.Render.Postgres

RenderSql (CreateTable TableMeta) Redshift #

Commands

Instance details

Defined in Napkin.Render.Redshift

RenderSql (CreateTable ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> CreateTable () -> ME Doc #

RenderSql (CreateTable ()) Sqlite #

Commands

Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> CreateTable () -> ME Doc #

RenderSql (CreateView ViewMeta) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql (CreateView ()) MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> CreateView () -> ME Doc #

RenderSql (CreateView ()) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> CreateView () -> ME Doc #

RenderSql (CreateView ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> CreateView () -> ME Doc #

RenderSql (CreateView ()) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> CreateView () -> ME Doc #

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

Defined in Napkin.Render.BigQuery

Methods

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

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

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Alias a -> ME Doc #

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

Defined in Napkin.Render.Postgres

Methods

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

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

Defined in Napkin.Render.Redshift

Methods

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

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

Defined in Napkin.Render.Sqlite

Methods

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

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

Monadic query interface

Instance details

Defined in Napkin.Render.Types

Methods

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

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

Defined in Napkin.Render.Types

Methods

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

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

Defined in Napkin.Render.Common

Methods

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

RenderSql (Ref t) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

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

RenderSql (Ref t) MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Ref t -> ME Doc #

RenderSql (Ref t) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

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

RenderSql (Ref t) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

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

RenderSql (Ref t) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

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

data RenderedSql #

Constructors

RenderSql a backend => RenderedSql backend a 

newtype Unshow #

Workaround for HLS eval plugin (using show) not handling multiline output well

Constructors

Unshow Text 

Instances

Instances details
Show Unshow # 
Instance details

Defined in Napkin.Render.Types

debugSql' :: (RenderSql Query b, ReifiesBackend b) => Query -> Unshow #

for evaluating queries in source code comments, use instances defined in Napkin.Backend...