opaleye-0.6.7004.1: An SQL-generating DSL targeting PostgreSQL

Safe HaskellNone
LanguageHaskell2010

Opaleye.Sql

Contents

Synopsis

Showing SQL

showSql :: forall fields. Default Unpackspec fields fields => Select fields -> 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 :: Select (Field a, Field b) -> Maybe String

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

showSql :: Select (Foo (Field a) (Field b) (Field c)) -> Maybe String

showSqlUnopt :: forall fields. Default Unpackspec fields fields => Select fields -> Maybe String Source #

Show the unoptimized SQL query string generated from the query.

Explicit versions

Deprecated functions

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

Will be deprecated in version 0.7. Use showSql instead.

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

Will be deprecated in version 0.7. Use showSqlUnopt instead.

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

Will be deprecated in version 0.7. Use showSqlExplicit instead.

showSqlForPostgresUnoptExplicit :: Unpackspec columns b -> Select 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.