We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
this is similar to .annotate but slightly different / more manual querying
.annotate
an example from some sentry code:
commit_results = list( Commit.objects.extra( select={"group_id": "sentry_grouplink.group_id"}, tables=["sentry_grouplink"], where=[ "sentry_grouplink.linked_id = sentry_commit.id", "sentry_grouplink.group_id IN ({})".format( ", ".join(str(i.id) for i in resolved_groups) ), "sentry_grouplink.linked_type = %s", "sentry_grouplink.relationship = %s", ], params=[int(GroupLink.LinkedType.commit), int(GroupLink.Relationship.resolves)], ) ) _commit_resolutions = { i.group_id: d for i, d in zip(commit_results, serialize(commit_results, user)) # error here }
would probably be pretty tricky to get the exact types out -- but at the very least I would rather have mypy understand that group_id attribute exists
group_id
The text was updated successfully, but these errors were encountered:
I agree, very cool feature! We can start small: with adding extra attributes that users define in the query with Any as the type.
Any
Sorry, something went wrong.
No branches or pull requests
this is similar to
.annotate
but slightly different / more manual queryingan example from some sentry code:
would probably be pretty tricky to get the exact types out -- but at the very least I would rather have mypy understand that
group_id
attribute existsThe text was updated successfully, but these errors were encountered: