- 扩展 内部方法 QuoteReadColumn

This commit is contained in:
28810
2020-01-06 18:50:38 +08:00
parent f7205b0414
commit bbba06a343
46 changed files with 140 additions and 167 deletions

View File

@ -31,7 +31,8 @@ namespace FreeSql.Oracle.Curd
{
if (_table.Primarys.Length == 1)
{
caseWhen.Append(_commonUtils.QuoteReadColumn(_table.Primarys.First().Attribute.MapType, _commonUtils.QuoteSqlName(_table.Primarys.First().Attribute.Name)));
var pk = _table.Primarys.First();
caseWhen.Append(_commonUtils.QuoteReadColumn(pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
return;
}
caseWhen.Append("(");
@ -39,7 +40,7 @@ namespace FreeSql.Oracle.Curd
foreach (var pk in _table.Primarys)
{
if (pkidx > 0) caseWhen.Append(" || ");
caseWhen.Append(_commonUtils.QuoteReadColumn(pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
caseWhen.Append(_commonUtils.QuoteReadColumn(pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
++pkidx;
}
caseWhen.Append(")");

View File

@ -86,7 +86,7 @@ namespace FreeSql.Oracle
public override string NowUtc => "sys_extract_utc(systimestamp)";
public override string QuoteWriteParamter(Type type, string paramterName) => paramterName;
public override string QuoteReadColumn(Type type, string columnName) => columnName;
public override string QuoteReadColumn(Type type, Type mapType, string columnName) => columnName;
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, Type type, object value)
{