@@ -37,6 +37,7 @@ module Squeal.PostgreSQL.Query
37 , selectDotStar
37 , selectDotStar
38 , selectDistinctDotStar
38 , selectDistinctDotStar
40 -- * Table Expressions
41 -- * Table Expressions
41 , TableExpression (..)
42 , TableExpression (..)
42 , renderTableExpression
43 , renderTableExpression
@@ -440,6 +441,7 @@ values
440 => NP (Aliased (Expression '[] 'Ungrouped params)) cols
441 => NP (Aliased (Expression '[] 'Ungrouped params)) cols
441 -> [NP (Aliased (Expression '[] 'Ungrouped params)) cols]
442 -> [NP (Aliased (Expression '[] 'Ungrouped params)) cols]
442 -- ^ When more than one row is specified, all the rows must
443 -- ^ When more than one row is specified, all the rows must
444+ -- must have the same number of elements
443 -> Query schema params cols
445 -> Query schema params cols
444values rw rws = UnsafeQuery $ "SELECT * FROM"
446values rw rws = UnsafeQuery $ "SELECT * FROM"
445 <+> parenthesized (
447 <+> parenthesized (
@@ -455,6 +457,15 @@ values rw rws = UnsafeQuery $ "SELECT * FROM"
455 renderAliasPart (_ `As` name) = renderAlias name
457 renderAliasPart (_ `As` name) = renderAlias name
456 renderValuePart (value `As` _) = renderExpression value
458 renderValuePart (value `As` _) = renderExpression value
460+-- | `values_` computes a row value or set of row values
461+-- specified by value expressions.
464+ => NP (Aliased (Expression '[] 'Ungrouped params)) cols
465+ -- ^ one row of values
466+ -> Query schema params cols
467+values_ rw = values rw []
458{-----------------------------------------
469{-----------------------------------------
459Table Expressions
470Table Expressions
460-----------------------------------------}
471-----------------------------------------}