beam-core-0.9.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 # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

Show SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

Semigroup SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

Monoid SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

Hashable SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92FromSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92GroupingSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92TableSourceSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92TableNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92OrderingSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92ProjectionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92AggregationSetQuantifierSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92AggregationExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92ExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

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 # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92ExtractFieldSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92QuantifierSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92FieldNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92DeleteSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92UpdateSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92InsertValuesSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92InsertSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92SelectTableSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92SelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql92Syntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql99ExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql99FunctionExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql2003WindowFrameBoundsSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql2003WindowFrameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql2003ExpressionElementaryOLAPOperationsSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql2003ExpressionAdvancedOLAPOperationsSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsSql2003ExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsCustomSqlSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Query.CustomSQL

Associated Types

data CustomSqlSyntax SqlSyntaxBuilder :: Type Source #

HasSqlValueSyntax SqlSyntaxBuilder Bool Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

(TypeError (PreferExplicitSize Int Int32) :: Constraint) => HasSqlValueSyntax SqlSyntaxBuilder Int Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

HasSqlValueSyntax SqlSyntaxBuilder Int32 Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

HasSqlValueSyntax SqlSyntaxBuilder Text Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

HasSqlValueSyntax SqlSyntaxBuilder SqlNull Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

IsString (CustomSqlSyntax SqlSyntaxBuilder) Source # 
Instance details

Defined in Database.Beam.Query.CustomSQL

Semigroup (CustomSqlSyntax SqlSyntaxBuilder) Source # 
Instance details

Defined in Database.Beam.Query.CustomSQL

Monoid (CustomSqlSyntax SqlSyntaxBuilder) Source # 
Instance details

Defined in Database.Beam.Query.CustomSQL

type Sql92FromTableSourceSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92FromExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92GroupingExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92TableSourceSelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92TableSourceExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92TableSourceTableNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92OrderingExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ProjectionExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92AggregationSetQuantifierSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionQuantifierSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionValueSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionSelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionFieldNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionCastTargetSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92ExpressionExtractFieldSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92DeleteTableNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92DeleteExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92UpdateTableNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92UpdateFieldNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92UpdateExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92InsertValuesExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92InsertValuesSelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92InsertValuesSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92InsertTableNameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableSelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableProjectionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableFromSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableGroupingSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectTableSetQuantifierSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectSelectTableSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectOrderingSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92SelectSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92InsertSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92UpdateSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql92DeleteSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql2003WindowFrameBoundsBoundSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql2003WindowFrameExpressionSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql2003WindowFrameOrderingSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql2003WindowFrameBoundsSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

type Sql2003ExpressionWindowFrameSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Builder

newtype CustomSqlSyntax SqlSyntaxBuilder Source # 
Instance details

Defined in Database.Beam.Query.CustomSQL