edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

Add savepoint API

Open fantix opened this issue 2 years ago • 4 comments

Please see tests for use case.

  • [ ] Add docs

Fixes #407

fantix avatar May 25 '23 22:05 fantix

We should allow skipping name argument and generate something unique (e.g. uuid). Actually while we have variables in python (I mean sp_name = conn.declare_savepoint() ) names are useless, will only provoke unexpected conflicts.

+1

Do we need declare_ part? x = tx.savepoint() is nice, no? (we already do that with transactions by skipping start part)

Yes, please, it should be tx.savepoint() with an optional name argument (although I'd not even have the name argument at all, why would you want it?)

1st1 avatar May 31 '23 17:05 1st1

Pushed a fix to rename declare_savepoint() to savepoint() and dropped user-defined names (always use s + uuid instead).

(Context API) can be added later, but is pretty uncontroversial I think.

Let's add later 😏

fantix avatar Jun 27 '23 16:06 fantix

Hi all, any updates on this?

jsimonlane avatar Nov 19 '23 03:11 jsimonlane

Hi all, any updates on this?

Sorry, not yet. But we'll put time into the Python binding very soon!

fantix avatar Nov 19 '23 03:11 fantix