mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-20 04:48:16 +08:00
添加ClickHouse数据库支持
This commit is contained in:
@ -157,7 +157,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return this;
|
||||
}
|
||||
|
||||
public string ToSql()
|
||||
public virtual string ToSql()
|
||||
{
|
||||
if (_whereTimes <= 0) return null;
|
||||
var sb = new StringBuilder().Append("DELETE FROM ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append(" WHERE ").Append(_where);
|
||||
|
@ -445,7 +445,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
_set.Append(", ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ");
|
||||
|
||||
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(_params, "u", col, col.Attribute.MapType, val) :
|
||||
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, $"{_commonUtils.QuoteParamterName("p_")}{_params.Count}");
|
||||
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"p_{_params.Count}"));
|
||||
_set.Append(_commonUtils.RewriteColumn(col, colsql));
|
||||
if (_noneParameter == false)
|
||||
_commonUtils.AppendParamter(_params, null, col, col.Attribute.MapType, val);
|
||||
|
@ -54,7 +54,7 @@ namespace FreeSql.Internal
|
||||
public abstract string NowUtc { get; }
|
||||
public abstract string QuoteWriteParamterAdapter(Type type, string paramterName);
|
||||
protected abstract string QuoteReadColumnAdapter(Type type, Type mapType, string columnName);
|
||||
public string RewriteColumn(ColumnInfo col, string sql)
|
||||
public virtual string RewriteColumn(ColumnInfo col, string sql)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(col?.Attribute.RewriteSql) == false)
|
||||
return string.Format(col.Attribute.RewriteSql, sql);
|
||||
|
Reference in New Issue
Block a user