mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
Upgrade xorm to v1.1.0 (#15869)
This commit is contained in:
6
vendor/xorm.io/xorm/schemas/index.go
generated
vendored
6
vendor/xorm.io/xorm/schemas/index.go
generated
vendored
@@ -28,6 +28,7 @@ func NewIndex(name string, indexType int) *Index {
|
||||
return &Index{true, name, indexType, make([]string, 0)}
|
||||
}
|
||||
|
||||
// XName returns the special index name for the table
|
||||
func (index *Index) XName(tableName string) string {
|
||||
if !strings.HasPrefix(index.Name, "UQE_") &&
|
||||
!strings.HasPrefix(index.Name, "IDX_") {
|
||||
@@ -43,11 +44,10 @@ func (index *Index) XName(tableName string) string {
|
||||
|
||||
// AddColumn add columns which will be composite index
|
||||
func (index *Index) AddColumn(cols ...string) {
|
||||
for _, col := range cols {
|
||||
index.Cols = append(index.Cols, col)
|
||||
}
|
||||
index.Cols = append(index.Cols, cols...)
|
||||
}
|
||||
|
||||
// Equal return true if the two Index is equal
|
||||
func (index *Index) Equal(dst *Index) bool {
|
||||
if index.Type != dst.Type {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user