onConflictDoNothing method

Mutation<F> onConflictDoNothing({
  1. List<ReadField<Object?>> target(
    1. F
    )?,
})

Prepares SQLite/PostgreSQL duplicate-key suppression for this insert.

An explicit target must match a declared primary or unique key. Omitting it uses the database's untargeted ON CONFLICT DO NOTHING behavior.

Implementation

Mutation<F> onConflictDoNothing({
  List<ReadField<Object?>> Function(F)? target,
}) =>
    _withConflict(target == null ? [] : target(queryFields), const [], null);