Documentation
¶
Index ¶
- 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
- type FieldEdgeInfo
- type Language
- type PolymorphicOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
Types ¶
type FieldEdgeInfo ¶
type FieldEdgeInfo struct { Schema string EdgeName string Name string Polymorphic *PolymorphicOptions }
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)
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 Unique bool // is this a unique field vs say an indexed field }
Click to show internal directories.
Click to hide internal directories.