beam-core-0.6.0.0: 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 # 
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 #

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 #

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 #

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 # 
IsString (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 #