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: split statement did not correctly parse escaped quotes #152

Merged
merged 5 commits into from
May 23, 2022

Conversation

olavloite
Copy link
Collaborator

Splitting multiple statements in a single SQL string did not handle escaped quotes correctly. PostgreSQL uses double quotes to escape a quote inside of a quoted string. That is;

select '''' will produce a string containing one single quote.

select """Test""" from foo will select the column named "Test" (case-sensitive).

@codecov
Copy link

codecov bot commented May 14, 2022

Codecov Report

❗ No coverage uploaded for pull request base (postgresql-dialect@7d0aef6). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head bfc7818 differs from pull request most recent head 2e5bdbc. Consider uploading reports for the commit 2e5bdbc to get more accurate results

@@                  Coverage Diff                  @@
##             postgresql-dialect     #152   +/-   ##
=====================================================
  Coverage                      ?   71.14%           
  Complexity                    ?      771           
=====================================================
  Files                         ?       82           
  Lines                         ?     2897           
  Branches                      ?      306           
=====================================================
  Hits                          ?     2061           
  Misses                        ?      707           
  Partials                      ?      129           
Flag Coverage Δ
unittests 71.14% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d0aef6...2e5bdbc. Read the comment docs.

@olavloite olavloite merged commit cfbec96 into postgresql-dialect May 23, 2022
@olavloite olavloite deleted the fix-split-statement branch May 23, 2022 18:59
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