From 04a01c86dfcfc8b57b3191146601df3cacb247b8 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Wed, 13 Sep 2023 11:08:08 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20QuestDb=20And=20Or=20?= =?UTF-8?q?=E4=BC=98=E5=85=88=E7=BA=A7=E8=A7=A3=E6=9E=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/Internal/CommonExpression.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/FreeSql/Internal/CommonExpression.cs b/FreeSql/Internal/CommonExpression.cs index 2471448d..7be3a010 100644 --- a/FreeSql/Internal/CommonExpression.cs +++ b/FreeSql/Internal/CommonExpression.cs @@ -824,6 +824,7 @@ namespace FreeSql.Internal var rightBool = ExpressionLambdaToSql(rightExp, tsc); if (SearchColumnByField(tsc._tables, tsc.currentTable, rightBool) != null) rightBool = $"{rightBool} = {formatSql(true, null, null, null)}"; else rightBool = GetBoolString(rightBool); + if (_common._orm?.Ado?.DataType == DataType.QuestDb) return $"(({leftBool}) {oper} ({rightBool}))"; return $"({leftBool} {oper} {rightBool})"; } return $"({ExpressionLambdaToSql(leftExp, tsc)} {oper} {ExpressionLambdaToSql(rightExp, tsc)})";