This file is indexed.

/usr/share/doc/haskell-haskelldb-doc/html/Database-HaskellDB-Query.html is in libghc-haskelldb-doc 2.1.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Database.HaskellDB.Query</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-HaskellDB-Query.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-HaskellDB-Query.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">haskelldb-2.1.1: A library of combinators for generating and executing SQL statements.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>haskelldb-users@lists.sourceforge.net</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Database.HaskellDB.Query</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Data and class declarations
</a></li><li><a href="#g:2">Operators
</a></li><li><a href="#g:3">Function declarations
</a></li><li><a href="#g:4">Internals
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Basic combinators for building type-safe queries.
 The Query monad constructs a relational expression
 (<code><a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a></code>). 
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:Rel">Rel</a> r = <a href="#v:Rel">Rel</a> Alias <a href="Database-HaskellDB-PrimQuery.html#t:Scheme">Scheme</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Attr">Attr</a> f a = <a href="#v:Attr">Attr</a> <a href="Database-HaskellDB-PrimQuery.html#t:Attribute">Attribute</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Table">Table</a> r = <a href="#v:Table">Table</a> <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> <a href="Database-HaskellDB-PrimQuery.html#t:Assoc">Assoc</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Query">Query</a> a</li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:Expr">Expr</a> a = <a href="#v:Expr">Expr</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:OrderExpr">OrderExpr</a> </li><li class="src short"><span class="keyword">class</span>  <a href="#t:ToPrimExprs">ToPrimExprs</a> r </li><li class="src short"><span class="keyword">class</span>  <a href="#t:ConstantRecord">ConstantRecord</a> r cr | r -&gt; cr <span class="keyword">where</span><ul class="subs"><li><a href="#v:constantRecord">constantRecord</a> :: r -&gt; cr</li></ul></li><li class="src short"><span class="keyword">class</span>  <a href="#t:ShowConstant">ShowConstant</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:showConstant">showConstant</a> :: a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:Literal">Literal</a></li></ul></li><li class="src short"><span class="keyword">class</span>  <a href="#t:ExprC">ExprC</a> e  <span class="keyword">where</span><ul class="subs"><li><a href="#v:primExpr">primExpr</a> ::  e a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> e =&gt; <a href="#t:ProjectExpr">ProjectExpr</a> e </li><li class="src short"><span class="keyword">class</span>  <a href="#t:ProjectRec">ProjectRec</a> r er | r -&gt; er</li><li class="src short"><span class="keyword">class</span>  <a href="#t:InsertRec">InsertRec</a> r er | r -&gt; er</li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:ExprAggr">ExprAggr</a> a = <a href="#v:ExprAggr">ExprAggr</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:ExprDefault">ExprDefault</a> a = <a href="#v:ExprDefault">ExprDefault</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></li><li class="src short"><a href="#v:copy">copy</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</li><li class="src short"><a href="#v:copyAll">copyAll</a> :: <a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r</li><li class="src short"><span class="keyword">class</span>  <a href="#t:RelToRec">RelToRec</a> a </li><li class="src short"><a href="#v:.-61--61-.">(.==.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-60--62-.">(.&lt;&gt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-60-.">(.&lt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-60--61-.">(.&lt;=.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-62-.">(.&gt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-62--61-.">(.&gt;=.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-38--38-.">(.&amp;&amp;.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-124--124-.">(.||.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:.-42-.">(.*.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:.-47-.">(./.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:.-43-.">(.+.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:.-45-.">(.-.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:.-37-.">(.%.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:.-43--43-.">(.++.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:-60--60-">(&lt;&lt;)</a> ::  <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; e a -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</li><li class="src short"><a href="#v:-60--60--45-">(&lt;&lt;-)</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; a -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</li><li class="src short"><a href="#v:project">project</a> :: (<a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r, <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r, <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> r er) =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> er)</li><li class="src short"><a href="#v:restrict">restrict</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:table">table</a> :: <a href="Database-HaskellDB-HDBRec.html#t:ShowRecRow">ShowRecRow</a> r =&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:unique">unique</a> :: <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:union">union</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:intersect">intersect</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:divide">divide</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:minus">minus</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:_not">_not</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:like">like</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:_in">_in</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; [<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a] -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:cat">cat</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:_length">_length</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:isNull">isNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notNull">notNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:fromNull">fromNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:fromVal">fromVal</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:constant">constant</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:constVal">constVal</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:constNull">constNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:constExpr">constExpr</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:param">param</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:namedParam">namedParam</a> ::  <a href="Database-HaskellDB-PrimQuery.html#t:Name">Name</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Args">Args</a> a </li><li class="src short"><a href="#v:func">func</a> :: <a href="Database-HaskellDB-Query.html#t:Args">Args</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; a</li><li class="src short"><a href="#v:cast">cast</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> b</li><li class="src short"><a href="#v:toStr">toStr</a> :: BStrToStr s d =&gt; s -&gt; d</li><li class="src short"><a href="#v:coerce">coerce</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> b</li><li class="src short"><a href="#v:select">select</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:count">count</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:_sum">_sum</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:_max">_max</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:_min">_min</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:avg">avg</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:literal">literal</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:stddev">stddev</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:stddevP">stddevP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:variance">variance</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:varianceP">varianceP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a</li><li class="src short"><a href="#v:asc">asc</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a></li><li class="src short"><a href="#v:desc">desc</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a></li><li class="src short"><a href="#v:order">order</a> :: [<a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a>] -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:top">top</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:_case">_case</a> ::  [(<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>, <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)] -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:_default">_default</a> ::  <a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a> a</li><li class="src short"><a href="#v:runQuery">runQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a></li><li class="src short"><a href="#v:runQueryRel">runQueryRel</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; (<a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a>, <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:unQuery">unQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> a -&gt; a</li><li class="src short"><a href="#v:subQuery">subQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</li><li class="src short"><a href="#v:attribute">attribute</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</li><li class="src short"><a href="#v:attributeName">attributeName</a> ::  <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:Attribute">Attribute</a></li><li class="src short"><a href="#v:tableName">tableName</a> ::  <a href="Database-HaskellDB-Query.html#t:Table">Table</a> t -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a></li><li class="src short"><a href="#v:baseTable">baseTable</a> :: (<a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r, <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r) =&gt; <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> r</li><li class="src short"><a href="#v:emptyTable">emptyTable</a> :: <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</li><li class="src short"><a href="#v:exprs">exprs</a> :: <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; [<a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a>]</li><li class="src short"><a href="#v:labels">labels</a> :: <a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r =&gt; r -&gt; [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:tableRec">tableRec</a> ::  <a href="Database-HaskellDB-Query.html#t:Table">Table</a> (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r) -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r</li></ul></div><div id="interface"><h1 id="g:1">Data and class declarations
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Rel" class="def">Rel</a> r <a href="src/Database-HaskellDB-Query.html#Rel" class="link">Source</a></p><div class="doc"><p>Type of relations, contains the attributes
   of the relation and an <code>Alias</code> to which the
   attributes are renamed in the <code><a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a></code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Rel" class="def">Rel</a> Alias <a href="Database-HaskellDB-PrimQuery.html#t:Scheme">Scheme</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Rel" class="caption collapser" onclick="toggleSection('i:Rel')">Instances</p><div id="section.i:Rel" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r))</td><td class="doc"><p>Shows the optimized SQL for the query.
</p></td></tr><tr><td class="src"><a href="Database-HaskellDB-FieldType.html#t:ExprTypes">ExprTypes</a> r =&gt; <a href="Database-HaskellDB-FieldType.html#t:ExprTypes">ExprTypes</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-FieldType.html#t:ExprType">ExprType</a> a =&gt; <a href="Database-HaskellDB-FieldType.html#t:ExprType">ExprType</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Select">Select</a> (<a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a) (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Field selection operator. It is overloaded to work for both
   relations in a query and the result of a query.
   That is, it corresponds to both <code><a href="Database-HaskellDB-HDBRec.html#v:-33-">!</a></code> and <code>!.</code> from the original
   HaskellDB. An overloaded operator was selected because users
   (and the developers) always forgot to use !. instead of !
   on query results.
</p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Attr" class="def">Attr</a> f a <a href="src/Database-HaskellDB-Query.html#Attr" class="link">Source</a></p><div class="doc"><p>Typed attributes
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Attr" class="def">Attr</a> <a href="Database-HaskellDB-PrimQuery.html#t:Attribute">Attribute</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Attr" class="caption collapser" onclick="toggleSection('i:Attr')">Instances</p><div id="section.i:Attr" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Select">Select</a> (<a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a) (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Field selection operator. It is overloaded to work for both
   relations in a query and the result of a query.
   That is, it corresponds to both <code><a href="Database-HaskellDB-HDBRec.html#v:-33-">!</a></code> and <code>!.</code> from the original
   HaskellDB. An overloaded operator was selected because users
   (and the developers) always forgot to use !. instead of !
   on query results.
</p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Table" class="def">Table</a> r <a href="src/Database-HaskellDB-Query.html#Table" class="link">Source</a></p><div class="doc"><p>Basic tables, contains table name and an
   association from attributes to attribute
   names in the real table.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Table" class="def">Table</a> <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> <a href="Database-HaskellDB-PrimQuery.html#t:Assoc">Assoc</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Query" class="def">Query</a> a <a href="src/Database-HaskellDB-Query.html#Query" class="link">Source</a></p><div class="subs instances"><p id="control.i:Query" class="caption collapser" onclick="toggleSection('i:Query')">Instances</p><div id="section.i:Query" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> <a href="Database-HaskellDB-Query.html#t:Query">Query</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Functor">Functor</a> <a href="Database-HaskellDB-Query.html#t:Query">Query</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r))</td><td class="doc"><p>Shows the optimized SQL for the query.
