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

Add alias support in typehinted queries #45

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

piercefreeman
Copy link
Owner

@piercefreeman piercefreeman commented Dec 22, 2024

Even when using raw SQL queries with select().text(), users often want to cast the response values into native TableBase instances or raw field values. Previously we only supported TableBases or Field wrappers being passed into select() queries, so there was no way to retrieve a value that wasn't already defined in the python schema.

This PR adds support for specifying aliases within the initial select() query. This uses our standard postprocessing layer to convert from SQL value response columns into our native objects, but allows users to specify any query value that appears within the SQL text.

@piercefreeman piercefreeman merged commit 406cbbc into main Dec 22, 2024
5 checks passed
@piercefreeman piercefreeman deleted the feature/serialize-custom-models branch December 22, 2024 16:08
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.

1 participant