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

Break down analyzeQuery for more generation flexibility #885

Merged
merged 2 commits into from Mar 4, 2024

Conversation

CarsonF
Copy link
Contributor

@CarsonF CarsonF commented Mar 1, 2024

I'm trying to get immutable output types, without duplicating a bunch of this code.

Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -30,4 +30,4 @@ export * from "./reservedKeywords";
// export * from "../syntax/funcops";
// export * from "./syntax";
export * as introspect from "./queries";
export * from "./analyzeQuery";
export { analyzeQuery } from "./analyzeQuery";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this change necessary or are you being defensive here to avoid leaking the new exports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defensive. But I forgot until now that reflection/index isn't exported at top level. So many exporting these functions just to reflection is ok. Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have a strong opinion on this, but I guess it's safest to be restrictive now and add more to the export if we want them in the future, so good to keep what you have here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I adjusted names to better fit a more generalized export/import.

The more I look at this the more I wonder why this is in the driver package and not the generation one...

@CarsonF CarsonF requested a review from scotttrinh March 1, 2024 18:58
Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

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

Dig it. 👍

@scotttrinh scotttrinh merged commit 20fe059 into edgedb:master Mar 4, 2024
7 of 8 checks passed
@CarsonF CarsonF deleted the expose-analyze-parts branch March 4, 2024 16:12
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.

None yet

2 participants