- 增加 IUpdate.ExecuteUpdated 指定字段返回;

This commit is contained in:
2881099
2023-12-10 23:55:04 +08:00
parent 7ed542d859
commit 543ce4f513
19 changed files with 203 additions and 72 deletions

View File

@ -59,7 +59,8 @@ namespace FreeSql.Odbc.PostgreSQL
Exception exception = null;
try
{
var rettmp = _orm.Ado.Query<TReturn>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms);
var queryType = typeof(TReturn) == typeof(T1) ? (_table.TypeLazy ?? _table.Type) : null;
var rettmp = _orm.Ado.Query<TReturn>(queryType, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms);
ValidateVersionAndThrow(rettmp.Count, sql, dbParms);
ret.AddRange(rettmp);
}
@ -164,7 +165,8 @@ namespace FreeSql.Odbc.PostgreSQL
Exception exception = null;
try
{
var rettmp = await _orm.Ado.QueryAsync<TReturn>(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken);
var queryType = typeof(TReturn) == typeof(T1) ? (_table.TypeLazy ?? _table.Type) : null;
var rettmp = await _orm.Ado.QueryAsync<TReturn>(queryType, _connection, _transaction, CommandType.Text, sql, _commandTimeout, dbParms, cancellationToken);
ValidateVersionAndThrow(rettmp.Count, sql, dbParms);
ret.AddRange(rettmp);
}