Skip to content

eventually-postgres: use an isolated transaction for saving events to the tables #279

Open
@ar3s3ru

Description

@ar3s3ru

At the moment, the eventually-postgres implementation uses a stored procedure to aid in the event::Store::append and aggregate::Repository::save methods.

Instead, we could mimick the functionality of go-eventually where we use an isolated, serializable transaction to perform the update, which removes the need for stored procedures:

https://github.com/get-eventually/go-eventually/blob/c6b8740b1c0b55c25ee2132e2c7f244880f165b4/postgres/event_store.go#L92-L96

Metadata

Metadata

Assignees

No one assigned

    Labels

    eventually-postgresIssue or Pull Request involves eventually-util cratefeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions