feat: fmt

This commit is contained in:
qqxhb 2022-06-16 20:42:17 +08:00
parent d8f1a70c43
commit 730d65557f
2 changed files with 4 additions and 4 deletions

View File

@ -50,6 +50,7 @@ type ColumnType interface {
Comment() (value string, ok bool) Comment() (value string, ok bool)
DefaultValue() (value string, ok bool) DefaultValue() (value string, ok bool)
} }
type Index interface { type Index interface {
Table() string Table() string
Name() string Name() string

View File

@ -12,12 +12,12 @@ type Index struct {
OptionValue string OptionValue string
} }
// Table returns the table name of the index. // Table return the table name of the index.
func (idx Index) Table() string { func (idx Index) Table() string {
return idx.TableName return idx.TableName
} }
// Name returns the name of the index. // Name return the name of the index.
func (idx Index) Name() string { func (idx Index) Name() string {
return idx.NameValue return idx.NameValue
} }
@ -32,10 +32,9 @@ func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) {
return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid
} }
// Unique reports whether the index is unique or not. // Unique returns whether the index is unique or not.
func (idx Index) Unique() (unique bool, ok bool) { func (idx Index) Unique() (unique bool, ok bool) {
return idx.UniqueValue.Bool, idx.UniqueValue.Valid return idx.UniqueValue.Bool, idx.UniqueValue.Valid
} }
// Option return the optional attribute fo the index // Option return the optional attribute fo the index