Skip to content

Support type representations in general #398

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 5 commits into from
Apr 1, 2024
Merged

Support type representations in general #398

merged 5 commits into from
Apr 1, 2024

Conversation

plcplc
Copy link
Contributor

@plcplc plcplc commented Apr 1, 2024

What

This PR adds support for type representations for base types and domain types, building on top of the existing support for type representation hinting of enum types.

Note that the wide numeric types default to numeric representation, see the comment in the code. This will be relayed in the user docs in a follow-up PR.

How

The introspection query is seeded with a list of type representations for base types, which it will use to build the final list of represenations for base types, domain types, and enum types.

@plcplc plcplc requested a review from soupi April 1, 2024 12:50
@plcplc plcplc enabled auto-merge April 1, 2024 12:53
Copy link
Contributor

@soupi soupi left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -193,6 +195,103 @@ pub async fn introspect(
})
}

fn base_type_representations() -> database::TypeRepresentations {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a comment saying what this is please.

@plcplc plcplc added this pull request to the merge queue Apr 1, 2024
Merged via the queue into main with commit e6e547b Apr 1, 2024
35 checks passed
@plcplc plcplc deleted the plc/issues/PG-72 branch April 1, 2024 13:54
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