docs: [SQL Server, Oracle] Edit KDocs for Op.TRUE/FALSE #1957
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.
Current KDocs are misleading for the actual behavior of
Op.TRUE
andOp.FALSE
as they make it seem like the objects simply translate to the SQL types fortrue
andfalse
.This is technically correct for databases that support conventional boolean data types, so the objects can be used either as a stand-alone operator or as the left- or right-hand side of any comparison operator.
But for SQL Server and Oracle, which do not support syntax like
WHERE 1
orWHERE TRUE
, the object's logic returns an operator that always evaluates to a boolean, like1 = 1
. So attempting to use these objects as the left- or right-hand side of any comparison operator will cause a syntax error.booleanLiteral()
orbooleanParam()
should be used in these situations.