edgedb / edgedb-rust

The official Rust binding for EdgeDB
https://edgedb.com
Apache License 2.0
209 stars 26 forks source link

Make IsolationLevel pub #292

Closed Dhghomon closed 2 months ago

Dhghomon commented 5 months ago

Resolves https://github.com/edgedb/edgedb-rust/issues/291 in which a user noticed that IsolationLevel is required for TransactionOptions::isolation but didn't make the pub use statement for the rest of the types in the options module.

elprans commented 5 months ago

I think we should just remove/unpublish the isolation method. It's not useful, because serializable is the only isolation option.

Dhghomon commented 5 months ago

I think we should just remove/unpublish the isolation method. It's not useful, because serializable is the only isolation option.

That would work. Should we remove the IsolationLevel enum as well or are there plans to add to it in the future?

aljazerzen commented 2 months ago

I've removed isolation method and IsolationLevel itself. Here is justification from commit message:

At the moment, isolation level of a transaction can only be SERIALIZABLE. It can be specified when opening a connection, but if it is not, it will default to SERIALIZABLE.

There is also no plans to support other level soon.

IsolationLevel thus serves no purpse and also cannot be set outside of this crate, since it is not public.

So there is no harm in removing it. When/if we implement other levels, we can revert this commit.