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

Fix a problem with fns returning tuples with Attributes #440

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

Hoverbear
Copy link
Contributor

In #410 we introduced some new sql attribute and functionality related to SQL generation.

As part of this we removed the extern_attr_tokens from pgx-utils::sql_entity_graph::PgExtern.

Changing from:

let attrs = entity_submission.unwrap().extern_attr_tokens();

to:

https://github.com/zombodb/pgx/blob/f653be4acd519827642d59533f06bd309befa608/pgx-macros/src/rewriter.rs#L228-L232

This caused pgx_utils::sql_entity_graph::pg_extern::Attribute::to_tokens to be invoked. Since it did not return what it had parsed, later when it got re-parsed for ToSqlConfig it was revealing entity graph tokens. This functionality has been fixed and these entity graph tokens now come from to_sql_entity_graph_tokens.

@Hoverbear Hoverbear self-assigned this Feb 15, 2022
@Hoverbear Hoverbear merged commit d55c5d1 into develop Feb 16, 2022
@Hoverbear Hoverbear deleted the fix-tuple-attrs branch February 16, 2022 15:41
@Hoverbear Hoverbear mentioned this pull request Feb 16, 2022
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