Documentation
¶
Index ¶
- func FieldEdgeInfoEqual(existing, edge *FieldEdgeInfo) bool
- func GetFKeyName(tableName string, dbColNames ...string) string
- func GetPrimaryKeyName(tableName string, dbColNames ...string) string
- func GetUniqueKeyName(tableName string, dbColNames ...string) string
- func PolymorphicOptionsEqual(existing, p *PolymorphicOptions) bool
- func TranslateIDSuffix(fieldName string) (string, bool)
- type FieldEdgeInfo
- type Language
- type PolymorphicOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldEdgeInfoEqual ¶ added in v0.0.38
func FieldEdgeInfoEqual(existing, edge *FieldEdgeInfo) bool
func GetFKeyName ¶
generate a name for the foreignkey of the sort contacts_user_id_fkey. It takes the table name, the name of the column that references a foreign column in a foreign table and the fkey keyword to generate this only applies for single column fkeys
func GetPrimaryKeyName ¶
func GetUniqueKeyName ¶
func PolymorphicOptionsEqual ¶ added in v0.0.38
func PolymorphicOptionsEqual(existing, p *PolymorphicOptions) bool
func TranslateIDSuffix ¶ added in v0.1.0
Types ¶
type FieldEdgeInfo ¶
type FieldEdgeInfo struct {
Schema string `json:"schema,omitempty"`
InverseEdge *input.InverseFieldEdge `json:"inverseEdge,omitempty"`
Polymorphic *PolymorphicOptions `json:"polymorphic,omitempty"`
IndexEdge *input.IndexEdgeOptions `json:"indexEdge,omitempty"`
EdgeConstName string `json:"edgeConstName,omitempty"`
}
common things needed across edges/fields etc only allowed to import input
func NewFieldEdgeInfo ¶
func NewFieldEdgeInfo(fieldName string, polymorphic *input.PolymorphicOptions, unique bool) (*FieldEdgeInfo, error)
func (*FieldEdgeInfo) EdgeName ¶
func (f *FieldEdgeInfo) EdgeName() string
func (*FieldEdgeInfo) GetEdgeConstName ¶ added in v0.1.0
func (f *FieldEdgeInfo) GetEdgeConstName() string
type Language ¶
type Language string
const GoLang Language = "Golang"
GoLang indicates we're generating for golang
const TypeScript Language = "TypeScript"
TypeScript indicates we're generating for TypeScript
type PolymorphicOptions ¶
type PolymorphicOptions struct {
*input.PolymorphicOptions
NodeTypeField string `json:"nodeTypeField,omitempty"`
// is this a unique field vs say an indexed field
Unique bool `json:"unique,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.