@@ -181,6 +181,22 @@ data JoinExpression params schema tables where
181 -> Expression params (table ': tables) ('NotNull 'PGBool)
181 -> Expression params (table ': tables) ('NotNull 'PGBool)
182 -> JoinExpression params schema tables
182 -> JoinExpression params schema tables
183 -> JoinExpression params schema (table ': tables)
183 -> JoinExpression params schema (table ': tables)
185+ :: Aliased (TableExpression params schema) right
186+ -> Expression params '[left,right] ('NotNull 'PGBool)
187+ -> JoinExpression params schema (tables)
188+ -> JoinExpression params schema (NullifyTable right ': left ': tables)
190+ :: Aliased (TableExpression params schema) right
191+ -> Expression params '[left,right] ('NotNull 'PGBool)
192+ -> JoinExpression params schema (left : tables)
193+ -> JoinExpression params schema (right ': NullifyTable left ': tables)
195+ :: Aliased (TableExpression params schema) right
196+ -> Expression params '[left,right] ('NotNull 'PGBool)
197+ -> JoinExpression params schema (left : tables)
198+ -> JoinExpression params schema
199+ (NullifyTable right ': NullifyTable left ': tables)
185renderJoinExpression :: JoinExpression params schema tables -> ByteString
201renderJoinExpression :: JoinExpression params schema tables -> ByteString
186renderJoinExpression = \case
202renderJoinExpression = \case
@@ -198,6 +214,27 @@ renderJoinExpression = \case
199 , renderExpression on
215 , renderExpression on
217+ LeftOuter table on tables -> mconcat
218+ [ renderJoinExpression tables
219+ , " LEFT OUTER JOIN "
220+ , renderAliased renderTableExpression table
222+ , renderExpression on
224+ RightOuter table on tables -> mconcat
225+ [ renderJoinExpression tables
226+ , " RIGHT OUTER JOIN "
227+ , renderAliased renderTableExpression table
229+ , renderExpression on
231+ FullOuter table on tables -> mconcat
232+ [ renderJoinExpression tables
233+ , " FULL OUTER JOIN "
234+ , renderAliased renderTableExpression table
236+ , renderExpression on
202class KnownSymbol table => HasTable table tables columns
239class KnownSymbol table => HasTable table tables columns
203 | table tables -> columns where
240 | table tables -> columns where
@@ -217,44 +254,6 @@ instance HasTable table schema columns
217 => IsLabel table (JoinExpression params schema '[table ::: columns]) where
254 => IsLabel table (JoinExpression params schema '[table ::: columns]) where
218 fromLabel p = Table $ fromLabel p
255 fromLabel p = Table $ fromLabel p
222−-- :: JoinExpression params schema '[right]
223−-- -> Expression params (right ': left : tables) ('NotNull 'PGBool)
224−-- -> JoinExpression params schema (tables)
225−-- -> JoinExpression params schema (NullifyTable right ': left ': tables)
226−-- leftOuter tab on tabs = UnsafeJoinExpression $
227−-- renderJoinExpression tabs
228−-- <> " LEFT OUTER JOIN " <>
229−-- renderJoinExpression tab
231−-- renderExpression on
234−-- :: JoinExpression params schema '[right]
235−-- -> Expression params (right ': tables) ('NotNull 'PGBool)
236−-- -> JoinExpression params schema (left : tables)
237−-- -> JoinExpression params schema (right ': NullifyTable left ': tables)
238−-- rightOuter tab on tabs = UnsafeJoinExpression $
239−-- renderJoinExpression tabs
240−-- <> " RIGHT OUTER JOIN " <>
241−-- renderJoinExpression tab
243−-- renderExpression on
246−-- :: JoinExpression params schema '[right]
247−-- -> Expression params (right ': left ': tables) ('NotNull 'PGBool)
248−-- -> JoinExpression params schema (left : tables)
249−-- -> JoinExpression params schema
250−-- (NullifyTable right ': NullifyTable left ': tables)
251−-- fullOuter tab on tabs = UnsafeJoinExpression $
252−-- renderJoinExpression tabs
253−-- <> " FULL OUTER JOIN " <>
254−-- renderJoinExpression tab
256−-- renderExpression on
258data Clauses params tables = Clauses
257data Clauses params tables = Clauses
259 { whereClause :: Maybe (Expression params tables ('NotNull 'PGBool))
258 { whereClause :: Maybe (Expression params tables ('NotNull 'PGBool))
260 , limitClause :: Maybe (Expression params '[] ('NotNull 'PGInt8))
259 , limitClause :: Maybe (Expression params '[] ('NotNull 'PGInt8))