mirror of https://github.com/AMT-Cheif/drift.git
add doc to DoUpdate where
This commit is contained in:
parent
28d465f69c
commit
3f3236cf7b
|
@ -325,6 +325,11 @@ class DoUpdate<T extends Table, D> extends UpsertClause<T, D> {
|
||||||
/// If you need to refer to both the old row and the row that would have
|
/// If you need to refer to both the old row and the row that would have
|
||||||
/// been inserted, use [DoUpdate.withExcluded].
|
/// been inserted, use [DoUpdate.withExcluded].
|
||||||
///
|
///
|
||||||
|
/// The optional [where] clause can be used to
|
||||||
|
/// disable the update based on the old value.
|
||||||
|
/// If a [where] clause is set and it evaluates to false,
|
||||||
|
/// a conflict will keep the old row without applying the update
|
||||||
|
///
|
||||||
/// For an example, see [InsertStatement.insert].
|
/// For an example, see [InsertStatement.insert].
|
||||||
DoUpdate(Insertable<D> Function(T old) update,
|
DoUpdate(Insertable<D> Function(T old) update,
|
||||||
{this.target, Expression<bool?> Function(T old)? where})
|
{this.target, Expression<bool?> Function(T old)? where})
|
||||||
|
@ -340,6 +345,11 @@ class DoUpdate<T extends Table, D> extends UpsertClause<T, D> {
|
||||||
/// to columns in the row that couldn't be inserted with the `excluded`
|
/// to columns in the row that couldn't be inserted with the `excluded`
|
||||||
/// parameter.
|
/// parameter.
|
||||||
///
|
///
|
||||||
|
/// The optional [where] clause can be used to
|
||||||
|
/// disable the update based on the old value.
|
||||||
|
/// If a [where] clause is set and it evaluates to false,
|
||||||
|
/// a conflict will keep the old row without applying the update
|
||||||
|
///
|
||||||
/// For an example, see [InsertStatement.insert].
|
/// For an example, see [InsertStatement.insert].
|
||||||
DoUpdate.withExcluded(this._creator,
|
DoUpdate.withExcluded(this._creator,
|
||||||
{this.target, Expression<bool?> Function(T old, T excluded)? where})
|
{this.target, Expression<bool?> Function(T old, T excluded)? where})
|
||||||
|
|
Loading…
Reference in New Issue