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

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Query.Internal

Contents

Synopsis

Documentation

data QF select (db :: (* -> *) -> *) s next where Source #

Constructors

QDistinct :: Projectible (Sql92SelectExpressionSyntax select) r => (r -> WithExprContext (Sql92SelectTableSetQuantifierSyntax (Sql92SelectSelectTableSyntax select))) -> QM select db s r -> (r -> next) -> QF select db s next 
QAll :: Beamable table => (TablePrefix -> Text -> Sql92SelectFromSyntax select) -> TableSettings table -> (table (QExpr (Sql92SelectExpressionSyntax select) s) -> Maybe (WithExprContext (Sql92SelectExpressionSyntax select))) -> ((Text, table (QExpr (Sql92SelectExpressionSyntax select) s)) -> next) -> QF select db s next 
QArbitraryJoin :: Projectible (Sql92SelectExpressionSyntax select) r => QM select db (QNested s) r -> (Sql92SelectFromSyntax select -> Sql92SelectFromSyntax select -> Maybe (Sql92FromExpressionSyntax (Sql92SelectFromSyntax select)) -> Sql92SelectFromSyntax select) -> (r -> Maybe (WithExprContext (Sql92SelectExpressionSyntax select))) -> (r -> next) -> QF select db s next 
QTwoWayJoin :: (Projectible (Sql92SelectExpressionSyntax select) a, Projectible (Sql92SelectExpressionSyntax select) b) => QM select db (QNested s) a -> QM select db (QNested s) b -> (Sql92SelectFromSyntax select -> Sql92SelectFromSyntax select -> Maybe (Sql92FromExpressionSyntax (Sql92SelectFromSyntax select)) -> Sql92SelectFromSyntax select) -> ((a, b) -> Maybe (WithExprContext (Sql92SelectExpressionSyntax select))) -> ((a, b) -> next) -> QF select db s next 
QSubSelect :: Projectible (Sql92SelectExpressionSyntax select) r => QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QGuard :: WithExprContext (Sql92SelectExpressionSyntax select) -> next -> QF select db s next 
QLimit :: Projectible (Sql92SelectExpressionSyntax select) r => Integer -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QOffset :: Projectible (Sql92SelectExpressionSyntax select) r => Integer -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QUnion :: Projectible (Sql92SelectExpressionSyntax select) r => Bool -> QM select db (QNested s) r -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QIntersect :: Projectible (Sql92SelectExpressionSyntax select) r => Bool -> QM select db (QNested s) r -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QExcept :: Projectible (Sql92SelectExpressionSyntax select) r => Bool -> QM select db (QNested s) r -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QOrderBy :: Projectible (Sql92SelectExpressionSyntax select) r => (r -> WithExprContext [Sql92SelectOrderingSyntax select]) -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
QWindowOver :: (ProjectibleWithPredicate WindowFrameContext (Sql2003ExpressionWindowFrameSyntax (Sql92SelectExpressionSyntax select)) window, Projectible (Sql92SelectExpressionSyntax select) r, Projectible (Sql92SelectExpressionSyntax select) a) => (r -> window) -> (r -> window -> a) -> QM select db (QNested s) r -> (a -> next) -> QF select db s next 
QAggregate :: (Projectible (Sql92SelectExpressionSyntax select) grouping, Projectible (Sql92SelectExpressionSyntax select) a) => (a -> TablePrefix -> (Maybe (Sql92SelectGroupingSyntax select), grouping)) -> QM select db (QNested s) a -> (grouping -> next) -> QF select db s next 
QForceSelect :: Projectible (Sql92SelectExpressionSyntax select) r => (r -> Sql92SelectSelectTableSyntax select -> [Sql92SelectOrderingSyntax select] -> Maybe Integer -> Maybe Integer -> select) -> QM select db (QNested s) r -> (r -> next) -> QF select db s next 
Instances
Functor (QF select db s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

fmap :: (a -> b) -> QF select db s a -> QF select db s b #

(<$) :: a -> QF select db s b -> QF select db s a #

type QM select db s = F (QF select db s) Source #

newtype Q syntax (db :: (* -> *) -> *) s a Source #

The type of queries over the database db returning results of type a. The s argument is a threading argument meant to restrict cross-usage of QExprs. syntax represents the SQL syntax that this query is building.

Constructors

Q 

Fields

Instances
Monad (Q syntax db s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(>>=) :: Q syntax db s a -> (a -> Q syntax db s b) -> Q syntax db s b #

(>>) :: Q syntax db s a -> Q syntax db s b -> Q syntax db s b #

return :: a -> Q syntax db s a #

fail :: String -> Q syntax db s a #

Functor (Q syntax db s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

fmap :: (a -> b) -> Q syntax db s a -> Q syntax db s b #

(<$) :: a -> Q syntax db s b -> Q syntax db s a #

Applicative (Q syntax db s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

pure :: a -> Q syntax db s a #

(<*>) :: Q syntax db s (a -> b) -> Q syntax db s a -> Q syntax db s b #

liftA2 :: (a -> b -> c) -> Q syntax db s a -> Q syntax db s b -> Q syntax db s c #

(*>) :: Q syntax db s a -> Q syntax db s b -> Q syntax db s b #

(<*) :: Q syntax db s a -> Q syntax db s b -> Q syntax db s a #

data QField s ty Source #

Instances
Beamable t => ProjectibleWithPredicate AnyType Text (t (Nullable (QField s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (Nullable (QField s)) -> m (t (Nullable (QField s))) Source #

Beamable t => ProjectibleWithPredicate AnyType Text (t (QField s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (QField s) -> m (t (QField s)) Source #

ProjectibleWithPredicate AnyType Text (QField s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> QField s a -> m (QField s a) Source #

Eq (QField s ty) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(==) :: QField s ty -> QField s ty -> Bool #

(/=) :: QField s ty -> QField s ty -> Bool #

Ord (QField s ty) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

compare :: QField s ty -> QField s ty -> Ordering #

(<) :: QField s ty -> QField s ty -> Bool #

(<=) :: QField s ty -> QField s ty -> Bool #

(>) :: QField s ty -> QField s ty -> Bool #

(>=) :: QField s ty -> QField s ty -> Bool #

max :: QField s ty -> QField s ty -> QField s ty #

min :: QField s ty -> QField s ty -> QField s ty #

Show (QField s ty) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

showsPrec :: Int -> QField s ty -> ShowS #

show :: QField s ty -> String #

showList :: [QField s ty] -> ShowS #

newtype QAssignment fieldName expr s Source #

Constructors

QAssignment [(fieldName, expr)] 
Instances
(Eq fieldName, Eq expr) => Eq (QAssignment fieldName expr s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(==) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

(/=) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

(Ord fieldName, Ord expr) => Ord (QAssignment fieldName expr s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

compare :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Ordering #

(<) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

(<=) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

(>) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

(>=) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> Bool #

max :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> QAssignment fieldName expr s #

min :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> QAssignment fieldName expr s #

(Show fieldName, Show expr) => Show (QAssignment fieldName expr s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

showsPrec :: Int -> QAssignment fieldName expr s -> ShowS #

show :: QAssignment fieldName expr s -> String #

showList :: [QAssignment fieldName expr s] -> ShowS #

Semigroup (QAssignment fieldName expr s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(<>) :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> QAssignment fieldName expr s #

sconcat :: NonEmpty (QAssignment fieldName expr s) -> QAssignment fieldName expr s #

stimes :: Integral b => b -> QAssignment fieldName expr s -> QAssignment fieldName expr s #

Monoid (QAssignment fieldName expr s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

mempty :: QAssignment fieldName expr s #

mappend :: QAssignment fieldName expr s -> QAssignment fieldName expr s -> QAssignment fieldName expr s #

mconcat :: [QAssignment fieldName expr s] -> QAssignment fieldName expr s #

QGenExpr type

data QAggregateContext Source #

Instances
type ContextName QAggregateContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QAggregateContext = "an aggregate"

data QGroupingContext Source #

Instances
Beamable tbl => QGroupable (tbl (QExpr expr s)) (tbl (QGroupExpr expr s)) Source #

group_ for any Beamable type. Adds every field in the type to the grouping key. This is the equivalent of including the grouping expression of each field in the type as part of the aggregate projection

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: tbl (QExpr expr s) -> tbl (QGroupExpr expr s) Source #

QGroupable (QExpr expr s a) (QGroupExpr expr s a) Source #

group_ for simple value expressions.

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: QExpr expr s a -> QGroupExpr expr s a Source #

type ContextName QGroupingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QGroupingContext = "an aggregate grouping"

data QValueContext Source #

Instances
(Table t, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (t (QExpr syntax s)) (t (Nullable (QExpr syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: t (QExpr syntax s) -> t (Nullable (QExpr syntax s)) Source #

nothing_ :: t (Nullable (QExpr syntax s)) Source #

Beamable tbl => QGroupable (tbl (QExpr expr s)) (tbl (QGroupExpr expr s)) Source #

group_ for any Beamable type. Adds every field in the type to the grouping key. This is the equivalent of including the grouping expression of each field in the type as part of the aggregate projection

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: tbl (QExpr expr s) -> tbl (QGroupExpr expr s) Source #

(Table t, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (PrimaryKey t (QExpr syntax s)) (PrimaryKey t (Nullable (QExpr syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: PrimaryKey t (QExpr syntax s) -> PrimaryKey t (Nullable (QExpr syntax s)) Source #

nothing_ :: PrimaryKey t (Nullable (QExpr syntax s)) Source #

(IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (QExpr syntax s a) (QExpr syntax s (Maybe a)) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: QExpr syntax s a -> QExpr syntax s (Maybe a) Source #

nothing_ :: QExpr syntax s (Maybe a) Source #

QGroupable (QExpr expr s a) (QGroupExpr expr s a) Source #

group_ for simple value expressions.

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: QExpr expr s a -> QGroupExpr expr s a Source #

type ContextName QValueContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QValueContext = "a value"

data QOrderingContext Source #

Instances
SqlOrderable syntax (QOrd syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

makeSQLOrdering :: QOrd syntax s a -> [WithExprContext syntax]

type ContextName QOrderingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QOrderingContext = "an ordering expression"

data QWindowingContext Source #

Instances
type ContextName QWindowingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QWindowingContext = "a window expression"

newtype QGenExpr context syntax s t Source #

The type of lifted beam expressions that will yield the haskell type t.

context is a type-level representation of the types of expressions this can contain. For example, QAggregateContext represents expressions that may contain aggregates, and QWindowingContext represents expressions that may contain OVER.

syntax is the expression syntax being built (usually a type that implements IsSql92ExpressionSyntax at least, but not always).

s is a state threading parameter that prevents QExprs from incompatible sources to be combined. For example, this is used to prevent monadic joins from depending on the result of previous joins (so-called LATERAL joins).

Constructors

QExpr (TablePrefix -> syntax) 
Instances
(Beamable t, contextPredicate context) => ProjectibleWithPredicate contextPredicate syntax (t (Nullable (QGenExpr context syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> t (Nullable (QGenExpr context syntax s)) -> m (t (Nullable (QGenExpr context syntax s))) Source #

(Beamable t, contextPredicate context) => ProjectibleWithPredicate contextPredicate syntax (t (QGenExpr context syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> t (QGenExpr context syntax s) -> m (t (QGenExpr context syntax s)) Source #

contextPredicate context => ProjectibleWithPredicate contextPredicate syntax (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> QGenExpr context syntax s a -> m (QGenExpr context syntax s a) Source #

Beamable tbl => ThreadRewritable s (tbl (Nullable (QGenExpr ctxt syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) :: * Source #

Methods

rewriteThread :: Proxy s' -> tbl (Nullable (QGenExpr ctxt syntax s)) -> WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) Source #

Beamable tbl => ThreadRewritable s (tbl (QGenExpr ctxt syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) :: * Source #

Methods

rewriteThread :: Proxy s' -> tbl (QGenExpr ctxt syntax s) -> WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) Source #

(IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) Bool, Beamable t) => SqlDeconstructMaybe syntax (t (Nullable (QGenExpr ctxt syntax s))) (t (QGenExpr ctxt syntax s)) s Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

isJust_ :: t (Nullable (QGenExpr ctxt syntax s)) -> QGenExpr ctxt0 syntax s Bool Source #

isNothing_ :: t (Nullable (QGenExpr ctxt syntax s)) -> QGenExpr ctxt0 syntax s Bool Source #

maybe_ :: QGenExpr ctxt0 syntax s y -> (t (QGenExpr ctxt syntax s) -> QGenExpr ctxt0 syntax s y) -> t (Nullable (QGenExpr ctxt syntax s)) -> QGenExpr ctxt0 syntax s y Source #

SqlOrderable syntax (QOrd syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

makeSQLOrdering :: QOrd syntax s a -> [WithExprContext syntax]

ThreadRewritable s (QGenExpr ctxt syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (QGenExpr ctxt syntax s a) :: * Source #

Methods

rewriteThread :: Proxy s' -> QGenExpr ctxt syntax s a -> WithRewrittenThread s s' (QGenExpr ctxt syntax s a) Source #

IsSql92ExpressionSyntax syntax => SqlDeconstructMaybe syntax (QGenExpr ctxt syntax s (Maybe x)) (QGenExpr ctxt syntax s x) s Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

isJust_ :: QGenExpr ctxt syntax s (Maybe x) -> QGenExpr ctxt0 syntax s Bool Source #

isNothing_ :: QGenExpr ctxt syntax s (Maybe x) -> QGenExpr ctxt0 syntax s Bool Source #

maybe_ :: QGenExpr ctxt0 syntax s y -> (QGenExpr ctxt syntax s x -> QGenExpr ctxt0 syntax s y) -> QGenExpr ctxt syntax s (Maybe x) -> QGenExpr ctxt0 syntax s y Source #

Beamable tbl => ContextRewritable (tbl (Nullable (QGenExpr old syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> tbl (Nullable (QGenExpr old syntax s)) -> WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt Source #

Beamable tbl => ContextRewritable (tbl (QGenExpr old syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> tbl (QGenExpr old syntax s) -> WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt Source #

(Beamable table, IsSql92ExpressionSyntax syntax, FieldsFulfillConstraintNullable (HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax)) table) => SqlValable (table (Nullable (QGenExpr ctxt syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

val_ :: HaskellLiteralForQExpr (table (Nullable (QGenExpr ctxt syntax s))) -> table (Nullable (QGenExpr ctxt syntax s)) Source #

(Beamable table, IsSql92ExpressionSyntax syntax, FieldsFulfillConstraint (HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax)) table) => SqlValable (table (QGenExpr ctxt syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

val_ :: HaskellLiteralForQExpr (table (QGenExpr ctxt syntax s)) -> table (QGenExpr ctxt syntax s) Source #

(Table t, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (t (QExpr syntax s)) (t (Nullable (QExpr syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: t (QExpr syntax s) -> t (Nullable (QExpr syntax s)) Source #

nothing_ :: t (Nullable (QExpr syntax s)) Source #

Beamable tbl => QGroupable (tbl (QExpr expr s)) (tbl (QGroupExpr expr s)) Source #

group_ for any Beamable type. Adds every field in the type to the grouping key. This is the equivalent of including the grouping expression of each field in the type as part of the aggregate projection

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: tbl (QExpr expr s) -> tbl (QGroupExpr expr s) Source #

(Table t, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (PrimaryKey t (QExpr syntax s)) (PrimaryKey t (Nullable (QExpr syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: PrimaryKey t (QExpr syntax s) -> PrimaryKey t (Nullable (QExpr syntax s)) Source #

nothing_ :: PrimaryKey t (Nullable (QExpr syntax s)) Source #

(IsSql92ExpressionSyntax syntax, FieldsFulfillConstraintNullable (HasSqlEqualityCheck syntax) tbl, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) Bool, Beamable tbl) => SqlEq (QGenExpr context syntax s) (tbl (Nullable (QGenExpr context syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Ord

Methods

(==.) :: tbl (Nullable (QGenExpr context syntax s)) -> tbl (Nullable (QGenExpr context syntax s)) -> QGenExpr context syntax s Bool Source #

(/=.) :: tbl (Nullable (QGenExpr context syntax s)) -> tbl (Nullable (QGenExpr context syntax s)) -> QGenExpr context syntax s Bool Source #

(==?.) :: tbl (Nullable (QGenExpr context syntax s)) -> tbl (Nullable (QGenExpr context syntax s)) -> QGenExpr context syntax s SqlBool Source #

(/=?.) :: tbl (Nullable (QGenExpr context syntax s)) -> tbl (Nullable (QGenExpr context syntax s)) -> QGenExpr context syntax s SqlBool Source #

(IsSql92ExpressionSyntax syntax, FieldsFulfillConstraint (HasSqlEqualityCheck syntax) tbl, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) Bool, Beamable tbl) => SqlEq (QGenExpr context syntax s) (tbl (QGenExpr context syntax s)) Source #

Compare two arbitrary Beamable types containing QGenExprs for equality.

Instance details

Defined in Database.Beam.Query.Ord

Methods

(==.) :: tbl (QGenExpr context syntax s) -> tbl (QGenExpr context syntax s) -> QGenExpr context syntax s Bool Source #

(/=.) :: tbl (QGenExpr context syntax s) -> tbl (QGenExpr context syntax s) -> QGenExpr context syntax s Bool Source #

(==?.) :: tbl (QGenExpr context syntax s) -> tbl (QGenExpr context syntax s) -> QGenExpr context syntax s SqlBool Source #

(/=?.) :: tbl (QGenExpr context syntax s) -> tbl (QGenExpr context syntax s) -> QGenExpr context syntax s SqlBool Source #

(IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) SqlNull) => SqlJustable (QExpr syntax s a) (QExpr syntax s (Maybe a)) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

just_ :: QExpr syntax s a -> QExpr syntax s (Maybe a) Source #

nothing_ :: QExpr syntax s (Maybe a) Source #

QGroupable (QExpr expr s a) (QGroupExpr expr s a) Source #

group_ for simple value expressions.

Instance details

Defined in Database.Beam.Query.Aggregate

Methods

group_ :: QExpr expr s a -> QGroupExpr expr s a Source #

IsSql92ExpressionSyntax syntax => SqlOrdQuantified (QGenExpr context syntax s) (QQuantified syntax s a) (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Ord

Methods

(<*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s Bool Source #

(>*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s Bool Source #

(<=*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s Bool Source #

(>=*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s Bool Source #

(IsSql92ExpressionSyntax syntax, HasSqlQuantifiedEqualityCheck syntax a) => SqlEqQuantified (QGenExpr context syntax s) (QQuantified syntax s a) (QGenExpr context syntax s a) Source #

Two arbitrary expressions can be quantifiably compared for equality.

Instance details

Defined in Database.Beam.Query.Ord

Methods

(==*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s SqlBool Source #

(/=*.) :: QGenExpr context syntax s a -> QQuantified syntax s a -> QGenExpr context syntax s SqlBool Source #

Retaggable (QGenExpr ctxt expr s) (QGenExpr ctxt expr s t) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type Retag tag (QGenExpr ctxt expr s t) :: * Source #

Methods

retag :: (forall a. Columnar' (QGenExpr ctxt expr s) a -> Columnar' (tag (QGenExpr ctxt expr s)) a) -> QGenExpr ctxt expr s t -> Retag tag (QGenExpr ctxt expr s t) Source #

IsSql92ExpressionSyntax syntax => SqlOrd (QGenExpr context syntax s) (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Ord

Methods

(<.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(>.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(<=.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(>=.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(IsSql92ExpressionSyntax syntax, HasSqlEqualityCheck syntax a) => SqlEq (QGenExpr context syntax s) (QGenExpr context syntax s a) Source #

Compare two arbitrary expressions (of the same type) for equality

Instance details

Defined in Database.Beam.Query.Ord

Methods

(==.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(/=.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s Bool Source #

(==?.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s SqlBool Source #

(/=?.) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s SqlBool Source #

Eq syntax => Eq (QGenExpr context syntax s t) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(==) :: QGenExpr context syntax s t -> QGenExpr context syntax s t -> Bool #

(/=) :: QGenExpr context syntax s t -> QGenExpr context syntax s t -> Bool #

(Fractional a, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) a) => Fractional (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(/) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s a #

recip :: QGenExpr context syntax s a -> QGenExpr context syntax s a #

fromRational :: Rational -> QGenExpr context syntax s a #

(Num a, IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) a) => Num (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

(+) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s a #

(-) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s a #

(*) :: QGenExpr context syntax s a -> QGenExpr context syntax s a -> QGenExpr context syntax s a #

negate :: QGenExpr context syntax s a -> QGenExpr context syntax s a #

abs :: QGenExpr context syntax s a -> QGenExpr context syntax s a #

signum :: QGenExpr context syntax s a -> QGenExpr context syntax s a #

fromInteger :: Integer -> QGenExpr context syntax s a #

(IsSql92ExpressionSyntax syntax, HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) [Char]) => IsString (QGenExpr context syntax s Text) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

fromString :: String -> QGenExpr context syntax s Text #

ContextRewritable (QGenExpr old syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (QGenExpr old syntax s a) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> QGenExpr old syntax s a -> WithRewrittenContext (QGenExpr old syntax s a) ctxt Source #

(HasSqlValueSyntax (Sql92ExpressionValueSyntax syntax) a, IsSql92ExpressionSyntax syntax) => SqlValable (QGenExpr ctxt syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

Methods

val_ :: HaskellLiteralForQExpr (QGenExpr ctxt syntax s a) -> QGenExpr ctxt syntax s a Source #

type WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) = tbl (Nullable (QGenExpr ctxt syntax s'))
type WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) = tbl (QGenExpr ctxt syntax s')
type WithRewrittenThread s s' (QGenExpr ctxt syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenThread s s' (QGenExpr ctxt syntax s a) = QGenExpr ctxt syntax s' a
type Retag tag (QGenExpr ctxt expr s t) Source # 
Instance details

Defined in Database.Beam.Query.Internal

type Retag tag (QGenExpr ctxt expr s t) = Columnar (tag (QGenExpr ctxt expr s)) t
type QExprToField (table (Nullable (QGenExpr context syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Types

type QExprToField (table (Nullable (QGenExpr context syntax s))) = table (Nullable (QField s))
type QExprToField (table (QGenExpr context syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Types

type QExprToField (table (QGenExpr context syntax s)) = table (QField s)
type QExprToIdentity (table (QGenExpr context syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Types

type QExprToIdentity (table (QGenExpr context syntax s)) = table Identity
type HaskellLiteralForQExpr (table (QGenExpr context syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

type HaskellLiteralForQExpr (table (QGenExpr context syntax s)) = table Identity
type WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt = tbl (Nullable (QGenExpr ctxt syntax s))
type WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt = tbl (QGenExpr ctxt syntax s)
type QExprToField (QGenExpr ctxt syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Types

type QExprToField (QGenExpr ctxt syntax s a) = QField s a
type QExprToIdentity (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Types

type QExprToIdentity (QGenExpr context syntax s a) = a
type HaskellLiteralForQExpr (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Combinators

type HaskellLiteralForQExpr (QGenExpr context syntax s a) = a
type WithRewrittenContext (QGenExpr old syntax s a) ctxt Source # 
Instance details

Defined in Database.Beam.Query.Internal

type WithRewrittenContext (QGenExpr old syntax s a) ctxt = QGenExpr ctxt syntax s a

type QExpr = QGenExpr QValueContext Source #

QExprs represent expressions not containing aggregates.

newtype QWindow syntax s Source #

Constructors

QWindow (WithExprContext syntax) 
Instances
ProjectibleWithPredicate WindowFrameContext syntax (QWindow syntax s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy WindowFrameContext -> (forall context. WindowFrameContext context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> QWindow syntax s -> m (QWindow syntax s) Source #

newtype QFrameBounds syntax Source #

Constructors

QFrameBounds (Maybe syntax) 

newtype QFrameBound syntax Source #

Constructors

QFrameBound syntax 

qBinOpE :: forall syntax context s a b c. IsSql92ExpressionSyntax syntax => (syntax -> syntax -> syntax) -> QGenExpr context syntax s a -> QGenExpr context syntax s b -> QGenExpr context syntax s c Source #

unsafeRetype :: QGenExpr ctxt syntax s a -> QGenExpr ctxt syntax s a' Source #

Aggregations

data Aggregation syntax s a Source #

Constructors

GroupAgg syntax 
ProjectAgg syntax 

Sql Projections

class Typeable context => AggregateContext context Source #

Typeclass for all haskell data types that can be used to create a projection in a SQL select statement. This includes all tables as well as all tuple classes. Projections are only defined on tuples up to size 5. If you need more, follow the implementations here.

Instances
(IsAggregateContext a, Typeable a) => AggregateContext a Source # 
Instance details

Defined in Database.Beam.Query.Internal

type family ContextName a :: Symbol Source #

Instances
type ContextName QWindowFrameContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QWindowFrameContext = "a window frame"
type ContextName QWindowingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QWindowingContext = "a window expression"
type ContextName QOrderingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QOrderingContext = "an ordering expression"
type ContextName QValueContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QValueContext = "a value"
type ContextName QGroupingContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QGroupingContext = "an aggregate grouping"
type ContextName QAggregateContext Source # 
Instance details

Defined in Database.Beam.Query.Internal

type ContextName QAggregateContext = "an aggregate"

type family IsAggregateContext a :: Constraint where ... Source #

Equations

IsAggregateContext QAggregateContext = () 
IsAggregateContext QGroupingContext = () 
IsAggregateContext a = TypeError ((Text "Non-aggregate expression where aggregate expected." :$$: ((Text "Got " :<>: Text (ContextName a)) :<>: Text ". Expected an aggregate or a grouping")) :$$: AggregateContextSuggestion a) 

type family AggregateContextSuggestion a :: ErrorMessage where ... Source #

Equations

AggregateContextSuggestion QValueContext = Text "Perhaps you forgot to wrap a value expression with 'group_'" 
AggregateContextSuggestion QWindowingContext = Text "Perhaps you meant to use 'window_' instead of 'aggregate_'" 
AggregateContextSuggestion QOrderingContext = Text "You cannot use an ordering in an aggregate" 
AggregateContextSuggestion b = Text "" 

class Typeable context => ValueContext context Source #

Instances
(IsValueContext a, Typeable a, a ~ QValueContext) => ValueContext a Source # 
Instance details

Defined in Database.Beam.Query.Internal

class Typeable context => WindowFrameContext context Source #

Instances
(Typeable context, IsWindowFrameContext context, context ~ QWindowFrameContext) => WindowFrameContext context Source # 
Instance details

Defined in Database.Beam.Query.Internal

ProjectibleWithPredicate WindowFrameContext syntax (QWindow syntax s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy WindowFrameContext -> (forall context. WindowFrameContext context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> QWindow syntax s -> m (QWindow syntax s) Source #

type family IsWindowFrameContext a :: Constraint where ... Source #

Equations

IsWindowFrameContext QWindowFrameContext = () 
IsWindowFrameContext a = TypeError (Text "Expected window frame." :$$: ((Text "Got " :<>: Text (ContextName a)) :<>: Text ". Expected a window frame")) 

class AnyType a Source #

Instances
AnyType a Source # 
Instance details

Defined in Database.Beam.Query.Internal

Beamable t => ProjectibleWithPredicate AnyType Text (t (Nullable (QField s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (Nullable (QField s)) -> m (t (Nullable (QField s))) Source #

Beamable t => ProjectibleWithPredicate AnyType Text (t (QField s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (QField s) -> m (t (QField s)) Source #

ProjectibleWithPredicate AnyType Text (QField s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> QField s a -> m (QField s a) Source #

type family IsValueContext a :: Constraint where ... Source #

Equations

IsValueContext QValueContext = () 
IsValueContext a = TypeError ((Text "Non-scalar context in projection" :$$: ((Text "Got " :<>: Text (ContextName a)) :<>: Text ". Expected a value")) :$$: ValueContextSuggestion a) 

type family ValueContextSuggestion a :: ErrorMessage where ... Source #

Equations

ValueContextSuggestion QWindowingContext = Text "Use 'window_' to projecct aggregate expressions to the value level" 
ValueContextSuggestion QOrderingContext = Text "An ordering context cannot be used in a projection. Try removing the 'asc_' or 'desc_', or use 'orderBy_' to sort the result set" 
ValueContextSuggestion QAggregateContext = Text "Aggregate functions and groupings cannot be contained in value expressions." :$$: Text "Use 'aggregate_' to compute aggregations at the value level." 
ValueContextSuggestion QGroupingContext = ValueContextSuggestion QAggregateContext 
ValueContextSuggestion _ = Text "" 

class ThreadRewritable (s :: *) (a :: *) | a -> s where Source #

Minimal complete definition

rewriteThread

Associated Types

type WithRewrittenThread s (s' :: *) a :: * Source #

Methods

rewriteThread :: Proxy s' -> a -> WithRewrittenThread s s' a Source #

Instances
ThreadRewritable s a => ThreadRewritable s [a] Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' [a] :: * Source #

Methods

rewriteThread :: Proxy s' -> [a] -> WithRewrittenThread s s' [a] Source #

Beamable tbl => ThreadRewritable s (tbl (Nullable (QGenExpr ctxt syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) :: * Source #

Methods

rewriteThread :: Proxy s' -> tbl (Nullable (QGenExpr ctxt syntax s)) -> WithRewrittenThread s s' (tbl (Nullable (QGenExpr ctxt syntax s))) Source #

Beamable tbl => ThreadRewritable s (tbl (QGenExpr ctxt syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) :: * Source #

Methods

rewriteThread :: Proxy s' -> tbl (QGenExpr ctxt syntax s) -> WithRewrittenThread s s' (tbl (QGenExpr ctxt syntax s)) Source #

(ThreadRewritable s a, ThreadRewritable s b) => ThreadRewritable s (a, b) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b) -> WithRewrittenThread s s' (a, b) Source #

(ThreadRewritable s a, KnownNat n) => ThreadRewritable s (Vector n a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (Vector n a) :: * Source #

Methods

rewriteThread :: Proxy s' -> Vector n a -> WithRewrittenThread s s' (Vector n a) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c) => ThreadRewritable s (a, b, c) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c) -> WithRewrittenThread s s' (a, b, c) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c, ThreadRewritable s d) => ThreadRewritable s (a, b, c, d) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c, d) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c, d) -> WithRewrittenThread s s' (a, b, c, d) Source #

ThreadRewritable s (QGenExpr ctxt syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (QGenExpr ctxt syntax s a) :: * Source #

Methods

rewriteThread :: Proxy s' -> QGenExpr ctxt syntax s a -> WithRewrittenThread s s' (QGenExpr ctxt syntax s a) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c, ThreadRewritable s d, ThreadRewritable s e) => ThreadRewritable s (a, b, c, d, e) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c, d, e) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c, d, e) -> WithRewrittenThread s s' (a, b, c, d, e) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c, ThreadRewritable s d, ThreadRewritable s e, ThreadRewritable s f) => ThreadRewritable s (a, b, c, d, e, f) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c, d, e, f) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c, d, e, f) -> WithRewrittenThread s s' (a, b, c, d, e, f) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c, ThreadRewritable s d, ThreadRewritable s e, ThreadRewritable s f, ThreadRewritable s g) => ThreadRewritable s (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c, d, e, f, g) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c, d, e, f, g) -> WithRewrittenThread s s' (a, b, c, d, e, f, g) Source #

(ThreadRewritable s a, ThreadRewritable s b, ThreadRewritable s c, ThreadRewritable s d, ThreadRewritable s e, ThreadRewritable s f, ThreadRewritable s g, ThreadRewritable s h) => ThreadRewritable s (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenThread s s' (a, b, c, d, e, f, g, h) :: * Source #

Methods

rewriteThread :: Proxy s' -> (a, b, c, d, e, f, g, h) -> WithRewrittenThread s s' (a, b, c, d, e, f, g, h) Source #

class ContextRewritable a where Source #

Minimal complete definition

rewriteContext

Associated Types

type WithRewrittenContext a ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> a -> WithRewrittenContext a ctxt Source #

Instances
ContextRewritable a => ContextRewritable [a] Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext [a] ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> [a] -> WithRewrittenContext [a] ctxt Source #

Beamable tbl => ContextRewritable (tbl (Nullable (QGenExpr old syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> tbl (Nullable (QGenExpr old syntax s)) -> WithRewrittenContext (tbl (Nullable (QGenExpr old syntax s))) ctxt Source #

Beamable tbl => ContextRewritable (tbl (QGenExpr old syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> tbl (QGenExpr old syntax s) -> WithRewrittenContext (tbl (QGenExpr old syntax s)) ctxt Source #

(ContextRewritable a, ContextRewritable b) => ContextRewritable (a, b) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b) -> WithRewrittenContext (a, b) ctxt Source #

(ContextRewritable a, KnownNat n) => ContextRewritable (Vector n a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (Vector n a) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> Vector n a -> WithRewrittenContext (Vector n a) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c) => ContextRewritable (a, b, c) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c) -> WithRewrittenContext (a, b, c) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c, ContextRewritable d) => ContextRewritable (a, b, c, d) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c, d) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c, d) -> WithRewrittenContext (a, b, c, d) ctxt Source #

ContextRewritable (QGenExpr old syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (QGenExpr old syntax s a) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> QGenExpr old syntax s a -> WithRewrittenContext (QGenExpr old syntax s a) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c, ContextRewritable d, ContextRewritable e) => ContextRewritable (a, b, c, d, e) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c, d, e) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c, d, e) -> WithRewrittenContext (a, b, c, d, e) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c, ContextRewritable d, ContextRewritable e, ContextRewritable f) => ContextRewritable (a, b, c, d, e, f) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c, d, e, f) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c, d, e, f) -> WithRewrittenContext (a, b, c, d, e, f) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c, ContextRewritable d, ContextRewritable e, ContextRewritable f, ContextRewritable g) => ContextRewritable (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c, d, e, f, g) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c, d, e, f, g) -> WithRewrittenContext (a, b, c, d, e, f, g) ctxt Source #

(ContextRewritable a, ContextRewritable b, ContextRewritable c, ContextRewritable d, ContextRewritable e, ContextRewritable f, ContextRewritable g, ContextRewritable h) => ContextRewritable (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Associated Types

type WithRewrittenContext (a, b, c, d, e, f, g, h) ctxt :: * Source #

Methods

rewriteContext :: Proxy ctxt -> (a, b, c, d, e, f, g, h) -> WithRewrittenContext (a, b, c, d, e, f, g, h) ctxt Source #

class ProjectibleWithPredicate (contextPredicate :: * -> Constraint) syntax a | a -> syntax where Source #

Minimal complete definition

project'

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> a -> m a Source #

Instances
ProjectibleWithPredicate contextPredicate syntax a => ProjectibleWithPredicate contextPredicate syntax [a] Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> [a] -> m [a] Source #

(Beamable t, contextPredicate context) => ProjectibleWithPredicate contextPredicate syntax (t (Nullable (QGenExpr context syntax s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> t (Nullable (QGenExpr context syntax s)) -> m (t (Nullable (QGenExpr context syntax s))) Source #

(Beamable t, contextPredicate context) => ProjectibleWithPredicate contextPredicate syntax (t (QGenExpr context syntax s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> t (QGenExpr context syntax s) -> m (t (QGenExpr context syntax s)) Source #

Beamable t => ProjectibleWithPredicate AnyType Text (t (Nullable (QField s))) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (Nullable (QField s)) -> m (t (Nullable (QField s))) Source #

Beamable t => ProjectibleWithPredicate AnyType Text (t (QField s)) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> t (QField s) -> m (t (QField s)) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b) => ProjectibleWithPredicate contextPredicate syntax (a, b) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b) -> m (a, b) Source #

(ProjectibleWithPredicate contextPredicate syntax a, KnownNat n) => ProjectibleWithPredicate contextPredicate syntax (Vector n a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> Vector n a -> m (Vector n a) Source #

ProjectibleWithPredicate AnyType Text (QField s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy AnyType -> (forall context. AnyType context => Proxy context -> WithExprContext Text -> m (WithExprContext Text)) -> QField s a -> m (QField s a) Source #

ProjectibleWithPredicate WindowFrameContext syntax (QWindow syntax s) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy WindowFrameContext -> (forall context. WindowFrameContext context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> QWindow syntax s -> m (QWindow syntax s) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c) => ProjectibleWithPredicate contextPredicate syntax (a, b, c) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c) -> m (a, b, c) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c, ProjectibleWithPredicate contextPredicate syntax d) => ProjectibleWithPredicate contextPredicate syntax (a, b, c, d) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c, d) -> m (a, b, c, d) Source #

contextPredicate context => ProjectibleWithPredicate contextPredicate syntax (QGenExpr context syntax s a) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context0. contextPredicate context0 => Proxy context0 -> WithExprContext syntax -> m (WithExprContext syntax)) -> QGenExpr context syntax s a -> m (QGenExpr context syntax s a) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c, ProjectibleWithPredicate contextPredicate syntax d, ProjectibleWithPredicate contextPredicate syntax e) => ProjectibleWithPredicate contextPredicate syntax (a, b, c, d, e) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c, d, e) -> m (a, b, c, d, e) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c, ProjectibleWithPredicate contextPredicate syntax d, ProjectibleWithPredicate contextPredicate syntax e, ProjectibleWithPredicate contextPredicate syntax f) => ProjectibleWithPredicate contextPredicate syntax (a, b, c, d, e, f) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c, ProjectibleWithPredicate contextPredicate syntax d, ProjectibleWithPredicate contextPredicate syntax e, ProjectibleWithPredicate contextPredicate syntax f, ProjectibleWithPredicate contextPredicate syntax g) => ProjectibleWithPredicate contextPredicate syntax (a, b, c, d, e, f, g) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) Source #

(ProjectibleWithPredicate contextPredicate syntax a, ProjectibleWithPredicate contextPredicate syntax b, ProjectibleWithPredicate contextPredicate syntax c, ProjectibleWithPredicate contextPredicate syntax d, ProjectibleWithPredicate contextPredicate syntax e, ProjectibleWithPredicate contextPredicate syntax f, ProjectibleWithPredicate contextPredicate syntax g, ProjectibleWithPredicate contextPredicate syntax h) => ProjectibleWithPredicate contextPredicate syntax (a, b, c, d, e, f, g, h) Source # 
Instance details

Defined in Database.Beam.Query.Internal

Methods

project' :: Monad m => Proxy contextPredicate -> (forall context. contextPredicate context => Proxy context -> WithExprContext syntax -> m (WithExprContext syntax)) -> (a, b, c, d, e, f, g, h) -> m (a, b, c, d, e, f, g, h) Source #

project :: Projectible syntax a => a -> WithExprContext [syntax] Source #

reproject :: (IsSql92ExpressionSyntax syntax, Projectible syntax a) => (Int -> syntax) -> a -> a Source #