Skip to content

fix(prestodb-driver): use standard SQL escaping for single quotes#11171

Open
benyaminsalimi wants to merge 2 commits into
cube-js:masterfrom
benyaminsalimi:fix/presto-escaping-issue-10545
Open

fix(prestodb-driver): use standard SQL escaping for single quotes#11171
benyaminsalimi wants to merge 2 commits into
cube-js:masterfrom
benyaminsalimi:fix/presto-escaping-issue-10545

Conversation

@benyaminsalimi

Copy link
Copy Markdown
Contributor

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

Resolves #10545

Description of Changes Made (if issue reference is not provided)

PrestoDriver.prepareQueryWithParams uses standard SQL escaping for single quotes (doubling single quotes) instead of MySQL-style backslash escaping, since Presto and Trino do not use backslashes to escape characters inside standard string literals.

@benyaminsalimi
benyaminsalimi requested a review from a team as a code owner June 26, 2026 22:41
@github-actions github-actions Bot added driver:prestodb Issues relating to the PrestoDB driver javascript Pull requests that update Javascript code data source driver pr:community Contribution from Cube.js community members. labels Jun 26, 2026
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.84%. Comparing base (c7db3fc) to head (860a814).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11171      +/-   ##
==========================================
+ Coverage   59.44%   59.84%   +0.40%     
==========================================
  Files         216      210       -6     
  Lines       17474    17071     -403     
  Branches     3539     3443      -96     
==========================================
- Hits        10387    10216     -171     
+ Misses       6581     6362     -219     
+ Partials      506      493      -13     
Flag Coverage Δ
cube-backend 59.84% <100.00%> (+0.40%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data source driver driver:prestodb Issues relating to the PrestoDB driver javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PrestoDriver.prepareQueryWithParams uses MySQL-style escaping, breaks Trino/Presto with single quotes

1 participant