Merge branch 'master' of github.com:dotnetcore/FreeSql

This commit is contained in:
igeekfan
2022-06-10 03:06:03 +08:00
30 changed files with 219 additions and 210 deletions

View File

@ -30,7 +30,7 @@ namespace FreeSql.Odbc.PostgreSQL
if (columns != null)
{
var colsList = new List<ColumnInfo>();
var cols = _pgsqlInsert.InternalCommonExpression.ExpressionSelectColumns_MemberAccess_New_NewArrayInit(null, columns?.Body, false, null).ToDictionary(a => a, a => true);
var cols = _pgsqlInsert.InternalCommonExpression.ExpressionSelectColumns_MemberAccess_New_NewArrayInit(null, null, columns?.Body, false, null).ToDictionary(a => a, a => true);
foreach (var col in _pgsqlInsert.InternalTable.Columns.Values)
if (cols.ContainsKey(col.Attribute.Name))
colsList.Add(col);

View File

@ -273,7 +273,6 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
if (ds == null) return loc1;
var position = 0;
foreach (object[] row in ds)
{
var object_id = string.Concat(row[0]);
@ -324,7 +323,7 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
Table = loc2[object_id],
Comment = comment,
DefaultValue = defaultValue,
Position = ++position
Position = attnum
});
loc3[object_id][column].DbType = this.GetDbType(loc3[object_id][column]);
loc3[object_id][column].CsType = this.GetCsTypeInfo(loc3[object_id][column]);