- 修复 pgsql DbFirst 未正确获取 Position 值;#1154

This commit is contained in:
2881099 2022-06-09 19:18:51 +08:00
parent 0db2b8f26b
commit 3ea533a648
5 changed files with 5 additions and 10 deletions

View File

@ -258,7 +258,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]);
@ -308,7 +307,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]);

View File

@ -259,7 +259,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]);
@ -309,7 +308,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]);

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]);

View File

@ -381,7 +381,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]);
@ -432,7 +431,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]);

View File

@ -277,7 +277,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]);
@ -327,7 +326,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]);