Skip to content

Fix the escape char #235

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
Mar 31, 2017
Merged

Fix the escape char #235

merged 1 commit into from
Mar 31, 2017

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Mar 30, 2017

Description

The current code fails the tests due to invalid escape chars.

Related issues

  • None

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

@@ -387,13 +387,13 @@ PostgreSQL.prototype.buildExpression = function(columnName, operator,
return new ParameterizedSQL(columnName + " LIKE ? ESCAPE E'\\\\'",
[operatorValue]);
case 'ilike':
return new ParameterizedSQL(columnName + " ILIKE ? ESCAPE '\\'",
return new ParameterizedSQL(columnName + " ILIKE ? ESCAPE '\\\\'",
Copy link
Contributor

@jannyHou jannyHou Mar 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" LIKE ? ESCAPE E'\\\\'" the case above has an extra E before 4 back-slash, should it be added here as well? The change LGTM while CI fails a lot.

And the transaction test fails due to 2876a95
we can fix that test case in this pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added E to make it consistent

@raymondfeng raymondfeng force-pushed the feature/fix-ilike-escape branch from bd62d4e to 59b1c10 Compare March 31, 2017 15:31
Copy link
Contributor

@jannyHou jannyHou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raymondfeng raymondfeng merged commit 2ab4e93 into master Mar 31, 2017
@raymondfeng raymondfeng deleted the feature/fix-ilike-escape branch March 31, 2017 15:39
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.

3 participants