geldata / geldata/gel-python

Make save transaction-friendly

Open
#849 1 comment 0 reactions 0 assignees View on GitHub
low priority ORM
Dominant language
Python
Stars
415
Forks
50
PR merge metrics
No merged PRs in 30d

Description

We need to make `save()` (and potentially `sync()`) transactions-friendly.

By default we don't want `save()` functionality to produce partial results, instead it is intended as an atomic all-or-nothing operation. Since it's not always possible to pack the necessary operations into a single query we may use a transaction internally to make `save()` atomic. We don't have nested transactions in Gel, so this behaviour of `save()` is not compatible with being nested inside another transaction.

We need to automatically detect whether we're in a transaction already and use savepoints when needed for `save()` to allow rolling back changes in case of save errors without breaking the outer transaction overall.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.