opaleye-0.6.0.0: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.Sql

Contents

Synopsis

Showing SQL

showSql :: forall columns. Default Unpackspec columns columns => Query columns -> Maybe String Source #

Show the SQL query string generated from the query.

When Nothing is returned it means that the Query returns zero rows.

Example type specialization:

showSql :: Query (Column a, Column b) -> Maybe String

Assuming the makeAdaptorAndInstance splice has been run for the product type Foo:

showSql :: Query (Foo (Column a) (Column b) (Column c)) -> Maybe String

showSqlUnopt :: forall columns. Default Unpackspec columns columns => Query columns -> Maybe String Source #

Show the unoptimized SQL query string generated from the query.

Explicit versions

showSqlExplicit :: Unpackspec columns b -> Query columns -> Maybe String Source #

Deprecated functions

showSqlForPostgres :: forall columns. Default Unpackspec columns columns => Query columns -> Maybe String Source #

Will be deprecated in version 0.7. Use showSql instead.

showSqlForPostgresUnopt :: forall columns. Default Unpackspec columns columns => Query columns -> Maybe String Source #

Will be deprecated in version 0.7. Use showSqlUnopt instead.

showSqlForPostgresExplicit :: Unpackspec columns b -> Query columns -> Maybe String Source #

Will be deprecated in version 0.7. Use showSqlExplicit instead.

showSqlForPostgresUnoptExplicit :: Unpackspec columns b -> Query columns -> Maybe String Source #

Will be deprecated in version 0.7. Use showSqlUnoptExplicit instead.

formatAndShowSQL :: ([PrimExpr], PrimQuery' a, Tag) -> Maybe String Source #

Deprecated: You probably want showSqlExplicit or showSqlUnoptExplicit instead. Will be removed in version 0.7.