Skip to content

Version of repsert for records with custom primary keys #973

@enolan

Description

@enolan

The type of repsert is (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m (), if I have a record where I've specified the key is one of the fields then the first parameter is redundant - it can be computed from the record itself. It'd be a nice ergonomic improvement to have a function for that case with one less parameter. It'd be almost exactly the same as upsert, with the OnlyOneUniqueKey constraint, but not taking a list of updates to perform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions