mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 Oracle Dbfirst 字段可空、和主键判断的 bug;
This commit is contained in:
@ -276,8 +276,8 @@ where a.owner in ({1}) and {0}
|
||||
ds2item[1] = row[1];
|
||||
ds2item[2] = Regex.Replace(string.Concat(row[2]), @"\(\d+\)", "");
|
||||
ds2item[4] = OdbcOracleCodeFirst.GetOracleSqlTypeFullName(new object[] { row[1], row[2], row[3], row[4], row[5], row[6] });
|
||||
ds2item[5] = string.Concat(row[7]) == "1";
|
||||
ds2item[6] = string.Concat(row[8]) == "1";
|
||||
ds2item[5] = string.Concat(row[7]);
|
||||
ds2item[6] = string.Concat(row[8]);
|
||||
ds2item[7] = string.Concat(row[9]);
|
||||
ds2.Add(ds2item);
|
||||
}
|
||||
@ -321,7 +321,7 @@ a.table_owner || '.' || a.table_name,
|
||||
nvl(freesql_long_2_varchar(a.index_name, c.table_name, c.column_position), c.column_name),
|
||||
c.index_name,
|
||||
case when a.uniqueness = 'UNIQUE' then 1 else 0 end,
|
||||
0,
|
||||
case when exists(select 1 from all_constraints where constraint_name = a.index_name and constraint_type = 'P') then 1 else 0 end,
|
||||
0,
|
||||
case when c.descend = 'DESC' then 1 else 0 end,
|
||||
c.column_position
|
||||
@ -331,7 +331,6 @@ where a.index_name = c.index_name
|
||||
and a.table_owner = c.table_owner
|
||||
and a.table_name = c.table_name
|
||||
and a.table_owner in ({1}) and {0}
|
||||
and not exists(select 1 from all_constraints where constraint_name = a.index_name and constraint_type = 'P')
|
||||
", loc8, databaseIn);
|
||||
ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
|
||||
if (ds == null) return loc1;
|
||||
@ -352,6 +351,7 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
|
||||
if (loc3.ContainsKey(table_id) == false || loc3[table_id].ContainsKey(column) == false) continue;
|
||||
var loc9 = loc3[table_id][column];
|
||||
if (loc9.IsPrimary == false && is_primary_key) loc9.IsPrimary = is_primary_key;
|
||||
if (is_primary_key) continue;
|
||||
|
||||
Dictionary<string, DbIndexInfo> loc10 = null;
|
||||
DbIndexInfo loc11 = null;
|
||||
|
Reference in New Issue
Block a user