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

Use 'modern' query for all sqlalchemy datastores #1007

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Use 'modern' query for all sqlalchemy datastores #1007

merged 1 commit into from
Jul 10, 2024

Conversation

jwag956
Copy link
Collaborator

@jwag956 jwag956 commented Jul 10, 2024

Stop using the model.query and convert to select(xx).where(yy) as recommended in sqlalchemy 2. All 3 sqlalchemy based datastores now share a common implementation.

the sqlalchemy_session datastore tests now use the new sqla models.

Update docs to note that using FsModels.sqla requires pythin 3.10 or higher.

To simplify code - the find_user() method now takes a single kwarg (attribute:value) for selecting - that is all FS ever used so supporting multiple added complexity.

Added a new low-level way to capture queries during unit tests - converted all tests to use that.

Stop using the model.query and convert to select(xx).where(yy) as recommended in sqlalchemy 2.
All 3 sqlalchemy based datastores now share a common implementation.

the sqlalchemy_session datastore tests now use the new sqla models.

Update docs to note that using FsModels.sqla requires pythin 3.10 or higher.

To simplify code - the find_user() method now takes a single kwarg (attribute:value) for selecting - that is all FS ever used so supporting multiple added complexity.

Added a new low-level way to capture queries during unit tests - converted all tests to use that.
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.40%. Comparing base (5744f9d) to head (361dec8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1007      +/-   ##
==========================================
- Coverage   98.49%   98.40%   -0.10%     
==========================================
  Files          37       37              
  Lines        4783     4755      -28     
==========================================
- Hits         4711     4679      -32     
- Misses         72       76       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jwag956 jwag956 merged commit 394e86c into master Jul 10, 2024
19 checks passed
@jwag956 jwag956 deleted the sql3 branch July 10, 2024 17:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant