Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Since: 1.0.0.0
Synopsis
- data UpdateExpr
- updateExpr :: Qualified TableName -> SetClauseList -> Maybe WhereClause -> Maybe ReturningExpr -> UpdateExpr
- data SetClauseList
- setClauseList :: NonEmpty SetClause -> SetClauseList
- data SetClause
- setColumn :: ColumnName -> SqlValue -> SetClause
Documentation
data UpdateExpr Source #
Type to represent a SQL UPDATE
statement. E.G.
UPDATE foo SET id = 1 WHERE id <> 1
UpdateExpr
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression UpdateExpr Source # | |
Defined in Orville.PostgreSQL.Expr.Update toRawSql :: UpdateExpr -> RawSql Source # unsafeFromRawSql :: RawSql -> UpdateExpr Source # |
:: Qualified TableName | The name of the table to be updated. |
-> SetClauseList | The updates to be made to the table. |
-> Maybe WhereClause | An optional where clause to limit the rows updated. |
-> Maybe ReturningExpr | An optional returning clause to return data from the updated rows. |
-> UpdateExpr |
Constructs an UpdateExpr
with the given options.
Since: 1.0.0.0
data SetClauseList Source #
Type to represent the list of updates to be made in an UPDATE
statement. E.G.
foo = 1, bar = 2
SetClauseList
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0
Instances
SqlExpression SetClauseList Source # | |
Defined in Orville.PostgreSQL.Expr.Update toRawSql :: SetClauseList -> RawSql Source # |
setClauseList :: NonEmpty SetClause -> SetClauseList Source #
Constructs a SetClauseList
with the specified set clauses.
Since: 1.0.0.0
Type to represent a single update to be made in an UPDATE
statement. E.G.
foo = 1
SetClause
provides a SqlExpression
instance. See
unsafeSqlExpression
for how to construct a value with your own custom
SQL.
Since: 1.0.0.0