</p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:Expr" class="def">Expr</a> a <a href="src/Database-HaskellDB-Query.html#Expr" class="link">Source</a></p><div class="doc"><p>Type of normal expressions, contains the untyped PrimExpr.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Expr" class="def">Expr</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Expr" class="caption collapser" onclick="toggleSection('i:Expr')">Instances</p><div id="section.i:Expr" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">InsertExpr <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">IsExpr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-FieldType.html#t:ExprType">ExprType</a> a =&gt; <a href="Database-HaskellDB-FieldType.html#t:ExprType">ExprType</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">BStrToStr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">BStrToStr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>))</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-BoundedList.html#t:Size">Size</a> n =&gt; BStrToStr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Database-HaskellDB-BoundedString.html#t:BoundedString">BoundedString</a> n))) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>))</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-BoundedList.html#t:Size">Size</a> n =&gt; BStrToStr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="Database-HaskellDB-BoundedString.html#t:BoundedString">BoundedString</a> n)) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">IsExpr tail =&gt; IsExpr (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; tail)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(IsExpr tail, <a href="Database-HaskellDB-Query.html#t:Args">Args</a> tail) =&gt; <a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; tail)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Select">Select</a> (<a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a) (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Field selection operator. It is overloaded to work for both
   relations in a query and the result of a query.
   That is, it corresponds to both <code><a href="Database-HaskellDB-HDBRec.html#v:-33-">!</a></code> and <code>!.</code> from the original
   HaskellDB. An overloaded operator was selected because users
   (and the developers) always forgot to use !. instead of !
   on query results.
</p></td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> rest, <a href="Database-HaskellDB-HDBRec.html#t:FieldTag">FieldTag</a> f) =&gt; <a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) rest)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a, <a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> r cr) =&gt; <a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f a r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) cr)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> e, <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> r er) =&gt; <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) er)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(InsertExpr e, <a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a> r er) =&gt; <a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) er)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Database.html#t:GetValue">GetValue</a> a, <a href="Database-HaskellDB-Database.html#t:GetRec">GetRec</a> er vr) =&gt; <a href="Database-HaskellDB-Database.html#t:GetRec">GetRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) er) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f a vr)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:OrderExpr" class="def">OrderExpr</a>  <a href="src/Database-HaskellDB-PrimQuery.html#OrderExpr" class="link">Source</a></p><div class="subs instances"><p id="control.i:OrderExpr" class="caption collapser" onclick="toggleSection('i:OrderExpr')">Instances</p><div id="section.i:OrderExpr" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:ToPrimExprs" class="def">ToPrimExprs</a> r <a href="src/Database-HaskellDB-Query.html#ToPrimExprs" class="link">Source</a></p><div class="subs instances"><p id="control.i:ToPrimExprs" class="caption collapser" onclick="toggleSection('i:ToPrimExprs')">Instances</p><div id="section.i:ToPrimExprs" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> e, <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r) =&gt; <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> l (e a) r)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:ConstantRecord" class="def">ConstantRecord</a> r cr | r -&gt; cr <span class="keyword">where</span><a href="src/Database-HaskellDB-Query.html#ConstantRecord" class="link">Source</a></p><div class="doc"><p>Converts records w/o Expr (usually from database
 queries) to records with Expr types. 
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:constantRecord" class="def">constantRecord</a> :: r -&gt; cr<a href="src/Database-HaskellDB-Query.html#constantRecord" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:ConstantRecord" class="caption collapser" onclick="toggleSection('i:ConstantRecord')">Instances</p><div id="section.i:ConstantRecord" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> r cr =&gt; <a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r) (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> cr)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a, <a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> r cr) =&gt; <a href="Database-HaskellDB-Query.html#t:ConstantRecord">ConstantRecord</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f a r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) cr)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:ShowConstant" class="def">ShowConstant</a> a  <span class="keyword">where</span><a href="src/Database-HaskellDB-Query.html#ShowConstant" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:showConstant" class="def">showConstant</a> :: a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:Literal">Literal</a><a href="src/Database-HaskellDB-Query.html#showConstant" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:ShowConstant" class="caption collapser" onclick="toggleSection('i:ShowConstant')">Instances</p><div id="section.i:ShowConstant" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> <a href="Database-HaskellDB-DBLayout.html#t:CalendarTime">CalendarTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-BoundedList.html#t:Size">Size</a> n =&gt; <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> (<a href="Database-HaskellDB-BoundedString.html#t:BoundedString">BoundedString</a> n)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:ExprC" class="def">ExprC</a> e  <span class="keyword">where</span><a href="src/Database-HaskellDB-Query.html#ExprC" class="link">Source</a></p><div class="doc"><p>Class of expression types.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:primExpr" class="def">primExpr</a> ::  e a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a><a href="src/Database-HaskellDB-Query.html#primExpr" class="link">Source</a></p><div class="doc"><p>Get the underlying untyped <code><a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></code>.
</p></div></div><div class="subs instances"><p id="control.i:ExprC" class="caption collapser" onclick="toggleSection('i:ExprC')">Instances</p><div id="section.i:ExprC" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> e =&gt; <a name="t:ProjectExpr" class="def">ProjectExpr</a> e <a href="src/Database-HaskellDB-Query.html#ProjectExpr" class="link">Source</a></p><div class="doc"><p>Class of expressions that can be used with <code><a href="Database-HaskellDB-Query.html#v:project">project</a></code>.
</p></div><div class="subs instances"><p id="control.i:ProjectExpr" class="caption collapser" onclick="toggleSection('i:ProjectExpr')">Instances</p><div id="section.i:ProjectExpr" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:ProjectRec" class="def">ProjectRec</a> r er | r -&gt; er<a href="src/Database-HaskellDB-Query.html#ProjectRec" class="link">Source</a></p><div class="doc"><p>Class of records that can be used with <code><a href="Database-HaskellDB-Query.html#v:project">project</a></code>. 
   All all the values must be instances of <code><a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a></code> for the
   record to be an instance of <code><a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a></code>.
