napkin-spec-2.0.0
Safe HaskellNone
LanguageGHC2024

Napkin.Render.Types

Synopsis

Documentation

renderSql' :: forall {k} a (b :: k). RenderSql a b => Proxy b -> a -> Text #

renderSqlErr :: forall {k} a (b :: k). RenderSql a b => Proxy b -> a -> Either Text Text #

renderSqlWith :: forall {k} a (b :: k). RenderSql a b => Style -> Proxy b -> a -> Text #

renderSqlCollapsed :: forall {k} a (b :: k). RenderSql a b => Proxy b -> a -> Text #

class RenderSql a (backend :: k) 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 :: Proxy backend -> a -> ME Doc #

Instances

Instances details
NapkinParserDialect b => RenderSql NativeExpr (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> NativeExpr -> ME Doc #

NapkinParserDialect b => RenderSql NativeQuery (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> NativeQuery -> ME Doc #

BackendDialect b => RenderSql Query (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> Query -> ME Doc #

BackendDialect b => RenderSql SExp (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> SExp -> ME Doc #

RenderSql TableKind (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> TableKind -> ME Doc #

BackendDialect b => RenderSql UpdateQuery (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> UpdateQuery -> ME Doc #

RenderSql MissingBehavior (b :: k) # 
Instance details

Defined in Napkin.Render.Common

BackendDialect b => RenderSql DeleteRows (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> DeleteRows -> ME Doc #

BackendDialect b => RenderSql InsertInto (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> InsertInto -> ME Doc #

NapkinParserDialect b => RenderSql AExpr (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> AExpr -> ME Doc #

NapkinParserDialect b => RenderSql SelectStmt (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> SelectStmt -> ME Doc #

NapkinParserDialect b => RenderSql QueryExpr (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> QueryExpr -> ME Doc #

NapkinParserDialect b => RenderSql ScalarExpr (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> ScalarExpr -> ME Doc #

NapkinParserDialect b => RenderSql Statement (b :: k) # 
Instance details

Defined in Napkin.Render.Native

Methods

renderSql :: Proxy b -> Statement -> ME Doc #

RenderSql Text (b :: k) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> Text -> ME Doc #

NapkinParserDialect b => RenderSql (CreateTableSchema b) (b :: Type) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> CreateTableSchema b -> ME Doc #

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

Monadic query interface

Instance details

Defined in Napkin.Render.Types

Methods

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

NapkinParserDialect b => RenderSql (Ref t) (b :: k1) # 
Instance details

Defined in Napkin.Render.Common

Methods

renderSql :: Proxy b -> Ref t -> ME Doc #

data RenderedSql #

Constructors

RenderSql a backend => RenderedSql (Proxy 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 {k} (b :: k) a. RenderSql a b => a -> Unshow #

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