BeamHasInsertOnConflict is a typeclass with many methods. The central method is insertOnConflict, but others are also attached, such as conflictingFieldsWhere.
Unfortunately, not all methods are supported by all DB management systems. Specifically, conflictingFieldsWhere is supported by Postgres and SQLite, but not DuckDB. This creates the weird situation whereby the DuckDB backend can have a partial BeamHasInsertOnConflict instance (#808), but care must be taken to prevent the user from using conflictingFieldsWhere.
Instead, BeamHasInsertOnConflict should be modularized. I imagine that insertOnConflict, anyConflict, onConflictDoNothing, onConflictUpdateSet would be preserved on BeamHasInsertOnConflict, but other methods would be split off into other classes.
BeamHasInsertOnConflictis a typeclass with many methods. The central method isinsertOnConflict, but others are also attached, such asconflictingFieldsWhere.Unfortunately, not all methods are supported by all DB management systems. Specifically,
conflictingFieldsWhereis supported by Postgres and SQLite, but not DuckDB. This creates the weird situation whereby the DuckDB backend can have a partialBeamHasInsertOnConflictinstance (#808), but care must be taken to prevent the user from usingconflictingFieldsWhere.Instead,
BeamHasInsertOnConflictshould be modularized. I imagine thatinsertOnConflict,anyConflict,onConflictDoNothing,onConflictUpdateSetwould be preserved onBeamHasInsertOnConflict, but other methods would be split off into other classes.