feat: Add NULLIF() implementation#1676
Open
bakasmarius wants to merge 19 commits intokysely-org:masterfrom
Open
feat: Add NULLIF() implementation#1676bakasmarius wants to merge 19 commits intokysely-org:masterfrom
NULLIF() implementation#1676bakasmarius wants to merge 19 commits intokysely-org:masterfrom
Conversation
# Conflicts: # src/expression/expression-builder.ts # src/operation-node/operation-node-transformer.ts # src/operation-node/operation-node-visitor.ts # src/query-compiler/default-query-compiler.ts
|
@bakasmarius is attempting to deploy a commit to the Kysely Team Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
Contributor
aymenhmaidiwastaken
left a comment
There was a problem hiding this comment.
Small nit: the rest of the codebase uses const/let exclusively. These var declarations should be const since they're never reassigned.
| expr1: T, | ||
| expr2: number | boolean | string | null, | ||
| ): ExpressionWrapper<DB, TB, T | null> { | ||
| var v1 = |
Contributor
There was a problem hiding this comment.
Suggested change
| var v1 = | |
| const v1 = |
| : isSafeImmediateValue(expr1) | ||
| ? parseSafeImmediateValue(expr1) | ||
| : parseReferenceExpression(expr1) | ||
| var v2 = |
Contributor
There was a problem hiding this comment.
Suggested change
| var v2 = | |
| const v2 = |
Author
There was a problem hiding this comment.
I wonder how I missed that 😄
@igalklebanov maybe add some lint rules for that?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1429.
Sorry it took longer than I expected, it wasn't as easy to implement as I initially thought 😅
Any comments with suggestions to edit/rename/refactor/test/etc are welcome 😉