Documentation
¶
Index ¶
- type Column
- type Index
- func (i Index) Asc(field string) IndexOperations
- func (i Index) Desc(field string) IndexOperations
- func (i Index) GetColumns() []Column
- func (i Index) GetFields() []string
- func (i Index) GetName() string
- func (i Index) GetType() Type
- func (Index) Index()
- func (i Index) IsUnique() bool
- func (i Index) Name(name string) IndexOperations
- func (i Index) Unique() IndexOperations
- type IndexBuilder
- type IndexOperations
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column is a single indexed column together with its sort direction.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (Index) Asc ¶
func (i Index) Asc(field string) IndexOperations
Asc appends a column sorted ascending.
func (Index) Desc ¶
func (i Index) Desc(field string) IndexOperations
Desc appends a column sorted descending.
func (Index) GetColumns ¶
func (Index) Name ¶
func (i Index) Name(name string) IndexOperations
Name overrides the auto-generated index name.
func (Index) Unique ¶
func (i Index) Unique() IndexOperations
Unique turns the index into a unique constraint.
type IndexBuilder ¶
type IndexBuilder interface {
Index()
}
func Primary ¶
func Primary(fields ...string) IndexBuilder
type IndexOperations ¶
type IndexOperations interface {
IndexBuilder
Unique() IndexOperations
// Name overrides the auto-generated index name
Name(name string) IndexOperations
Asc(field string) IndexOperations
Desc(field string) IndexOperations
}
IndexOperations exposes the fluent modifiers available on a Fields() index.
func Fields ¶
func Fields(fields ...string) IndexOperations
Click to show internal directories.
Click to hide internal directories.