edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
369 stars 45 forks source link

Add savepoint API #433

Open fantix opened 1 year ago

fantix commented 1 year ago

Please see tests for use case.

Fixes #407

1st1 commented 1 year ago

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?)

fantix commented 1 year ago

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 😏

jsimonlane commented 1 year ago

Hi all, any updates on this?

fantix commented 1 year ago

Hi all, any updates on this?

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