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
feat: repository enhancements and MySQL SQLAlchemy support #1345
Conversation
Since these database backed tests are quite slow, can we maybe add a pytest marker to skip them? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we run the DB tests only on main? or maybe using a schedule (github action cron basically).
Hmm. I think we generally do want to run those in our CI and locally (maybe optionally). It's not like they take ages to run (the asyncpg tests take 5 seconds once the container is set up). That's not too bad on its own, but if we start adding many other dbs, it will somewhat add up. For me, just having a marker to be able to skip them if I want would be good enough. For the CI, it definitely doesn't matter since we have steps that take significantly longer than our whole test suite. |
ok |
@cofin is this currently blocked by something? |
No, it's not blocked by anything, and I need to wrap this up. Based on the last status, I need to add the Pytest marker and merge the latest changes. |
Okay, cool, just checking in! |
- rename `base_select` to `statement` and swap order - add `OrderBy` FilterType - add `match_fields` to `get_or_create` so that you can search for a model with a limited set of values from your `kwargs` instead of all fields - add `SearchFilter` FilterType to append a `where field like `%..%` filter type.
I've been having issues with the |
I've excluded these mysql tests by default. I can do the same with the |
asyncmy
asyncmy
tests
I.e., exclude from the general CI tests? |
asyncmy
tests
This PR adds the following additional features:
asyncmy
drivers.Service
andDTO
patterns have been mergedget_or_create
optionally accepts amatch_fields
argument. This lets you lookup a model using a subset of thekwargs
you've provided. If the remainingkwargs
are different from the retrieved model's stored values, an update is performed.OrderBy
andSearchFilter
filter types.OrderBy
appends theORDER BY
clause to a statement andSearchFilter
addsWHERE LIKE ..
clause. It optionally has a case insensitive override.base_select
tostatement
.PR Checklist
CONTRIBUTING.rst
?