Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides a syntax SqlSyntaxBuilder
that uses a
Builder
to construct SQL expressions as strings.
Mainly serves as documentation for how to write a syntax for backends. Note
that, although you can use this to turn most Q
and QGenExpr
s into
ByteString
queries, it is very unwise to ship these to the database.
This module does not take into account server-specific quoting. Some
backends are very particular to quoting, and shipping arbitrary
ByteString
s as queries can expose you to SQL injection vulnerabilities.
Always use the provided backends to submit queries and data manipulation
commands to the database.
Synopsis
- newtype SqlSyntaxBuilder = SqlSyntaxBuilder {}
- data SqlSyntaxBackend
- buildSepBy :: Builder -> [Builder] -> Builder
- quoteSql :: Text -> Builder
- renderSql :: SqlSyntaxBuilder -> String
Documentation
newtype SqlSyntaxBuilder Source #
The main syntax. A wrapper over Builder
Instances
data SqlSyntaxBackend Source #
Instances
BeamBackend SqlSyntaxBackend Source # | |
Defined in Database.Beam.Backend.SQL.Builder type BackendFromField SqlSyntaxBackend :: * -> Constraint Source # | |
type BackendFromField SqlSyntaxBackend Source # | |
Defined in Database.Beam.Backend.SQL.Builder |
renderSql :: SqlSyntaxBuilder -> String Source #