fix: 🐛 Raw db session requirement if tenant id is passed #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates dependencies and enhances the database session factory methods to support a new
raw_dboption. This option allows bypassing the tenant ID when creating database sessions, which can be useful for system-level operations or migrations. The changes also include a version bump for the package.Dependency updates:
.pre-commit-config.yaml: Upgradedpre-commit-hooksfrom v5.0.0 to v6.0.0 andruff-pre-commitfrom v0.11.0 to v0.14.4 for improved linting and formatting support.Database session management improvements:
sql_db_utils/session_management.py: Added araw_dbparameter toget_db_factory, allowing the factory to yield sessions without a tenant ID whenraw_db=True.sql_db_utils/asyncio/session_management.py: Similarly added araw_dbparameter to the async version ofget_db_factory, enabling tenant-less session creation.Version update:
sql_db_utils/__version__.py: Bumped the package version from1.3.1to1.3.2to reflect these changes.