adjust internal API

This commit is contained in:
2881099
2020-12-21 21:20:19 +08:00
parent e5452ad43f
commit c9052789f0
66 changed files with 151 additions and 151 deletions

View File

@ -71,8 +71,8 @@ namespace FreeSql.Odbc.Dameng
if (val == null && col.Attribute.IsNullable == false) val = col.CsType == typeof(string) ? "" : Utils.GetDataReaderValue(col.CsType.NullableTypeOrThis(), null);//#384
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col, col.Attribute.MapType, val) :
_commonUtils.QuoteWriteParamter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}"));
sb.Append(_commonUtils.QuoteWriteColumn(col, colsql));
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}"));
sb.Append(_commonUtils.RewriteColumn(col, colsql));
if (_noneParameter == false)
_params[didx * colidx + colidx2] = _commonUtils.AppendParamter(null, $"{col.CsName}_{didx}", col, col.Attribute.MapType, val);
}

View File

@ -33,7 +33,7 @@ namespace FreeSql.Odbc.Dameng
if (_table.Primarys.Length == 1)
{
var pk = _table.Primarys.First();
caseWhen.Append(_commonUtils.QuoteReadColumn(pk, pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
caseWhen.Append(_commonUtils.RereadColumn(pk, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
return;
}
caseWhen.Append("(");
@ -41,7 +41,7 @@ namespace FreeSql.Odbc.Dameng
foreach (var pk in _table.Primarys)
{
if (pkidx > 0) caseWhen.Append(" || '+' || ");
caseWhen.Append(_commonUtils.QuoteReadColumn(pk, pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
caseWhen.Append(_commonUtils.RereadColumn(pk, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
++pkidx;
}
caseWhen.Append(")");

View File

@ -96,7 +96,7 @@ namespace FreeSql.Odbc.Dameng
public override string Now => "systimestamp";
public override string NowUtc => "getutcdate";
public override string QuoteWriteParamter(Type type, string paramterName) => paramterName;
public override string QuoteWriteParamterAdapter(Type type, string paramterName) => paramterName;
protected override string QuoteReadColumnAdapter(Type type, Type mapType, string columnName) => columnName;
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, string specialParamFlag, ColumnInfo col, Type type, object value)