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

Support edgeql files with snake_case #661

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

scotttrinh
Copy link
Collaborator

@scotttrinh scotttrinh commented Jun 20, 2023

The Python codegen expects snake_case, which kinda makes sense as a standard to adopt for EdgeQL related identifiers, so this adds support for _ as a word separator.

NOTE: This is strictly speaking a breaking change since if you had snake case names before you were importing foo_query and now it'll be fooQuery, but I'm hoping this is ok to break for better alignment with multi-language repos.

I'm going to leave this PR open for a bit and gather some feedback about the breaking nature of this: we can wait for a major version bump if this is disruptive!

Before:

edgeql function name type name
foo_query foo_query Foo_queryReturns
FooQuery FooQuery FooQueryReturns
Foo_Query FooQuery FooQueryReturns

After:

edgeql function name type name
foo_query fooQuery FooQueryReturns
FooQuery fooQuery FooQueryReturns
Foo_Query fooQuery FooQueryReturns

Closes #655

@scotttrinh scotttrinh requested a review from jaclarke June 20, 2023 21:06
@scotttrinh scotttrinh force-pushed the 655-support-snake-edgeql branch from eef1c2d to 3d2d63a Compare December 1, 2023 16:23
@scotttrinh scotttrinh merged commit 4c428e7 into master Dec 1, 2023
@scotttrinh scotttrinh deleted the 655-support-snake-edgeql branch December 1, 2023 17:10
scotttrinh added a commit that referenced this pull request Apr 15, 2024
This reverts commit 4c428e7.

This change was too breaking in the form we introduced here, so revert
and follow up with a better way to map filenames to function names.
scotttrinh added a commit that referenced this pull request Apr 15, 2024
This reverts commit 4c428e7.

This change was too breaking in the form we introduced here, so revert
and follow up with a better way to map filenames to function names.
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.

Queries generator should rename snake_case to camelCase
1 participant