Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- renderAnnotate :: forall b. ToDbBackend b => AnnotateTableOrView -> Doc
- hasType :: Doc -> Doc -> Doc
- type RenderSpecs b = (RenderSql (Ref Function) b, RenderSql (Alias SExp) b, RenderSql ExternFun b, RenderSql SExp b, RenderSql ArrayStructExp b, ToDbBackend b)
- typicalOpRenderers :: RenderSpecs b => b -> [(CI (Ref Function), FunRenderer)]
- funRendererMap :: forall b. RenderSpecs b => b -> FunRendererMap
- renderFun :: forall b. RenderSpecs b => b -> ExternFun -> Doc
- funcall :: forall b. ToDbBackend b => Ref Function -> Doc -> Doc
- funcall' :: forall b. ToDbBackend b => String -> Doc -> Doc
- funcallArgs :: forall b. (RenderSql SExp b, ToDbBackend b) => b -> Ref Function -> [SExp] -> Doc
- renderWindowFun :: RenderSpecs b => b -> WindowFun -> Doc
- renderWindowWithinGroup :: RenderSpecs b => b -> Ref Function -> [SExp] -> WOver -> Doc
- renderNullStrategy :: NullStrategy -> Doc
- renderOver :: forall b. RenderSpecs b => b -> WOver -> Doc
- rendSimpleFun :: forall b. RenderSpecs b => b -> Ref Function -> [SExp] -> Doc
- renderType :: Type -> Doc
- data ArrayStructExp
- = ASEArray [SExp]
- | ASEArraySelect Query
- | ASEStruct (OMap StructField SExp)
- renderExp :: forall b. RenderSpecs b => b -> SExp -> Doc
- renderRef :: forall b a. ToDbBackend b => Ref a -> Doc
- rendVal :: forall b. RenderSpecs b => b -> Value -> Doc
- renderQuery :: forall b. RenderSpecs b => b -> Query -> Doc
- flattenUnions :: Query -> ([Query], [UnionType])
- renderUnionType :: UnionType -> Doc
- renderAliasRef' :: forall b a. ToDbBackend b => Ref a -> Doc
- renderWith :: forall b. RenderSpecs b => b -> WithClauses -> Doc
- renderSelect :: RenderSql (Alias SExp) b => b -> Distinctness -> [Alias SExp] -> AsStruct -> Doc
- renderFrom :: forall b. RenderSpecs b => b -> From -> Doc
- renderRelation :: forall b. RenderSpecs b => b -> Relation -> Doc
- renderWhere :: forall b. RenderSpecs b => b -> SExp -> Doc
- renderHaving :: forall b. RenderSpecs b => b -> SExp -> Doc
- renderGroup :: forall b. RenderSpecs b => b -> [SExp] -> Doc
- renderOrder :: RenderSpecs b => b -> [OrderPart] -> Doc
- renderRenameTable :: forall b. (RenderSql (Ref Table) b, RenderSpecs b) => b -> RenameTable -> Doc
- renderCreateTable :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> CreateTable meta -> Doc
- renderSetTableSchema :: forall a b. (RenderSql (Ref a) b, RenderSql (Ref Table) b, RenderSpecs b) => b -> SetTableSchema -> Doc
- renderCreateViewAs :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> CreateView meta -> Doc
- renderDropTable :: RenderSql (Ref Table) backend => backend -> DropTable -> Doc
- renderDropView :: RenderSql (Ref Table) backend => backend -> DropView -> Doc
- renderInsertIntoQuery :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> InsertIntoQuery -> Doc
- renderDeleteFrom :: (RenderSql (Ref Table) backend, RenderSql SExp backend) => backend -> DeleteFrom -> Doc
- renderPrivilege :: p -> Privilege -> Doc
- renderObject :: (RenderSql (Ref Table) backend, RenderSql (Ref Schema) backend, RenderSql (Ref Database) backend) => backend -> Object -> Doc
- renderActor :: p -> Actor -> Doc
- renderGrant :: (RenderSql Privilege backend, RenderSql Object backend, RenderSql Actor backend) => backend -> Grant -> Doc
Documentation
renderAnnotate :: forall b. ToDbBackend b => AnnotateTableOrView -> Doc #
type RenderSpecs b = (RenderSql (Ref Function) b, RenderSql (Alias SExp) b, RenderSql ExternFun b, RenderSql SExp b, RenderSql ArrayStructExp b, ToDbBackend b) #
typicalOpRenderers :: RenderSpecs b => b -> [(CI (Ref Function), FunRenderer)] #
funRendererMap :: forall b. RenderSpecs b => b -> FunRendererMap #
renderFun :: forall b. RenderSpecs b => b -> ExternFun -> Doc #
funcallArgs :: forall b. (RenderSql SExp b, ToDbBackend b) => b -> Ref Function -> [SExp] -> Doc #
renderWindowFun :: RenderSpecs b => b -> WindowFun -> Doc #
renderWindowWithinGroup :: RenderSpecs b => b -> Ref Function -> [SExp] -> WOver -> Doc #
renderNullStrategy :: NullStrategy -> Doc #
renderOver :: forall b. RenderSpecs b => b -> WOver -> Doc #
rendSimpleFun :: forall b. RenderSpecs b => b -> Ref Function -> [SExp] -> Doc #
renderType :: Type -> Doc #
data ArrayStructExp #
Instances
RenderSql ArrayStructExp Postgres # | |
Defined in Napkin.Render.Postgres renderSql :: Postgres -> ArrayStructExp -> Doc # | |
RenderSql ArrayStructExp Redshift # | |
Defined in Napkin.Render.Redshift renderSql :: Redshift -> ArrayStructExp -> Doc # |
renderExp :: forall b. RenderSpecs b => b -> SExp -> Doc #
renderRef :: forall b a. ToDbBackend b => Ref a -> Doc #
rendVal :: forall b. RenderSpecs b => b -> Value -> Doc #
renderQuery :: forall b. RenderSpecs b => b -> Query -> Doc #
flattenUnions :: Query -> ([Query], [UnionType]) #
Pull all surface-level unions into a list of queries and list of connecting union operators
renderUnionType :: UnionType -> Doc #
renderAliasRef' :: forall b a. ToDbBackend b => Ref a -> Doc #
renderWith :: forall b. RenderSpecs b => b -> WithClauses -> Doc #
renderSelect :: RenderSql (Alias SExp) b => b -> Distinctness -> [Alias SExp] -> AsStruct -> Doc #
renderFrom :: forall b. RenderSpecs b => b -> From -> Doc #
renderRelation :: forall b. RenderSpecs b => b -> Relation -> Doc #
renderWhere :: forall b. RenderSpecs b => b -> SExp -> Doc #
renderHaving :: forall b. RenderSpecs b => b -> SExp -> Doc #
renderGroup :: forall b. RenderSpecs b => b -> [SExp] -> Doc #
renderOrder :: RenderSpecs b => b -> [OrderPart] -> Doc #
renderRenameTable :: forall b. (RenderSql (Ref Table) b, RenderSpecs b) => b -> RenameTable -> Doc #
renderCreateTable :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> CreateTable meta -> Doc #
renderSetTableSchema :: forall a b. (RenderSql (Ref a) b, RenderSql (Ref Table) b, RenderSpecs b) => b -> SetTableSchema -> Doc #
renderCreateViewAs :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> CreateView meta -> Doc #
renderInsertIntoQuery :: (RenderSql (Ref Table) backend, RenderSql Query backend) => backend -> InsertIntoQuery -> Doc #
renderDeleteFrom :: (RenderSql (Ref Table) backend, RenderSql SExp backend) => backend -> DeleteFrom -> Doc #
renderPrivilege :: p -> Privilege -> Doc #
renderObject :: (RenderSql (Ref Table) backend, RenderSql (Ref Schema) backend, RenderSql (Ref Database) backend) => backend -> Object -> Doc #
renderActor :: p -> Actor -> Doc #