squeal-postgresql-0.9.0.0: Squeal PostgreSQL Library
Copyright(c) Eitan Chatav 2019
Maintainereitan@morphism.tech
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Squeal.PostgreSQL.Query.From

Contents

Description

from clauses

Synopsis

From Clause

newtype FromClause (lat :: FromType) (with :: FromType) (db :: SchemasType) (params :: [NullType]) (from :: FromType) Source #

A FromClause can be a table name, or a derived table such as a subquery, a JOIN construct, or complex combinations of these.

Instances

Instances details
Additional (FromClause lat with db params :: FromType -> Type) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

also :: forall (ys :: [a]) (xs :: [a]). FromClause lat with db params ys -> FromClause lat with db params xs -> FromClause lat with db params (Join xs ys) Source #

Eq (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

(==) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

(/=) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

Ord (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

compare :: FromClause lat with db params from -> FromClause lat with db params from -> Ordering #

(<) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

(<=) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

(>) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

(>=) :: FromClause lat with db params from -> FromClause lat with db params from -> Bool #

max :: FromClause lat with db params from -> FromClause lat with db params from -> FromClause lat with db params from #

min :: FromClause lat with db params from -> FromClause lat with db params from -> FromClause lat with db params from #

Show (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

showsPrec :: Int -> FromClause lat with db params from -> ShowS #

show :: FromClause lat with db params from -> String #

showList :: [FromClause lat with db params from] -> ShowS #

Generic (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Associated Types

type Rep (FromClause lat with db params from) :: Type -> Type #

Methods

from :: FromClause lat with db params from -> Rep (FromClause lat with db params from) x #

to :: Rep (FromClause lat with db params from) x -> FromClause lat with db params from #

NFData (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

rnf :: FromClause lat with db params from -> () #

RenderSQL (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

Methods

renderSQL :: FromClause lat with db params from -> ByteString Source #

type Rep (FromClause lat with db params from) Source # 
Instance details

Defined in Squeal.PostgreSQL.Query.From

type Rep (FromClause lat with db params from) = D1 ('MetaData "FromClause" "Squeal.PostgreSQL.Query.From" "squeal-postgresql-0.9.0.0-D17NIjlcsGRAwJTaCTXyvM" 'True) (C1 ('MetaCons "UnsafeFromClause" 'PrefixI 'True) (S1 ('MetaSel ('Just "renderFromClause") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

table Source #

Arguments

:: (Has sch db schema, Has tab schema ('Table table)) 
=> Aliased (QualifiedAlias sch) (alias ::: tab)

(renamable) table alias

-> FromClause lat with db params '[alias ::: TableToRow table] 

A real table is a table from the database.

subquery Source #

Arguments

:: Aliased (Query lat with db params) query

aliased Query

-> FromClause lat with db params '[query] 

subquery derives a table from a Query. The subquery may not reference columns provided by preceding FromClause items. Use JoinLateral if the subquery must reference columns provided by preceding FromClause items.

view Source #

Arguments

:: (Has sch db schema, Has vw schema ('View view)) 
=> Aliased (QualifiedAlias sch) (alias ::: vw)

(renamable) view alias

-> FromClause lat with db params '[alias ::: view] 

view derives a table from a View.

common Source #

Arguments

:: Has cte with common 
=> Aliased Alias (alias ::: cte)

(renamable) common table expression alias

-> FromClause lat with db params '[alias ::: common] 

common derives a table from a common table expression.