add doc to DoUpdate where

This commit is contained in:
Ali 2021-10-05 19:47:17 +03:00
parent 28d465f69c
commit 3f3236cf7b
1 changed files with 11 additions and 1 deletions

View File

@ -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})
@ -339,7 +344,12 @@ class DoUpdate<T extends Table, D> extends UpsertClause<T, D> {
/// It can refer to the values from the old row in the first parameter and /// It can refer to the values from the old row in the first parameter and
/// 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})