From 59f79a56f381bfabc0a23862fa5fca28054ebf03 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Fri, 3 Mar 2023 11:36:12 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20Clickhouse=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=86=E8=A1=A8=20where=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/DataAnnotations/TableAttribute.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FreeSql/DataAnnotations/TableAttribute.cs b/FreeSql/DataAnnotations/TableAttribute.cs index 437fc2d8..5f668e90 100644 --- a/FreeSql/DataAnnotations/TableAttribute.cs +++ b/FreeSql/DataAnnotations/TableAttribute.cs @@ -253,7 +253,9 @@ namespace FreeSql.DataAnnotations public string[] GetTableNamesBySqlWhere(string sqlWhere, List dbParams, SelectTableInfo tb, CommonUtils commonUtils) { if (string.IsNullOrWhiteSpace(sqlWhere)) return AllTables; - var quoteParameterName = commonUtils.QuoteParamterName(""); + var quoteParameterName = ""; + if (commonUtils._orm.Ado.DataType == DataType.ClickHouse) quoteParameterName = "@"; //特殊处理 Clickhouse 参数化 + else quoteParameterName = commonUtils.QuoteParamterName(""); var quoteParameterNameCharArray = quoteParameterName.ToCharArray(); var columnName = commonUtils.QuoteSqlName(tb.Table.AsTableColumn.Attribute.Name);