</p></div><div class="subs instances"><p id="control.i:ProjectRec" class="caption collapser" onclick="toggleSection('i:ProjectRec')">Instances</p><div id="section.i:ProjectRec" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> e, <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> r er) =&gt; <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) er)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:InsertRec" class="def">InsertRec</a> r er | r -&gt; er<a href="src/Database-HaskellDB-Query.html#InsertRec" class="link">Source</a></p><div class="doc"><p>Class of records that can be used with <code>insert</code>. 
   All all the values must be instances of <code>InsertExpr</code> for the
   record to be an instance of <code><a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a></code>.
</p></div><div class="subs instances"><p id="control.i:InsertRec" class="caption collapser" onclick="toggleSection('i:InsertRec')">Instances</p><div id="section.i:InsertRec" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(InsertExpr e, <a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a> r er) =&gt; <a href="Database-HaskellDB-Query.html#t:InsertRec">InsertRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) r) (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) er)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:ExprAggr" class="def">ExprAggr</a> a <a href="src/Database-HaskellDB-Query.html#ExprAggr" class="link">Source</a></p><div class="doc"><p>Type of aggregate expressions.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ExprAggr" class="def">ExprAggr</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ExprAggr" class="caption collapser" onclick="toggleSection('i:ExprAggr')">Instances</p><div id="section.i:ExprAggr" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ProjectExpr">ProjectExpr</a> <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a> (<a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> c)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:ExprDefault" class="def">ExprDefault</a> a <a href="src/Database-HaskellDB-Query.html#ExprDefault" class="link">Source</a></p><div class="doc"><p>The type of default expressions.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ExprDefault" class="def">ExprDefault</a> <a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ExprDefault" class="caption collapser" onclick="toggleSection('i:ExprDefault')">Instances</p><div id="section.i:ExprDefault" class="show"><table><tr><td class="src">InsertExpr <a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:ExprC">ExprC</a> <a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a> (<a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:copy" class="def">copy</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)<a href="src/Database-HaskellDB-Query.html#copy" class="link">Source</a></p><div class="doc"><p>Creates a single-field record from an attribute and a table. Useful
 for building projections that will re-use the same attribute name. <code>copy attr tbl</code> is
 equivalent to:
</p><pre>attr .=. (tbl .!. attr)</pre></div></div><div class="top"><p class="src"><a name="v:copyAll" class="def">copyAll</a> :: <a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r<a href="src/Database-HaskellDB-Query.html#copyAll" class="link">Source</a></p><div class="doc"><p>Copies all columns in the relation given. Useful for appending
 the remaining columns in a table to a projection. For example:
</p><pre>   query = do
     tbl &lt;- table some_table
     project $ copyAll tbl
</pre><p>will add all columns in <a href="some_table.html">some_table</a> to the query.
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:RelToRec" class="def">RelToRec</a> a <a href="src/Database-HaskellDB-Query.html#RelToRec" class="link">Source</a></p><div class="doc"><p>Helper class which gives a polymorphic
 copy function that can turn a Rel into a Record.
