Skip to content

Conversation

ting-lan-wang
Copy link
Contributor

Incorporate the changes from joboon-CaseInsensitiveFieldMatching.

And here's the description copied from the email:

In tandem with skipping quotes on identifiers, we’ve discovered a way to get the dialector to do a pseudo-case-insensitive match on returned unquoted columns/tables from Oracle (which are all uppercase) to struct fields which may not necessarily be all uppercased. This helps us maintain parity between SQL calls we make in postgres with Oracle, without relying on quoting everything (and breaking existing unquoted ad-hoc SQL statements). This solution leverages the db.Statement.ColumnMapping feature in gorm. I think it is a pretty simple solution that makes sense to be used in all situations where one wishes to skip quoting to give the illusion of case insensitivity.

This PR also updates config_test.go to verify the 'skipping quotes' option through an actual insertion instead of just comparing the generated SQL.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 19, 2025
@ting-lan-wang ting-lan-wang merged commit b6b7f5e into main Sep 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants