@@ -1461,7 +1461,7 @@ class Aggregate expr1 expr2 aggr
1462 -- | >>> :{
1462 -- | >>> :{
1464− -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: 'Null 'PGnumeric]] ('Null 'PGnumeric)
1464+ -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: 'Null 'PGnumeric]] ('NotNull 'PGnumeric)
1465 -- expression = sum_ (Distinct #col)
1465 -- expression = sum_ (Distinct #col)
1466 -- in printSQL expression
1466 -- in printSQL expression
@@ -1469,7 +1469,7 @@ class Aggregate expr1 expr2 aggr
1470 :: ty `In` PGNum
1470 :: ty `In` PGNum
1471 => expr1 (nullity ty)
1471 => expr1 (nullity ty)
1472− -> aggr ('Null ty)
1472+ -> aggr ('NotNull ty)
1474 -- | input values, including nulls, concatenated into an array
1474 -- | input values, including nulls, concatenated into an array
1475 arrayAgg
1475 arrayAgg
@@ -1486,71 +1486,88 @@ class Aggregate expr1 expr2 aggr
1486 :: expr1 ty
1486 :: expr1 ty
1487 -> aggr ('Null 'PGjsonb)
1487 -> aggr ('Null 'PGjsonb)
1490+ the bitwise AND of all non-null input values, or null if none
1489− -- | >>> :{
1491+ >>> :{
1491− -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGint4]] (nullity 'PGint4)
1493+ expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGint4]] ('Null 'PGint4)
1492− -- expression = bitAnd (Distinct #col)
1494+ expression = bitAnd (Distinct #col)
1493− -- in printSQL expression
1495+ in printSQL expression
1495− -- bit_and(DISTINCT "col")
1497+ bit_and(DISTINCT "col")
1497 :: int `In` PGIntegral
1500 :: int `In` PGIntegral
1498 => expr1 (nullity int)
1501 => expr1 (nullity int)
1499 -- ^ what to aggregate
1502 -- ^ what to aggregate
1500 -> aggr ('Null int)
1503 -> aggr ('Null int)
1506+ the bitwise OR of all non-null input values, or null if none
1502− -- | >>> :{
1508+ >>> :{
1504− -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGint4]] (nullity 'PGint4)
1510+ expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGint4]] ('Null 'PGint4)
1505− -- expression = bitOr (All #col)
1511+ expression = bitOr (All #col)
1506− -- in printSQL expression
1512+ in printSQL expression
1508− -- bit_or(ALL "col")
1514+ bit_or(ALL "col")
1510 :: int `In` PGIntegral
1517 :: int `In` PGIntegral
1511 => expr1 (nullity int)
1518 => expr1 (nullity int)
1512 -- ^ what to aggregate
1519 -- ^ what to aggregate
1513 -> aggr ('Null int)
1520 -> aggr ('Null int)
1523+ true if all input values are true, otherwise false
1515− -- | >>> :{
1525+ >>> :{
1517− -- winFun :: WindowFunction '[] 'Ungrouped commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] (nullity 'PGbool)
1527+ winFun :: WindowFunction '[] 'Ungrouped commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] ('Null 'PGbool)
1518− -- winFun = boolAnd #col
1528+ winFun = boolAnd #col
1519− -- in printSQL winFun
1529+ in printSQL winFun
1521− -- bool_and("col")
1531+ bool_and("col")
1523 :: expr1 (nullity 'PGbool)
1534 :: expr1 (nullity 'PGbool)
1524 -- ^ what to aggregate
1535 -- ^ what to aggregate
1525 -> aggr ('Null 'PGbool)
1536 -> aggr ('Null 'PGbool)
1539+ true if at least one input value is true, otherwise false
1527− -- | >>> :{
1541+ >>> :{
1529− -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] (nullity 'PGbool)
1543+ expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] (nullity 'PGbool)
1530− -- expression = boolOr (All #col)
1544+ expression = boolOr (All #col)
1531− -- in printSQL expression
1545+ in printSQL expression
1533− -- bool_or(ALL "col")
1547+ bool_or(ALL "col")
1535 :: expr1(nullity 'PGbool)
1550 :: expr1(nullity 'PGbool)
1536 -- ^ what to aggregate
1551 -- ^ what to aggregate
1537 -> aggr ('Null 'PGbool)
1552 -> aggr ('Null 'PGbool)
1539− -- | synonym for `boolAnd`
1554+ {- |
1540− --
1555+ equivalent to `boolAnd`
1541− -- >>> :{
1557+ >>> :{
1543− -- expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] (nullity 'PGbool)
1559+ expression :: Expression '[] ('Grouped bys) commons schemas params '[tab ::: '["col" ::: nullity 'PGbool]] (nullity 'PGbool)
1544− -- expression = every (Distinct #col)
1560+ expression = every (Distinct #col)
1545− -- in printSQL expression
1561+ in printSQL expression
1547− -- every(DISTINCT "col")
1563+ every(DISTINCT "col")
1549 :: expr1 (nullity 'PGbool)
1566 :: expr1 (nullity 'PGbool)
1550 -- ^ what to aggregate
1567 -- ^ what to aggregate
1551 -> aggr ('Null 'PGbool)
1568 -> aggr ('Null 'PGbool)
1553− -- | maximum value of expression across all input values
1570+ {- |maximum value of expression across all input values-}
1555 :: expr1 (nullity ty)
1572 :: expr1 (nullity ty)
1556 -- ^ what to maximize
1573 -- ^ what to maximize
@@ -1562,7 +1579,7 @@ class Aggregate expr1 expr2 aggr
1562 -- ^ what to minimize
1579 -- ^ what to minimize
1563 -> aggr ('Null ty)
1580 -> aggr ('Null ty)
1565− -- | average aggregation
1582+ -- | the average (arithmetic mean) of all input values
1567 :: expr1 (nullity ty)
1584 :: expr1 (nullity ty)
1568 -- ^ what to average
1585 -- ^ what to average