mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 扩展 内部方法 QuoteReadColumn
This commit is contained in:
@ -28,7 +28,8 @@ namespace FreeSql.Odbc.Default
|
||||
{
|
||||
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("(");
|
||||
@ -36,7 +37,7 @@ namespace FreeSql.Odbc.Default
|
||||
foreach (var pk in _table.Primarys)
|
||||
{
|
||||
if (pkidx > 0) caseWhen.Append(", ");
|
||||
caseWhen.Append(_utils.Adapter.CastSql(_commonUtils.QuoteReadColumn(_table.Primarys.First().Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)), _utils.Adapter.MappingOdbcTypeVarChar));
|
||||
caseWhen.Append(_utils.Adapter.CastSql(_commonUtils.QuoteReadColumn(pk.CsType, pk.Attribute.MapType, _commonUtils.QuoteSqlName(pk.Attribute.Name)), _utils.Adapter.MappingOdbcTypeVarChar));
|
||||
++pkidx;
|
||||
}
|
||||
caseWhen.Append(")");
|
||||
|
@ -64,7 +64,7 @@ namespace FreeSql.Odbc.Default
|
||||
public override string NowUtc => Adapter.LambdaDateTime_UtcNow;
|
||||
|
||||
public override string QuoteWriteParamter(Type type, string paramterName) => paramterName;
|
||||
public override string QuoteReadColumn(Type type, string columnName) => Adapter.FieldSql(type, columnName);
|
||||
public override string QuoteReadColumn(Type type, Type mapType, string columnName) => Adapter.FieldSql(type, columnName);
|
||||
|
||||
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, Type type, object value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user