Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Mongo-like Sessions and Transactions #40

Merged
merged 30 commits into from
Aug 3, 2024

Conversation

oskardudycz
Copy link
Contributor

@oskardudycz oskardudycz commented Jul 30, 2024

As in the title, it added support for sessions and transactions. Unlike MongoDB, it only supports transactions on a single database (as we have PostgreSQL underneath).

To make that possible, a huge refactoring was made, introducing abstractions for Pool, Connection, and Transaction. This will enable the introduction of other database types and drivers like Postgres.

Made easier disabling connection pool by passing {pooled: false} options to Pongo Client creation.

Consequently, I cleaned up the file structure, grouping it based on the core features, database type, and driver.

In the future, this will also be a basis for Pongo and Emmett's multiple-store capabilities.

Expect a blog on that next week.

Fixes #39

@oskardudycz oskardudycz force-pushed the sessions_and_transactions_support branch 2 times, most recently from f17bfaa to 4be82fc Compare August 1, 2024 13:49
@oskardudycz oskardudycz force-pushed the sessions_and_transactions_support branch from 4be82fc to 5b6372f Compare August 1, 2024 13:50
Note: it's not yet used. That'll be added in the follow up commits.
@oskardudycz oskardudycz force-pushed the sessions_and_transactions_support branch from 3fb9bcb to 1755469 Compare August 3, 2024 10:03
@oskardudycz oskardudycz changed the title Added initial types definition for Pongo Sessions and transactions Added support for Mongo-like Sessions and Transactions Aug 3, 2024
@oskardudycz oskardudycz marked this pull request as ready for review August 3, 2024 14:05
@oskardudycz oskardudycz merged commit 7a3c2b1 into main Aug 3, 2024
1 check passed
@oskardudycz oskardudycz deleted the sessions_and_transactions_support branch August 3, 2024 14:08
@oskardudycz oskardudycz added this to the 0.9.0 milestone Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Transactions API
1 participant