Skip to content

Commit

Permalink
Added new docs in README
Browse files Browse the repository at this point in the history
  • Loading branch information
chandr-andr committed Feb 14, 2024
1 parent f517148 commit 8866f45
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,32 @@ async def main() -> None:
await transaction.rollback_to("test_savepoint")
```

### Transaction RELEASE SAVEPOINT
It's possible to release savepoint

```python
from typing import Any
import asyncio

from rust_psql_driver import PSQLPool, IsolationLevel


db_pool = PSQLPool()

async def main() -> None:
await db_pool.startup()

transaction = await db_pool.transaction(
isolation_level=IsolationLevel.Serializable,
)

await transaction.begin()
# Create new savepoint
await transaction.savepoint("test_savepoint")
# Release savepoint
await transaction.release_savepoint("test_savepoint")
```

## Extra Types
Sometimes it's impossible to identify which type user tries to pass as a argument. But Rust is a strongly typed programming language so we have to help.

Expand Down

0 comments on commit 8866f45

Please sign in to comment.