@@ -63,9 +63,9 @@ instance {-# OVERLAPPABLE #-} (KnownNat n, HasParameter (n-1) params ty)
63class KnownSymbol column => HasColumn column columns ty
63class KnownSymbol column => HasColumn column columns ty
64 | column columns -> ty where
64 | column columns -> ty where
66− :: Proxy# column
66+ :: Alias column
67 -> Expression params '[table ::: columns] 'Ungrouped ty
67 -> Expression params '[table ::: columns] 'Ungrouped ty
68− getColumn column = UnsafeExpression $ renderSymbol column
68+ getColumn column = UnsafeExpression $ renderAlias column
69instance {-# OVERLAPPING #-} KnownSymbol column
69instance {-# OVERLAPPING #-} KnownSymbol column
70 => HasColumn column ((column ::: optionality ty) ': tys) ('Required ty)
70 => HasColumn column ((column ::: optionality ty) ': tys) ('Required ty)
71instance {-# OVERLAPPABLE #-} (KnownSymbol column, HasColumn column table ty)
71instance {-# OVERLAPPABLE #-} (KnownSymbol column, HasColumn column table ty)
@@ -73,7 +73,7 @@ instance {-# OVERLAPPABLE #-} (KnownSymbol column, HasColumn column table ty)
74instance (HasColumn column columns ty, tables ~ '[table ::: columns])
74instance (HasColumn column columns ty, tables ~ '[table ::: columns])
75 => IsLabel column (Expression params tables 'Ungrouped ty) where
75 => IsLabel column (Expression params tables 'Ungrouped ty) where
76− fromLabel = getColumn (proxy# @Symbol @column)
76+ fromLabel = getColumn (Alias @column)
78instance (HasTable table tables columns, HasColumn column columns ty)
78instance (HasTable table tables columns, HasColumn column columns ty)
79 => IsTableColumn table column (Expression params tables 'Ungrouped ty) where
79 => IsTableColumn table column (Expression params tables 'Ungrouped ty) where
@@ -342,36 +342,42 @@ ifThenElse if_ then_ else_ = caseWhenThenElse [(if_,then_)] else_
342 -> Expression params tables grouping ('Required (nullity ty))
342 -> Expression params tables grouping ('Required (nullity ty))
343 -> Expression params tables grouping ('Required (nullity 'PGbool))
343 -> Expression params tables grouping ('Required (nullity 'PGbool))
344(==*) = unsafeBinaryOp "="
344(==*) = unsafeBinaryOp "="
347 :: Expression params tables grouping ('Required (nullity ty))
348 :: Expression params tables grouping ('Required (nullity ty))
348 -> Expression params tables grouping ('Required (nullity ty))
349 -> Expression params tables grouping ('Required (nullity ty))
349 -> Expression params tables grouping ('Required (nullity 'PGbool))
350 -> Expression params tables grouping ('Required (nullity 'PGbool))
350(/=*) = unsafeBinaryOp "<>"
351(/=*) = unsafeBinaryOp "<>"
353 :: Expression params tables grouping ('Required (nullity ty))
355 :: Expression params tables grouping ('Required (nullity ty))
354 -> Expression params tables grouping ('Required (nullity ty))
356 -> Expression params tables grouping ('Required (nullity ty))
355 -> Expression params tables grouping ('Required (nullity 'PGbool))
357 -> Expression params tables grouping ('Required (nullity 'PGbool))
356(>=*) = unsafeBinaryOp ">="
358(>=*) = unsafeBinaryOp ">="
359 :: Expression params tables grouping ('Required (nullity ty))
362 :: Expression params tables grouping ('Required (nullity ty))
360 -> Expression params tables grouping ('Required (nullity ty))
363 -> Expression params tables grouping ('Required (nullity ty))
361 -> Expression params tables grouping ('Required (nullity 'PGbool))
364 -> Expression params tables grouping ('Required (nullity 'PGbool))
362(<*) = unsafeBinaryOp "<"
365(<*) = unsafeBinaryOp "<"
365 :: Expression params tables grouping ('Required (nullity ty))
369 :: Expression params tables grouping ('Required (nullity ty))
366 -> Expression params tables grouping ('Required (nullity ty))
370 -> Expression params tables grouping ('Required (nullity ty))
367 -> Expression params tables grouping ('Required (nullity 'PGbool))
371 -> Expression params tables grouping ('Required (nullity 'PGbool))
368(<=*) = unsafeBinaryOp "<="
372(<=*) = unsafeBinaryOp "<="
371 :: Expression params tables grouping ('Required (nullity ty))
376 :: Expression params tables grouping ('Required (nullity ty))
372 -> Expression params tables grouping ('Required (nullity ty))
377 -> Expression params tables grouping ('Required (nullity ty))
373 -> Expression params tables grouping ('Required (nullity 'PGbool))
378 -> Expression params tables grouping ('Required (nullity 'PGbool))
374(>*) = unsafeBinaryOp ">"
379(>*) = unsafeBinaryOp ">"
376data SortExpression params tables grouping where
382data SortExpression params tables grouping where
@@ -437,9 +443,9 @@ class (KnownSymbol table, KnownSymbol column)
437 => GroupedBy table column bys where
443 => GroupedBy table column bys where
438 getGroup1
444 getGroup1
439 :: (tables ~ '[table ::: columns], HasColumn column columns ty)
445 :: (tables ~ '[table ::: columns], HasColumn column columns ty)
440− => Proxy# column
446+ => Alias column
441 -> Expression params tables ('Grouped bys) ty
447 -> Expression params tables ('Grouped bys) ty
442− getGroup1 column = UnsafeExpression $ renderSymbol column
448+ getGroup1 column = UnsafeExpression $ renderAlias column
443 getGroup2
449 getGroup2
444 :: (HasTable table tables columns, HasColumn column columns ty)
450 :: (HasTable table tables columns, HasColumn column columns ty)
445 => Alias table
451 => Alias table
@@ -461,7 +467,7 @@ instance
461 , GroupedBy table column bys
467 , GroupedBy table column bys
462 ) => IsLabel column
468 ) => IsLabel column
463 (Expression params tables ('Grouped bys) ty) where
469 (Expression params tables ('Grouped bys) ty) where
464− fromLabel = getGroup1 (proxy# @Symbol @column)
470+ fromLabel = getGroup1 (Alias @column)
467 ( HasTable table tables columns
473 ( HasTable table tables columns
@@ -579,8 +585,8 @@ newtype Table
580class KnownSymbol table => HasTable table tables columns
586class KnownSymbol table => HasTable table tables columns
581 | table tables -> columns where
587 | table tables -> columns where
582− getTable :: Proxy# table -> Table tables columns
588+ getTable :: Alias table -> Table tables columns
583− getTable table = UnsafeTable $ renderSymbol table
589+ getTable table = UnsafeTable $ renderAlias table
584instance {-# OVERLAPPING #-} KnownSymbol table
590instance {-# OVERLAPPING #-} KnownSymbol table
585 => HasTable table ((table ::: columns) ': tables) columns
591 => HasTable table ((table ::: columns) ': tables) columns
586instance {-# OVERLAPPABLE #-}
592instance {-# OVERLAPPABLE #-}
@@ -589,7 +595,7 @@ instance {-# OVERLAPPABLE #-}
590instance HasTable table schema columns
596instance HasTable table schema columns
591 => IsLabel table (Table schema columns) where
597 => IsLabel table (Table schema columns) where
592− fromLabel = getTable (proxy# @Symbol @table)
598+ fromLabel = getTable (Alias @table)
594data TableReference params schema tables where
600data TableReference params schema tables where
@@ -1303,8 +1309,5 @@ renderCommaSeparatedMaybe render
1303 . hcollapse
1309 . hcollapse
1304 . hmap (K . render)
1310 . hmap (K . render)
1306−renderSymbol :: KnownSymbol str => Proxy# str -> ByteString
1307−renderSymbol p = fromString $ symbolVal' p
1309renderNat :: KnownNat n => proxy n -> ByteString
1312renderNat :: KnownNat n => proxy n -> ByteString
1310renderNat (_ :: proxy n) = fromString (show (natVal' (proxy# :: Proxy# n)))
1313renderNat (_ :: proxy n) = fromString (show (natVal' (proxy# :: Proxy# n)))