visitDoUpdate method

  1. @override
void visitDoUpdate(
  1. DoUpdate e,
  2. ColumnResolverContext arg
)
override

Implementation

@override
void visitDoUpdate(DoUpdate e, ColumnResolverContext arg) {
  final surroundingInsert = e.parents.whereType<InsertStatement>().first;
  final table = surroundingInsert.table.resultSet;

  if (table != null) {
    // add "excluded" table qualifier that referring to the row that would
    // have been inserted had the uniqueness constraint not been violated.
    e.scope.addAlias(e, table, 'excluded');
  }

  visitChildren(e, arg);
}