Skip to content

Modularize BeamHasInsertOnConflict #809

Description

@LaurentRDC

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions