beam-core-0.7.2.1: Type-safe, feature-complete SQL query and manipulation interface for Haskell

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Backend.SQL.Builder

Description

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 QGenExprs 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 ByteStrings 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

Documentation

newtype SqlSyntaxBuilder Source #

The main syntax. A wrapper over Builder

Constructors

SqlSyntaxBuilder 

Fields

Instances

Eq SqlSyntaxBuilder Source # 
Show SqlSyntaxBuilder Source # 
Semigroup SqlSyntaxBuilder Source # 
Monoid SqlSyntaxBuilder Source # 
Hashable SqlSyntaxBuilder Source # 
IsSql92FromSyntax SqlSyntaxBuilder Source # 
IsSql92GroupingSyntax SqlSyntaxBuilder Source # 
IsSql92TableSourceSyntax SqlSyntaxBuilder Source # 
IsSql92OrderingSyntax SqlSyntaxBuilder Source # 
IsSql92ProjectionSyntax SqlSyntaxBuilder Source # 
IsSql92AggregationSetQuantifierSyntax SqlSyntaxBuilder Source # 
IsSql92AggregationExpressionSyntax SqlSyntaxBuilder Source # 
IsSql92ExpressionSyntax SqlSyntaxBuilder Source # 

Methods

valueE :: Sql92ExpressionValueSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

rowE :: [SqlSyntaxBuilder] -> SqlSyntaxBuilder Source #

quantifierListE :: [SqlSyntaxBuilder] -> SqlSyntaxBuilder Source #

coalesceE :: [SqlSyntaxBuilder] -> SqlSyntaxBuilder Source #

caseE :: [(SqlSyntaxBuilder, SqlSyntaxBuilder)] -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

fieldE :: Sql92ExpressionFieldNameSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

betweenE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

andE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

orE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

addE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

subE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

mulE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

divE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

likeE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

modE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

overlapsE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

nullIfE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

positionE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

eqE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

neqE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

ltE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

gtE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

leE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

geE :: Maybe (Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder) -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

eqMaybeE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

neqMaybeE :: SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

castE :: SqlSyntaxBuilder -> Sql92ExpressionCastTargetSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

notE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

negateE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isNullE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isNotNullE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isTrueE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isNotTrueE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isFalseE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isNotFalseE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isUnknownE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

isNotUnknownE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

charLengthE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

octetLengthE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

bitLengthE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

lowerE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

upperE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

trimE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

absE :: SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

extractE :: Sql92ExpressionExtractFieldSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

existsE :: Sql92ExpressionSelectSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

uniqueE :: Sql92ExpressionSelectSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

subqueryE :: Sql92ExpressionSelectSyntax SqlSyntaxBuilder -> SqlSyntaxBuilder Source #

currentTimestampE :: SqlSyntaxBuilder Source #

defaultE :: SqlSyntaxBuilder Source #

inE :: SqlSyntaxBuilder -> [SqlSyntaxBuilder] -> SqlSyntaxBuilder Source #

