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

feat: add dialect#normaliseidentifier and dialect#parserelationref #120

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

atzoum
Copy link
Collaborator

@atzoum atzoum commented Jul 3, 2024

Description

  • Introducing Dialect#NormaliseIdentifier: normalises the identifier's parts that are unquoted, typically by lower or upper casing them, depending on the database.
  • Introducing Dialect#ParseRelationRef : parses a string into a RelationRef after normalising the identifier and stripping out surrounding quotes. The result is a RelationRef with case-sensitive fields, i.e. it can be safely re-quoted in full (see [QuoteTable] and, for instance, used for matching against the database's information schema.
  • Deprecating Dialect#FormatTableName due to wrong normalisation behaviour in bigquery and mysql.

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@atzoum atzoum force-pushed the feat.dialectIdentifiers branch 2 times, most recently from 034a1bb to 11f9eb1 Compare July 3, 2024 14:25
@atzoum atzoum force-pushed the feat.dialectIdentifiers branch from 11f9eb1 to 42499ba Compare July 3, 2024 14:37
@atzoum atzoum requested a review from lvrach July 3, 2024 14:37
@atzoum atzoum force-pushed the feat.dialectIdentifiers branch 2 times, most recently from 31f8ac6 to 27d16d3 Compare July 3, 2024 14:57
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 97.43590% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.89%. Comparing base (ec10cc4) to head (098fe92).

Files Patch % Lines
sqlconnect/internal/base/dialect.go 95.91% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   85.60%   85.89%   +0.29%     
==========================================
  Files          75       75              
  Lines        3098     3176      +78     
==========================================
+ Hits         2652     2728      +76     
- Misses        293      295       +2     
  Partials      153      153              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atzoum atzoum marked this pull request as ready for review July 3, 2024 18:23
@atzoum atzoum force-pushed the feat.dialectIdentifiers branch 3 times, most recently from 0f3f6a5 to af772c4 Compare July 5, 2024 12:38
@atzoum atzoum force-pushed the feat.dialectIdentifiers branch 4 times, most recently from 5738ba7 to 098fe92 Compare July 22, 2024 10:29
@atzoum atzoum force-pushed the feat.dialectIdentifiers branch from 098fe92 to ca468c0 Compare July 22, 2024 13:58
@atzoum atzoum merged commit 31d700d into main Jul 22, 2024
16 checks passed
@atzoum atzoum deleted the feat.dialectIdentifiers branch July 22, 2024 14:03
atzoum pushed a commit that referenced this pull request Jul 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.7.0](v1.6.0...v1.7.0)
(2024-07-22)


### Features

* add dialect#normaliseidentifier and dialect#parserelationref
([#120](#120))
([31d700d](31d700d))
* **redshift:** add support for assuming an iam role for redshift
([#132](#132))
([180a706](180a706))
* **redshift:** bump github.com/aws/aws-sdk-go-v2/service/redshiftdata
from 1.27.1 to 1.27.3
([#137](#137))
([ec10cc4](ec10cc4))


### Miscellaneous

* additional params for databricks driver
([#133](#133))
([9c34f3f](9c34f3f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

1 participant