-
Notifications
You must be signed in to change notification settings - Fork 13
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: starts endswith for null values #975
Conversation
@@ -75,15 +75,15 @@ const StandardFunctions = { | |||
* @param {string} y | |||
* @returns {string} | |||
*/ | |||
startswith: (x, y) => `instr(${x},${y}) = 1`, // sqlite instr is 1 indexed | |||
startswith: (x, y) => `coalesce(instr(${x},${y}) = 1,false)`, // sqlite instr is 1 indexed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this covers only SQLite, is this also relevant for other dbs?:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added same for postgres. Not relevant for hana
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Wrap
startswith
andendswith
withcoalesce
to return false when element isNULL
.