Skip to content

add support for Transforms in QuerySet.values()/values_list() #59

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

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

timgraham
Copy link
Collaborator

Extracted from #47 with minor edits.

@timgraham timgraham requested a review from WaVEV June 24, 2024 16:58
else:
# column is a Transform in values()/values_list() that needs a
# name for $proj.
target = f"__annotation{annotation_idx}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just changed this. I added an _ between the annotation and the number. But it does not matter, I will keep the one that goes in this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version is consistent with Django's internal aliasing __col{index}.

@timgraham timgraham merged commit 9cfe204 into mongodb:main Jun 24, 2024
3 checks passed
@timgraham timgraham deleted the annotation-in-cols branch June 24, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants