Skip to content

fix LIKE ESCAPE with backslash - #2568

Open
AaryavGangrade wants to merge 1 commit into
AlaSQL:developfrom
AaryavGangrade:fix-1978-like-escape
Open

AaryavGangrade wants to merge 1 commit into
AlaSQL:developfrom
AaryavGangrade:fix-1978-like-escape

Conversation

@AaryavGangrade

Copy link
Copy Markdown

Thank you for the time you are putting into AlaSQL!

Fixes #1978.

Backslash was not working correctly as the ESCAPE character in LIKE expressions because the escape value could reach utils.like() as a two-character backslash representation.

This change normalizes that representation to a single backslash before processing the LIKE pattern.

Tests

  • Added regression tests in test/test1978.js
  • Verified backslash escaping with alasql.utils.like()
  • Verified the SQL LIKE ... ESCAPE '\\' reproduction from the issue
  • Existing LIKE tests in test/test366.js and test/test369.js pass

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.

ESCAPE character issue

1 participant