opaleye-0.7.3.0: An SQL-generating DSL targeting PostgreSQL
Safe HaskellNone
LanguageHaskell2010

Opaleye.Sql

Synopsis

Showing SQL

showSql :: Default Unpackspec fields fields => Select fields -> Maybe String Source #

Show the SQL query string generated from the Select.

When Nothing is returned it means that the Select 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 :: Default Unpackspec fields fields => Select fields -> Maybe String Source #

Show the unoptimized SQL query string generated from the Select.

Explicit versions

Deprecated functions

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

Deprecated: Will be removed in version 0.8. Use showSql instead.

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

Deprecated: Will be removed in version 0.8. Use showSqlUnopt instead.

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

Deprecated: Will be removed in version 0.8. Use showSqlExplicit instead.

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

Deprecated: Will be removed in version 0.8. Use showSqlUnoptExplicit instead.