mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 Clickhouse 自动分表 where 条件分析问题;
This commit is contained in:
parent
8b5b23202c
commit
59f79a56f3
@ -253,7 +253,9 @@ namespace FreeSql.DataAnnotations
|
|||||||
public string[] GetTableNamesBySqlWhere(string sqlWhere, List<DbParameter> dbParams, SelectTableInfo tb, CommonUtils commonUtils)
|
public string[] GetTableNamesBySqlWhere(string sqlWhere, List<DbParameter> dbParams, SelectTableInfo tb, CommonUtils commonUtils)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(sqlWhere)) return AllTables;
|
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 quoteParameterNameCharArray = quoteParameterName.ToCharArray();
|
||||||
var columnName = commonUtils.QuoteSqlName(tb.Table.AsTableColumn.Attribute.Name);
|
var columnName = commonUtils.QuoteSqlName(tb.Table.AsTableColumn.Attribute.Name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user