mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 pgsql 索引 B_Tree, Hash, GiST, GIN, SP_GiST, BRIN;
This commit is contained in:
@ -386,7 +386,7 @@ namespace FreeSql.Internal
|
||||
if (!string.IsNullOrEmpty(idxattr.Name) && !string.IsNullOrEmpty(idxattr.Fields))
|
||||
{
|
||||
if (ret.ContainsKey(idxattr.Name)) ret.Remove(idxattr.Name);
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique });
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique, IndexMethod = idxattr.IndexMethod });
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -397,7 +397,7 @@ namespace FreeSql.Internal
|
||||
if (!string.IsNullOrEmpty(idxattr.Name) && !string.IsNullOrEmpty(idxattr.Fields))
|
||||
{
|
||||
if (ret.ContainsKey(idxattr.Name)) ret.Remove(idxattr.Name);
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique });
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique, IndexMethod = idxattr.IndexMethod });
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -410,7 +410,7 @@ namespace FreeSql.Internal
|
||||
if (!string.IsNullOrEmpty(idxattr.Name) && !string.IsNullOrEmpty(idxattr.Fields))
|
||||
{
|
||||
if (ret.ContainsKey(idxattr.Name)) ret.Remove(idxattr.Name);
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique });
|
||||
ret.Add(idxattr.Name, new IndexAttribute(idxattr.Name, idxattr.Fields) { _IsUnique = idxattr._IsUnique, IndexMethod = idxattr.IndexMethod });
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -11,6 +11,7 @@ namespace FreeSql.Internal.Model
|
||||
public string Name { get; set; }
|
||||
public IndexColumnInfo[] Columns { get; set; }
|
||||
public bool IsUnique { get; set; }
|
||||
public IndexMethod IndexMethod { get; set; }
|
||||
}
|
||||
|
||||
public class IndexColumnInfo
|
||||
|
@ -458,7 +458,8 @@ namespace FreeSql.Internal
|
||||
{
|
||||
Name = dbidx.Key,
|
||||
Columns = indexColumns.ToArray(),
|
||||
IsUnique = dbidx.Value.IsUnique
|
||||
IsUnique = dbidx.Value.IsUnique,
|
||||
IndexMethod = IndexMethod.B_Tree
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -493,7 +494,8 @@ namespace FreeSql.Internal
|
||||
{
|
||||
Name = indexName,
|
||||
Columns = indexColumns.ToArray(),
|
||||
IsUnique = index.IsUnique
|
||||
IsUnique = index.IsUnique,
|
||||
IndexMethod = index.IndexMethod
|
||||
});
|
||||
}
|
||||
trytb.Indexes = indexesDict.Values.ToArray();
|
||||
|
Reference in New Issue
Block a user