IsSql92DataTypeSyntax SqlSyntaxBuilder Source # 
IsSql92QuantifierSyntax SqlSyntaxBuilder Source # 
IsSql92FieldNameSyntax SqlSyntaxBuilder Source # 
IsSql92DeleteSyntax SqlSyntaxBuilder Source # 
IsSql92UpdateSyntax SqlSyntaxBuilder Source # 
IsSql92InsertValuesSyntax SqlSyntaxBuilder Source # 
IsSql92InsertSyntax SqlSyntaxBuilder Source # 
IsSql92SelectTableSyntax SqlSyntaxBuilder Source # 
IsSql92SelectSyntax SqlSyntaxBuilder Source # 
IsSql92Syntax SqlSyntaxBuilder Source # 
IsSql99ExpressionSyntax SqlSyntaxBuilder Source # 
IsSql2003WindowFrameBoundsSyntax SqlSyntaxBuilder Source # 
IsSql2003WindowFrameSyntax SqlSyntaxBuilder Source # 
IsSql2003ExpressionElementaryOLAPOperationsSyntax SqlSyntaxBuilder Source # 
IsSql2003ExpressionAdvancedOLAPOperationsSyntax SqlSyntaxBuilder Source # 
IsSql2003ExpressionSyntax SqlSyntaxBuilder Source # 
HasQBuilder SqlSyntaxBuilder Source # 
IsCustomSqlSyntax SqlSyntaxBuilder Source # 
HasSqlValueSyntax SqlSyntaxBuilder Bool Source # 
HasSqlValueSyntax SqlSyntaxBuilder Int Source # 
HasSqlValueSyntax SqlSyntaxBuilder Int32 Source # 
HasSqlValueSyntax SqlSyntaxBuilder Text Source # 
HasSqlValueSyntax SqlSyntaxBuilder SqlNull Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Bool Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Double Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Float Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Int Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Int8 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Int16 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Int32 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Int64 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Integer Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Word Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Word8 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Word16 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Word32 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Word64 Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Text Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder UTCTime Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder LocalTime Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder TimeOfDay Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder Day Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Bool Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Double Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Float Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Int Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Int8 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Int16 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Int32 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Int64 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Integer Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Word Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Word8 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Word16 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Word32 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Word64 Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Text Source # 
HasSqlEqualityCheck SqlSyntaxBuilder UTCTime Source # 
HasSqlEqualityCheck SqlSyntaxBuilder LocalTime Source # 
HasSqlEqualityCheck SqlSyntaxBuilder TimeOfDay Source # 
HasSqlEqualityCheck SqlSyntaxBuilder Day Source # 
HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder a => HasSqlQuantifiedEqualityCheck SqlSyntaxBuilder (Tagged * t a) Source # 
HasSqlEqualityCheck SqlSyntaxBuilder a => HasSqlEqualityCheck SqlSyntaxBuilder (Tagged * t a) Source # 
IsString (CustomSqlSyntax SqlSyntaxBuilder) # 
Semigroup (CustomSqlSyntax SqlSyntaxBuilder) # 
Monoid (CustomSqlSyntax SqlSyntaxBuilder) # 
IsSqlExpressionSyntaxStringType * * SqlSyntaxBuilder Text Source # 
type Sql92FromTableSourceSyntax SqlSyntaxBuilder Source # 
type Sql92FromExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92GroupingExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92TableSourceSelectSyntax SqlSyntaxBuilder Source # 
type Sql92OrderingExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92ProjectionExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92AggregationSetQuantifierSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionValueSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionSelectSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionFieldNameSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionCastTargetSyntax SqlSyntaxBuilder Source # 
type Sql92ExpressionExtractFieldSyntax SqlSyntaxBuilder Source # 
type Sql92DeleteExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92UpdateFieldNameSyntax SqlSyntaxBuilder Source # 
type Sql92UpdateExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92InsertValuesExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92InsertValuesSelectSyntax SqlSyntaxBuilder Source # 
type Sql92InsertValuesSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableSelectSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableExpressionSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableProjectionSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableFromSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableGroupingSyntax SqlSyntaxBuilder Source # 
type Sql92SelectTableSetQuantifierSyntax SqlSyntaxBuilder Source # 
type Sql92SelectSelectTableSyntax SqlSyntaxBuilder Source # 
type Sql92SelectOrderingSyntax SqlSyntaxBuilder Source # 
type Sql92SelectSyntax SqlSyntaxBuilder Source # 
type Sql92InsertSyntax SqlSyntaxBuilder Source # 
type Sql92UpdateSyntax SqlSyntaxBuilder Source # 
type Sql92DeleteSyntax SqlSyntaxBuilder Source # 
type Sql2003WindowFrameBoundsBoundSyntax SqlSyntaxBuilder Source # 
type Sql2003WindowFrameExpressionSyntax SqlSyntaxBuilder Source # 
type Sql2003WindowFrameOrderingSyntax SqlSyntaxBuilder Source # 
type Sql2003WindowFrameBoundsSyntax SqlSyntaxBuilder Source # 
type Sql2003ExpressionWindowFrameSyntax SqlSyntaxBuilder Source # 
data CustomSqlSyntax SqlSyntaxBuilder Source #