napkin-0.5.14
Copyright(c) Soostone Inc 2020
LicenseAllRightsReserved
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageGHC2021

Napkin.Render.Types

Description

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

RenderSql DropTable MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> DropTable -> Doc #

RenderSql DropTable Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> DropTable -> Doc #

RenderSql DropTable Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DropTable -> Doc #

RenderSql DropTable Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropTable -> Doc #

RenderSql DropView MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> DropView -> Doc #

RenderSql DropView Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> DropView -> Doc #

RenderSql DropView Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> DropView -> Doc #

RenderSql DropView Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> DropView -> 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 -> 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

Methods

renderSql :: Sqlite -> RenameTable -> Doc #

RenderSql CreateModel BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

RenderSql ML_Predict 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 Actor MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Actor -> Doc #

RenderSql Actor Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Actor -> Doc #

RenderSql Actor Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Actor -> Doc #

RenderSql Grant MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Grant -> Doc #

RenderSql Grant Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Grant -> Doc #

RenderSql Grant Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Grant -> Doc #

RenderSql Object MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Object -> Doc #

RenderSql Object Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Object -> Doc #

RenderSql Object Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Object -> Doc #

RenderSql Object Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Object -> Doc #

RenderSql Privilege MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Privilege -> Doc #

RenderSql Privilege Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Privilege -> Doc #

RenderSql Privilege Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Privilege -> Doc #

RenderSql ExternFun Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> ExternFun -> Doc #

RenderSql ExternFun Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> ExternFun -> Doc #

RenderSql From BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> From -> Doc #

RenderSql From MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> From -> Doc #

RenderSql From Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> From -> Doc #

RenderSql From Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> From -> Doc #

RenderSql From Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> From -> Doc #

RenderSql Name BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Name -> Doc #

RenderSql Name MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Name -> Doc #

RenderSql Name Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Name -> Doc #

RenderSql Name Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Name -> Doc #

RenderSql Name Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Name -> Doc #

ToDbBackend anyBackend => RenderSql NativeExpr anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeExpr -> Doc #

ToDbBackend anyBackend => RenderSql NativeQuery anyBackend # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: anyBackend -> NativeQuery -> Doc #

RenderSql Query BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Query -> Doc #

RenderSql Query MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Query -> Doc #

RenderSql Query Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Query -> Doc #

RenderSql Query Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Query -> Doc #

RenderSql Query Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Query -> Doc #

RenderSql Relation BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> Relation -> Doc #

RenderSql Relation MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> Relation -> Doc #

RenderSql Relation Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> Relation -> Doc #

RenderSql Relation Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> Relation -> Doc #

RenderSql Relation Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> Relation -> Doc #

RenderSql SExp BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> SExp -> Doc #

RenderSql SExp MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> SExp -> Doc #

RenderSql SExp Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> SExp -> Doc #

RenderSql SExp Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> SExp -> Doc #

RenderSql SExp Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

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

Methods

renderSql :: Redshift -> DistStyle -> Doc #

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 String BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

renderSql :: BigQuery -> String -> Doc #

RenderSql String MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> String -> Doc #

RenderSql String Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

renderSql :: Postgres -> String -> Doc #

RenderSql String Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

renderSql :: Redshift -> String -> Doc #

RenderSql String Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> String -> Doc #

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

Defined in Napkin.Spec.Types.CreateTableAs

Methods

renderSql :: a -> CreateTableAs a -> 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 () -> Doc #

RenderSql (CreateTable ()) Sqlite #

Commands

Instance details

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> CreateTable () -> 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 () -> Doc #

RenderSql (CreateView ()) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

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

RenderSql (CreateView ()) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

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

RenderSql (CreateView ()) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

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

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

Defined in Napkin.Render.BigQuery

Methods

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

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

Defined in Napkin.Render.MsSql

Methods

renderSql :: MsSql -> 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 Redshift => RenderSql (Alias a) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

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

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

Defined in Napkin.Render.Sqlite

Methods

renderSql :: Sqlite -> 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 a backend => RenderSql (Maybe a) backend # 
Instance details

Defined in Napkin.Render.Types

Methods

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

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

Defined in Napkin.Render.Common

Methods

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

RenderSql (Ref t) BigQuery # 
Instance details

Defined in Napkin.Render.BigQuery

Methods

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

RenderSql (Ref t) MsSql # 
Instance details

Defined in Napkin.Render.MsSql

Methods

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

RenderSql (Ref t) Postgres # 
Instance details

Defined in Napkin.Render.Postgres

Methods

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

RenderSql (Ref t) Redshift # 
Instance details

Defined in Napkin.Render.Redshift

Methods

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

RenderSql (Ref t) Sqlite # 
Instance details

Defined in Napkin.Render.Sqlite

Methods

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

data RenderedSql #

Constructors

forall a backend.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' :: forall b. (RenderSql Query b, ReifiesBackend b) => Query -> Unshow #

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