Skip to content

Fix sql-query escape character #5232

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

Merged
merged 1 commit into from
Apr 15, 2025
Merged

Fix sql-query escape character #5232

merged 1 commit into from
Apr 15, 2025

Conversation

acquamarin
Copy link
Collaborator

SQL based database uses single quote ' as the escape character while cypher based databases use \ as the escape character. We have to manually escape all ' in the user's input query.

@acquamarin acquamarin requested a review from andyfengHKU April 15, 2025 04:56
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.02%. Comparing base (febb450) to head (0a5b2da).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5232      +/-   ##
==========================================
- Coverage   87.03%   87.02%   -0.01%     
==========================================
  Files        1411     1411              
  Lines       61893    61893              
  Branches     7579     7574       -5     
==========================================
- Hits        53866    53864       -2     
- Misses       7854     7856       +2     
  Partials      173      173              

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

Benchmark Result

Master commit hash: dbdc2f0939a8b6a6b9144e80e587d20c12d65b7d
Branch commit hash: 171c2a8c4b82bd59929f30b8efc4c2438f536fcb

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 744.25 740.26 4.00 (0.54%)
aggregation q28 6721.79 6706.97 14.82 (0.22%)
copy node-Comment 84365.59 N/A N/A
copy node-Forum 5774.11 N/A N/A
copy node-Organisation 1348.93 N/A N/A
copy node-Person 2117.79 N/A N/A
copy node-Place 1263.19 N/A N/A
copy node-Post 34713.35 N/A N/A
copy node-Tag 1321.76 N/A N/A
copy node-Tagclass 1227.75 N/A N/A
copy rel-comment-hasCreator 89357.81 N/A N/A
copy rel-comment-hasTag 85439.31 N/A N/A
copy rel-comment-isLocatedIn 67031.67 N/A N/A
copy rel-containerOf 15820.69 N/A N/A
copy rel-forum-hasTag 4011.94 N/A N/A
copy rel-hasInterest 3874.14 N/A N/A
copy rel-hasMember 78201.66 N/A N/A
copy rel-hasModerator 1470.01 N/A N/A
copy rel-hasType 377.38 N/A N/A
copy rel-isPartOf 340.63 N/A N/A
copy rel-isSubclassOf 365.03 N/A N/A
copy rel-knows 13468.64 N/A N/A
copy rel-likes-comment 119960.69 N/A N/A
copy rel-likes-post 60762.24 N/A N/A
copy rel-organisation-isLocatedIn 441.80 N/A N/A
copy rel-person-isLocatedIn 514.04 N/A N/A
copy rel-post-hasCreator 18587.91 N/A N/A
copy rel-post-hasTag 23886.82 N/A N/A
copy rel-post-isLocatedIn 18641.34 N/A N/A
copy rel-replyOf-comment 61979.79 N/A N/A
copy rel-replyOf-post 44508.02 N/A N/A
copy rel-studyAt 606.47 N/A N/A
copy rel-workAt 815.63 N/A N/A
filter q14 138.88 144.26 -5.38 (-3.73%)
filter q15 153.14 141.14 12.00 (8.50%)
filter q16 365.28 359.64 5.64 (1.57%)
filter q17 547.47 463.64 83.83 (18.08%)
filter q18 2144.25 1895.78 248.47 (13.11%)
filter zonemap-node 100.41 97.37 3.05 (3.13%)
filter zonemap-node-lhs-cast 110.13 97.21 12.93 (13.30%)
filter zonemap-node-null 109.71 97.34 12.37 (12.71%)
filter zonemap-rel 6018.27 5547.24 471.03 (8.49%)
fixed_size_expr_evaluator q07 952.52 695.27 257.25 (37.00%)
fixed_size_expr_evaluator q08 1346.09 974.69 371.40 (38.10%)
fixed_size_expr_evaluator q09 1345.35 975.99 369.35 (37.84%)
fixed_size_expr_evaluator q10 347.49 270.97 76.52 (28.24%)
fixed_size_expr_evaluator q11 348.69 271.40 77.29 (28.48%)
fixed_size_expr_evaluator q12 296.39 249.25 47.14 (18.91%)
fixed_size_expr_evaluator q13 1929.90 1583.24 346.66 (21.90%)
fixed_size_seq_scan q23 119.91 125.75 -5.84 (-4.64%)
join q29 780.65 707.98 72.67 (10.26%)
join q30 1686.91 1513.12 173.79 (11.49%)
join q31 5.94 5.36 0.58 (10.83%)
join SelectiveTwoHopJoin 58.77 46.90 11.87 (25.30%)
ldbc_snb_ic q35 9.95 10.17 -0.21 (-2.10%)
ldbc_snb_ic q36 82.36 98.81 -16.46 (-16.66%)
ldbc_snb_is q32 4.81 3.73 1.08 (28.92%)
ldbc_snb_is q33 15.63 16.11 -0.48 (-2.98%)
ldbc_snb_is q34 1.28 1.13 0.15 (13.16%)
limit push-down-limit-into-distinct 1625.93 N/A N/A
multi-rel multi-rel-large-scan 1826.22 1697.56 128.66 (7.58%)
multi-rel multi-rel-lookup 11.84 11.97 -0.13 (-1.06%)
multi-rel multi-rel-small-scan 213.58 206.92 6.65 (3.21%)
order_by q25 146.28 151.05 -4.77 (-3.16%)
order_by q26 459.20 468.27 -9.08 (-1.94%)
order_by q27 1396.64 1403.62 -6.98 (-0.50%)
recursive_join recursive-join-bidirection 329.56 297.74 31.82 (10.69%)
recursive_join recursive-join-dense 6952.70 7017.64 -64.94 (-0.93%)
recursive_join recursive-join-path 23305.90 23316.38 -10.48 (-0.04%)
recursive_join recursive-join-sparse 634.41 632.49 1.93 (0.30%)
recursive_join recursive-join-trail 6976.56 6957.02 19.54 (0.28%)
scan_after_filter q01 178.03 188.46 -10.43 (-5.53%)
scan_after_filter q02 163.49 173.80 -10.31 (-5.93%)
shortest_path_ldbc100 q37 92.02 99.07 -7.05 (-7.12%)
shortest_path_ldbc100 q38 312.83 344.52 -31.69 (-9.20%)
shortest_path_ldbc100 q39 70.24 65.73 4.51 (6.86%)
shortest_path_ldbc100 q40 346.21 368.46 -22.25 (-6.04%)
var_size_expr_evaluator q03 2190.01 2118.96 71.04 (3.35%)
var_size_expr_evaluator q04 2312.88 2215.26 97.63 (4.41%)
var_size_expr_evaluator q05 2717.17 2652.00 65.17 (2.46%)
var_size_expr_evaluator q06 1396.57 1387.46 9.11 (0.66%)
var_size_seq_scan q19 1490.22 1453.85 36.37 (2.50%)
var_size_seq_scan q20 2770.59 2569.27 201.32 (7.84%)
var_size_seq_scan q21 2345.08 2371.88 -26.79 (-1.13%)
var_size_seq_scan q22 132.26 131.28 0.99 (0.75%)

@acquamarin acquamarin merged commit 59b2e9e into master Apr 15, 2025
28 checks passed
@acquamarin acquamarin deleted the fix-escape-sql-query branch April 15, 2025 06:13
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