</p></div><div class="subs instances"><p id="control.i:RelToRec" class="caption collapser" onclick="toggleSection('i:RelToRec')">Instances</p><div id="section.i:RelToRec" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> rest, <a href="Database-HaskellDB-HDBRec.html#t:FieldTag">FieldTag</a> f) =&gt; <a href="Database-HaskellDB-Query.html#t:RelToRec">RelToRec</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) rest)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Operators
</h1><div class="top"><p class="src"><a name="v:.-61--61-." class="def">(.==.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3D%3D." class="link">Source</a></p><div class="doc"><p>Equality comparison on Exprs, = in SQL.
</p></div></div><div class="top"><p class="src"><a name="v:.-60--62-." class="def">(.&lt;&gt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3C%3E." class="link">Source</a></p><div class="doc"><p>Inequality on Exprs, <a href=""></a> in SQL.
</p></div></div><div class="top"><p class="src"><a name="v:.-60-." class="def">(.&lt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3C." class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:.-60--61-." class="def">(.&lt;=.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3C%3D." class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:.-62-." class="def">(.&gt;.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3E." class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:.-62--61-." class="def">(.&gt;=.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%3E%3D." class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:.-38--38-." class="def">(.&amp;&amp;.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%26%26." class="link">Source</a></p><div class="doc"><p>&quot;Logical and&quot; on <code><a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></code>, AND in SQL.
</p></div></div><div class="top"><p class="src"><a name="v:.-124--124-." class="def">(.||.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#.%7C%7C." class="link">Source</a></p><div class="doc"><p>&quot;Logical or&quot; on <code><a href="Database-HaskellDB-Query.html#t:Expr">Expr</a></code>. OR in SQL.
</p></div></div><div class="top"><p class="src"><a name="v:.-42-." class="def">(.*.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#.%2A." class="link">Source</a></p><div class="doc"><p>Multiplication
</p></div></div><div class="top"><p class="src"><a name="v:.-47-." class="def">(./.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#.%2F." class="link">Source</a></p><div class="doc"><p>Division
</p></div></div><div class="top"><p class="src"><a name="v:.-43-." class="def">(.+.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#.%2B." class="link">Source</a></p><div class="doc"><p>Addition
</p></div></div><div class="top"><p class="src"><a name="v:.-45-." class="def">(.-.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#.-." class="link">Source</a></p><div class="doc"><p>Subtraction 
</p></div></div><div class="top"><p class="src"><a name="v:.-37-." class="def">(.%.)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#.%25." class="link">Source</a></p><div class="doc"><p>Modulo
</p></div></div><div class="top"><p class="src"><a name="v:.-43--43-." class="def">(.++.)</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a><a href="src/Database-HaskellDB-Query.html#.%2B%2B." class="link">Source</a></p><div class="doc"><p>Concatenates two String-expressions. 
</p></div></div><div class="top"><p class="src"><a name="v:-60--60-" class="def">(&lt;&lt;)</a><a href="src/Database-HaskellDB-Query.html#%3C%3C" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a</td><td class="doc"><p>Label
</p></td></tr><tr><td class="src">-&gt; e a</td><td class="doc"><p>Expression
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (e a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</td><td class="doc"><p>New record
</p></td></tr></table></div><div class="doc"><p>Creates a record field.
   Similar to '(.=.)', but gets the field label from an <code><a href="Database-HaskellDB-Query.html#t:Attr">Attr</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:-60--60--45-" class="def">(&lt;&lt;-)</a><a href="src/Database-HaskellDB-Query.html#%3C%3C-" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a</td><td class="doc"><p>Field label
</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>Field value
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> (<a href="Database-HaskellDB-HDBRec.html#t:RecCons">RecCons</a> f (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a) <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)</td><td class="doc"><p>New record
</p></td></tr></table></div><div class="doc"><p>Convenience operator for constructing records of constants.
   Useful primarily with <code>insert</code>.
   <code>f &lt;&lt;- x</code> is the same as <code>f &lt;&lt; constant x</code>
</p></div></div><h1 id="g:3">Function declarations
</h1><div class="top"><p class="src"><a name="v:project" class="def">project</a> :: (<a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r, <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r, <a href="Database-HaskellDB-Query.html#t:ProjectRec">ProjectRec</a> r er) =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> er)<a href="src/Database-HaskellDB-Query.html#project" class="link">Source</a></p><div class="doc"><p>Specifies a subset of the columns in the table.
</p></div></div><div class="top"><p class="src"><a name="v:restrict" class="def">restrict</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Database-HaskellDB-Query.html#restrict" class="link">Source</a></p><div class="doc"><p>Restricts the records to only those who evaluates the 
 expression to True.
</p></div></div><div class="top"><p class="src"><a name="v:table" class="def">table</a> :: <a href="Database-HaskellDB-HDBRec.html#t:ShowRecRow">ShowRecRow</a> r =&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#table" class="link">Source</a></p><div class="doc"><p>Return all records from a specific table.
</p></div></div><div class="top"><p class="src"><a name="v:unique" class="def">unique</a> :: <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Database-HaskellDB-Query.html#unique" class="link">Source</a></p><div class="doc"><p>Restricts the relation given to only return unique records. Upshot
 is all projected attributes will be <code>grouped</code>.
</p></div></div><div class="top"><p class="src"><a name="v:union" class="def">union</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#union" class="link">Source</a></p><div class="doc"><p>Return all records which are present in at least
   one of the relations.
</p></div></div><div class="top"><p class="src"><a name="v:intersect" class="def">intersect</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#intersect" class="link">Source</a></p><div class="doc"><p>Return all records which are present in both relations.
</p></div></div><div class="top"><p class="src"><a name="v:divide" class="def">divide</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#divide" class="link">Source</a></p><div class="doc"><p>Not in SQL92.
</p></div></div><div class="top"><p class="src"><a name="v:minus" class="def">minus</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#minus" class="link">Source</a></p><div class="doc"><p>Return all records from the first relation that are not 
   present in the second relation.
</p></div></div><div class="top"><p class="src"><a name="v:_not" class="def">_not</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#_not" class="link">Source</a></p><div class="doc"><p>The inverse of an Expr Bool.
</p></div></div><div class="top"><p class="src"><a name="v:like" class="def">like</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#like" class="link">Source</a></p><div class="doc"><p>The HaskellDB counterpart to the SQL LIKE keyword.
 In the expresions, % is a wildcard representing any characters
 in the same position relavtive to the given characters and
 _ is a wildcard representing one character e.g.
</p><pre> like (constant &quot;ABCDEFFF&quot;) (constant &quot;AB%F_F&quot;)
</pre><p>is true while
</p><pre> like (constant &quot;ABCDEF&quot;) (constant &quot;AC%F&quot;) 
</pre><p>is false.
</p><p>Note that SQL92 does not specify whether LIKE is case-sensitive or not.
 Different database systems implement this differently.
</p></div></div><div class="top"><p class="src"><a name="v:_in" class="def">_in</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; [<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a] -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#_in" class="link">Source</a></p><div class="doc"><p>Returns true if the value of the first operand is
   equal to the value of any of the expressions in the 
   list operand. 
</p></div></div><div class="top"><p class="src"><a name="v:cat" class="def">cat</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a><a href="src/Database-HaskellDB-Query.html#cat" class="link">Source</a></p><div class="doc"><p>Produces the concatenation of two String-expressions.
</p></div></div><div class="top"><p class="src"><a name="v:_length" class="def">_length</a> :: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Database-HaskellDB-Query.html#_length" class="link">Source</a></p><div class="doc"><p>Gets the length of a string.
</p></div></div><div class="top"><p class="src"><a name="v:isNull" class="def">isNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#isNull" class="link">Source</a></p><div class="doc"><p>Returns true if the expression is Null.
</p></div></div><div class="top"><p class="src"><a name="v:notNull" class="def">notNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Database-HaskellDB-Query.html#notNull" class="link">Source</a></p><div class="doc"><p>The inverse of <code><a href="Database-HaskellDB-Query.html#v:isNull">isNull</a></code>, returns false
 if the expression supplied is Null.
</p></div></div><div class="top"><p class="src"><a name="v:fromNull" class="def">fromNull</a><a href="src/Database-HaskellDB-Query.html#fromNull" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Default value (to be returned for <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>)
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</td><td class="doc"><p>A nullable expression
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Takes a default value a and a nullable value. If the value is NULL,
   the default value is returned, otherwise the value itself is returned.
   Simliar to <code>fromMaybe</code>
</p></div></div><div class="top"><p class="src"><a name="v:fromVal" class="def">fromVal</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#fromVal" class="link">Source</a></p><div class="doc"><p>Similar to fromNull, but takes a 
 value argument rather than an Expr.
</p></div></div><div class="top"><p class="src"><a name="v:constant" class="def">constant</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#constant" class="link">Source</a></p><div class="doc"><p>Creates a constant expression from a haskell value.
</p></div></div><div class="top"><p class="src"><a name="v:constVal" class="def">constVal</a> :: <a href="Database-HaskellDB-Query.html#t:ShowConstant">ShowConstant</a> a =&gt; a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)<a href="src/Database-HaskellDB-Query.html#constVal" class="link">Source</a></p><div class="doc"><p>Turn constant data into a nullable expression. 
   Same as <code>constant . Just</code>
</p></div></div><div class="top"><p class="src"><a name="v:constNull" class="def">constNull</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)<a href="src/Database-HaskellDB-Query.html#constNull" class="link">Source</a></p><div class="doc"><p>Represents a null value.
</p></div></div><div class="top"><p class="src"><a name="v:constExpr" class="def">constExpr</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)<a href="src/Database-HaskellDB-Query.html#constExpr" class="link">Source</a></p><div class="doc"><p>Turn constant data into a nullable expression. 
   Same as <code>constant . Just</code>
</p></div></div><div class="top"><p class="src"><a name="v:param" class="def">param</a><a href="src/Database-HaskellDB-Query.html#param" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Default value.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Create an anonymous parameter with a default value.
</p></div></div><div class="top"><p class="src"><a name="v:namedParam" class="def">namedParam</a><a href="src/Database-HaskellDB-Query.html#namedParam" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-PrimQuery.html#t:Name">Name</a></td><td class="doc"><p>Name of the parameter.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Default value for the parameter.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Create a named parameter with a default value.
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Args" class="def">Args</a> a <a href="src/Database-HaskellDB-Query.html#Args" class="link">Source</a></p><div class="doc"><p>Used to implement variable length arguments to <code>func</code>, below.
</p></div><div class="subs instances"><p id="control.i:Args" class="caption collapser" onclick="toggleSection('i:Args')">Instances</p><div id="section.i:Args" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(IsExpr tail, <a href="Database-HaskellDB-Query.html#t:Args">Args</a> tail) =&gt; <a href="Database-HaskellDB-Query.html#t:Args">Args</a> (<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; tail)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:func" class="def">func</a> :: <a href="Database-HaskellDB-Query.html#t:Args">Args</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; a<a href="src/Database-HaskellDB-Query.html#func" class="link">Source</a></p><div class="doc"><p>Can be used to define SQL functions which will
appear in queries. Each argument for the function is specified by its own Expr value. 
Examples include:
</p><pre>  lower :: Expr a -&gt; Expr (Maybe String) 
  lower str = func &quot;lower&quot; str
</pre><p>The arguments to the function do not have to be Expr if they can
be converted to Expr:
</p><pre>  data DatePart = Day | Century deriving Show 
</pre><pre>  datePart :: DatePart -&gt; Expr (Maybe CalendarTime) -&gt; Expr (Maybe Int) 
  datePart date col = func &quot;date_part&quot; (constant $ show date) col
</pre><p>Aggregate functions can also be defined. For example:
</p><pre>  every :: Expr Bool -&gt; ExprAggr Bool 
  every col = func &quot;every&quot; col
</pre><p>Aggregates are implemented to always take one argument, so any attempt to
define an aggregate with any more or less arguments will result in an error.
</p><p>Note that type signatures are usually required for each function defined,
unless the arguments can be inferred.
</p></div></div><div class="top"><p class="src"><a name="v:cast" class="def">cast</a><a href="src/Database-HaskellDB-Query.html#cast" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Destination type.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Source expression.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> b</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Generates a <code>CAST</code> expression for the given
 expression, using the argument given as the destination
 type. 
</p></div></div><div class="top"><p class="src"><a name="v:toStr" class="def">toStr</a> :: BStrToStr s d =&gt; s -&gt; d<a href="src/Database-HaskellDB-Query.html#toStr" class="link">Source</a></p><div class="doc"><p>Convert a bounded string to a real string.
</p></div></div><div class="top"><p class="src"><a name="v:coerce" class="def">coerce</a><a href="src/Database-HaskellDB-Query.html#coerce" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Source expression
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> b</td><td class="doc"><p>Destination type.
</p></td></tr></table></div><div class="doc"><p>Coerce the type of an expression
 to another type. Does not affect the actual
 primitive value - only the <code>phantom</code> type.
</p></div></div><div class="top"><p class="src"><a name="v:select" class="def">select</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#select" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:count" class="def">count</a> ::  <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/Database-HaskellDB-Query.html#count" class="link">Source</a></p><div class="doc"><p>Returns the number of records (=rows) in a query.
</p></div></div><div class="top"><p class="src"><a name="v:_sum" class="def">_sum</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#_sum" class="link">Source</a></p><div class="doc"><p>Returns the total sum of a column.
</p></div></div><div class="top"><p class="src"><a name="v:_max" class="def">_max</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#_max" class="link">Source</a></p><div class="doc"><p>Returns the highest value of a column.
</p></div></div><div class="top"><p class="src"><a name="v:_min" class="def">_min</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#_min" class="link">Source</a></p><div class="doc"><p>Returns the lowest value of a column.
</p></div></div><div class="top"><p class="src"><a name="v:avg" class="def">avg</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#avg" class="link">Source</a></p><div class="doc"><p>Returns the average of a column.
</p></div></div><div class="top"><p class="src"><a name="v:literal" class="def">literal</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#literal" class="link">Source</a></p><div class="doc"><p>Inserts the string literally - no escaping, no quoting.
</p></div></div><div class="top"><p class="src"><a name="v:stddev" class="def">stddev</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#stddev" class="link">Source</a></p><div class="doc"><p>Returns the standard deviation of a column.
</p></div></div><div class="top"><p class="src"><a name="v:stddevP" class="def">stddevP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#stddevP" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:variance" class="def">variance</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#variance" class="link">Source</a></p><div class="doc"><p>Returns the standard variance of a column.
</p></div></div><div class="top"><p class="src"><a name="v:varianceP" class="def">varianceP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a -&gt; <a href="Database-HaskellDB-Query.html#t:ExprAggr">ExprAggr</a> a<a href="src/Database-HaskellDB-Query.html#varianceP" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:asc" class="def">asc</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a><a href="src/Database-HaskellDB-Query.html#asc" class="link">Source</a></p><div class="doc"><p>Use this together with the function <code><a href="Database-HaskellDB-Query.html#v:order">order</a></code> to 
 order the results of a query in ascending order.
 Takes a relation and an attribute of that relation, which
 is used for the ordering.
</p></div></div><div class="top"><p class="src"><a name="v:desc" class="def">desc</a> :: <a href="Database-HaskellDB-HDBRec.html#t:HasField">HasField</a> f r =&gt; <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a><a href="src/Database-HaskellDB-Query.html#desc" class="link">Source</a></p><div class="doc"><p>Use this together with the function <code><a href="Database-HaskellDB-Query.html#v:order">order</a></code> to 
 order the results of a query in descending order.
 Takes a relation and an attribute of that relation, which
 is used for the ordering.
</p></div></div><div class="top"><p class="src"><a name="v:order" class="def">order</a> :: [<a href="Database-HaskellDB-Query.html#t:OrderExpr">OrderExpr</a>] -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Database-HaskellDB-Query.html#order" class="link">Source</a></p><div class="doc"><p>Order the results of a query.
 Use this with the <code><a href="Database-HaskellDB-Query.html#v:asc">asc</a></code> or <code><a href="Database-HaskellDB-Query.html#v:desc">desc</a></code> functions.
</p></div></div><div class="top"><p class="src"><a name="v:top" class="def">top</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Database-HaskellDB-Query.html#top" class="link">Source</a></p><div class="doc"><p>Return the n topmost records.
</p></div></div><div class="top"><p class="src"><a name="v:_case" class="def">_case</a><a href="src/Database-HaskellDB-Query.html#_case" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [(<a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a>, <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a)]</td><td class="doc"><p>A list of conditions and expressions.
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc"><p>Else-expression. 
</p></td></tr><tr><td class="src">-&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Creates a conditional expression.
   Returns the value of the expression corresponding to the first 
   true condition. If none of the conditions are true, the value of
   the else-expression is returned.
</p></div></div><div class="top"><p class="src"><a name="v:_default" class="def">_default</a> ::  <a href="Database-HaskellDB-Query.html#t:ExprDefault">ExprDefault</a> a<a href="src/Database-HaskellDB-Query.html#_default" class="link">Source</a></p><div class="doc"><p>The default value of the column. Only works with <code>insert</code>.
</p></div></div><h1 id="g:4">Internals
</h1><div class="top"><p class="src"><a name="v:runQuery" class="def">runQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a><a href="src/Database-HaskellDB-Query.html#runQuery" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:runQueryRel" class="def">runQueryRel</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; (<a href="Database-HaskellDB-PrimQuery.html#t:PrimQuery">PrimQuery</a>, <a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#runQueryRel" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unQuery" class="def">unQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> a -&gt; a<a href="src/Database-HaskellDB-Query.html#unQuery" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:subQuery" class="def">subQuery</a> ::  <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r) -&gt; <a href="Database-HaskellDB-Query.html#t:Query">Query</a> (<a href="Database-HaskellDB-Query.html#t:Rel">Rel</a> r)<a href="src/Database-HaskellDB-Query.html#subQuery" class="link">Source</a></p><div class="doc"><p>Allows a subquery to be created between another query and
 this query. Normally query definition is associative and query definition
 is interleaved. This combinator ensures the given query is
 added as a whole piece.
</p></div></div><div class="top"><p class="src"><a name="v:attribute" class="def">attribute</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Expr">Expr</a> a<a href="src/Database-HaskellDB-Query.html#attribute" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:attributeName" class="def">attributeName</a> ::  <a href="Database-HaskellDB-Query.html#t:Attr">Attr</a> f a -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:Attribute">Attribute</a><a href="src/Database-HaskellDB-Query.html#attributeName" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tableName" class="def">tableName</a> ::  <a href="Database-HaskellDB-Query.html#t:Table">Table</a> t -&gt; <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a><a href="src/Database-HaskellDB-Query.html#tableName" class="link">Source</a></p><div class="doc"><p>Get the name of a table.
</p></div></div><div class="top"><p class="src"><a name="v:baseTable" class="def">baseTable</a> :: (<a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r, <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r) =&gt; <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> r<a href="src/Database-HaskellDB-Query.html#baseTable" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:emptyTable" class="def">emptyTable</a> :: <a href="Database-HaskellDB-PrimQuery.html#t:TableName">TableName</a> -&gt; <a href="Database-HaskellDB-Query.html#t:Table">Table</a> (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> <a href="Database-HaskellDB-HDBRec.html#t:RecNil">RecNil</a>)<a href="src/Database-HaskellDB-Query.html#emptyTable" class="link">Source</a></p><div class="doc"><p>For queries against fake tables, such as
 'information_schema.information_schema_catalog_name'. Useful for
 constructing queries that contain constant data (and do not select
 from columns) but need a table to select from.
</p></div></div><div class="top"><p class="src"><a name="v:exprs" class="def">exprs</a> :: <a href="Database-HaskellDB-Query.html#t:ToPrimExprs">ToPrimExprs</a> r =&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r -&gt; [<a href="Database-HaskellDB-PrimQuery.html#t:PrimExpr">PrimExpr</a>]<a href="src/Database-HaskellDB-Query.html#exprs" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:labels" class="def">labels</a> :: <a href="Database-HaskellDB-HDBRec.html#t:ShowLabels">ShowLabels</a> r =&gt; r -&gt; [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]<a href="src/Database-HaskellDB-Query.html#labels" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tableRec" class="def">tableRec</a> ::  <a href="Database-HaskellDB-Query.html#t:Table">Table</a> (<a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r) -&gt; <a href="Database-HaskellDB-HDBRec.html#t:Record">Record</a> r<a href="src/Database-HaskellDB-Query.html#tableRec" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>