Add async SQLAlchemy backend support with union type dispatch #14
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.
Extend the database layer to support async SQLAlchemy sessions alongside
existing sync sessions. Every public activity tracker function now accepts
both Session and AsyncSession via overloaded signatures with isinstance
detection — pass an AsyncSession and the call returns an awaitable
coroutine, pass a Session (or None) and it executes synchronously as
before. The public API names are unchanged.
Key changes:
aliases, set_global_async_session/get_global_async_session helpers
aget_list, aget_pending_ids, aget_active_count) using selectinload for
relationship access
cancel_pending, list, detail, count_active for sync/async dispatch
https://claude.ai/code/session_011TEKqVAGZi4xhkB5Fqqujv