mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 增加 Column 特性 RereadSql 重读功能;
This commit is contained in:
@ -37,7 +37,7 @@ namespace FreeSql.MsAccess.Curd
|
||||
if (_table.Primarys.Length == 1)
|
||||
{
|
||||
var pk = _table.Primarys.First();
|
||||
caseWhen.Append(_commonUtils.QuoteReadColumn(pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
|
||||
caseWhen.Append(_commonUtils.QuoteReadColumn(pk, pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)));
|
||||
return;
|
||||
}
|
||||
caseWhen.Append("(");
|
||||
@ -45,7 +45,7 @@ namespace FreeSql.MsAccess.Curd
|
||||
foreach (var pk in _table.Primarys)
|
||||
{
|
||||
if (pkidx > 0) caseWhen.Append(" + '+' + ");
|
||||
caseWhen.Append(MsAccessUtils.GetCastSql(_commonUtils.QuoteReadColumn(pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)), typeof(string)));
|
||||
caseWhen.Append(MsAccessUtils.GetCastSql(_commonUtils.QuoteReadColumn(pk, pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)), typeof(string)));
|
||||
++pkidx;
|
||||
}
|
||||
caseWhen.Append(")");
|
||||
|
@ -78,7 +78,7 @@ namespace FreeSql.MsAccess
|
||||
public override string NowUtc => "now()";
|
||||
|
||||
public override string QuoteWriteParamter(Type type, string paramterName) => paramterName;
|
||||
public override string QuoteReadColumn(Type type, Type mapType, string columnName) => columnName;
|
||||
protected override string QuoteReadColumnAdapter(Type type, Type mapType, string columnName) => columnName;
|
||||
public override string FieldAsAlias(string alias) => $" as {alias}";
|
||||
public override string IIF(string test, string ifTrue, string ifElse) => $"iif({test}, {ifTrue}, {ifElse})";
|
||||
|
||||
|
Reference in New Issue
Block a user