Documentation ¶
Index ¶
- func FieldEdgeInfoEqual(existing, edge *FieldEdgeInfo) bool
- func GetCamelName(s string) string
- func GetFKeyName(tableName string, dbColNames ...string) string
- func GetNameFromParts(nameParts []string) string
- func GetPrimaryKeyName(tableName string, dbColNames ...string) string
- func GetSnakeCaseName(s string) string
- func GetUniqueKeyName(tableName string, dbColNames ...string) string
- func PolymorphicOptionsEqual(existing, p *PolymorphicOptions) 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 GetCamelName ¶
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 GetNameFromParts ¶
func GetPrimaryKeyName ¶
func GetSnakeCaseName ¶
returns name such as tableName or file name
func GetUniqueKeyName ¶
func PolymorphicOptionsEqual ¶ added in v0.0.38
func PolymorphicOptionsEqual(existing, p *PolymorphicOptions) bool
Types ¶
type FieldEdgeInfo ¶
type FieldEdgeInfo struct { Schema string `json:"schema,omitempty"` InverseEdge *input.InverseFieldEdge `json:"inverseEdge,omitempty"` Polymorphic *PolymorphicOptions `json:"polymorphic,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
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.