Source File
index.go
Belonging Package
gorm.io/gorm/migrator
package migrator
import
// Index implements gorm.Index interface
type Index struct {
TableName string
NameValue string
ColumnList []string
PrimaryKeyValue sql.NullBool
UniqueValue sql.NullBool
OptionValue string
}
// Table return the table name of the index.
func ( Index) () string {
return .TableName
}
// Name return the name of the index.
func ( Index) () string {
return .NameValue
}
// Columns return the columns of the index
func ( Index) () []string {
return .ColumnList
}
// PrimaryKey returns the index is primary key or not.
func ( Index) () ( bool, bool) {
return .PrimaryKeyValue.Bool, .PrimaryKeyValue.Valid
}
// Unique returns whether the index is unique or not.
func ( Index) () ( bool, bool) {
return .UniqueValue.Bool, .UniqueValue.Valid
}
// Option return the optional attribute of the index
func ( Index) () string {
return .OptionValue
}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |