Source File
relation.go
Belonging Package
github.com/go-pg/pg/v10/orm
package orm
import (
)
const (
InvalidRelation = iota
HasOneRelation
BelongsToRelation
HasManyRelation
Many2ManyRelation
)
type Relation struct {
Type int
Field *Field
JoinTable *Table
BaseFKs []*Field
JoinFKs []*Field
Polymorphic *Field
M2MTableName types.Safe
M2MTableAlias types.Safe
M2MBaseFKs []string
M2MJoinFKs []string
}
func ( *Relation) () string {
return fmt.Sprintf("relation=%s", .Field.GoName)
}
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)