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 SqlServer snake case - OUTPUT i_n_s_e_r_t_e_d.id #1867

Merged
merged 8 commits into from Jun 22, 2020

Conversation

juliano
Copy link
Collaborator

@juliano juliano commented May 25, 2020

Fixes #1768

Problem

Insert returning on MS SQL Server in SnakeCase mode returns OUTPUT i_n_s_e_r_t_e_d.id

Solution

This PR introduces ExternalIdent.Opinionated, which allows us to define if that should be Renameable or not. It is used in SqlIdiom to identify the opinion and generate the token accordingly. With this change, I could remove the workaround in ExpandingReturning that would return an Ident instead of ExternalIdent

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

@juliano juliano changed the title Fix snake case Fix SqlServer snake case - OUTPUT i_n_s_e_r_t_e_d.id May 25, 2020
@deusaquilus deusaquilus merged commit d3ec6c2 into zio:master Jun 22, 2020
1 check passed
@juliano juliano deleted the fix-snake-case branch Jun 22, 2020
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