Documentation ¶
Index ¶
- func AssocEdgeEqual(existingEdge, edge *AssociationEdge) bool
- func AssocEdgeGroupEqual(g1, g2 *AssociationEdgeGroup) bool
- func AssocEdgesEqual(l1, l2 []*AssociationEdge) bool
- func CompareAssocEdgesMap(m1, m2 map[string]*AssociationEdge, opts ...change.CompareOption) []change.Change
- func CompareAssociationEdge(existingEdge, edge *AssociationEdge) []change.Change
- func CompareEdgeInfo(e1, e2 *EdgeInfo, opts ...change.CompareOption) []change.Change
- func CompareFieldEdge(existingEdge, edge *FieldEdge) []change.Change
- func CompareForeignKeyEdge(existingEdge, edge *ForeignKeyEdge) []change.Change
- func CompareIndexedEdge(existingEdge, edge *IndexedEdge) []change.Change
- func ForceEdgePolymorphic() func(*opts)
- func GetCommonEdgeInfoForTest(edgeName string, entConfig *EntConfigInfo) commonEdgeInfo
- func TsEdgeConst(constName string) (string, error)
- type ActionableEdge
- type AssociationEdge
- func (e *AssociationEdge) AddInverseEdge(inverseEdgeInfo *EdgeInfo) error
- func (e *AssociationEdge) AssocEdgeBaseImport(cfg codegenapi.Config) *tsimport.ImportPath
- func (e *AssociationEdge) CamelCaseEdgeName() string
- func (e *AssociationEdge) CloneWithCommonInfo(cfg codegenapi.Config, nodeName string) (*AssociationEdge, error)
- func (e *AssociationEdge) CreateEdge() bool
- func (e *AssociationEdge) EdgeIdentifier() string
- func (e *AssociationEdge) EdgeQueryBase() string
- func (e *AssociationEdge) GenerateBase() bool
- func (e *AssociationEdge) GenerateSourceLoadEntOptions() bool
- func (e *AssociationEdge) GetCountFactoryName() string
- func (e *AssociationEdge) GetDataFactoryName() string
- func (e *AssociationEdge) GetEdgeName() string
- func (e *AssociationEdge) GetEntConfig() *EntConfigInfo
- func (e *AssociationEdge) GetGraphQLConnectionName() string
- func (e *AssociationEdge) GetGraphQLConnectionType() string
- func (e *AssociationEdge) GetGraphQLEdgePrefix() string
- func (e *AssociationEdge) GetNodeInfo() nodeinfo.NodeInfo
- func (e *AssociationEdge) GetSourceNodeName() string
- func (edge *AssociationEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
- func (e *AssociationEdge) GraphQLEdgeName() string
- func (e *AssociationEdge) HideFromGraphQL() bool
- func (e *AssociationEdge) PluralEdge() bool
- func (e *AssociationEdge) PolymorphicEdge() bool
- func (e *AssociationEdge) Singular() string
- func (e *AssociationEdge) TsEdgeQueryEdgeName() string
- func (e *AssociationEdge) TsEdgeQueryName() string
- func (e *AssociationEdge) UniqueEdge() bool
- type AssociationEdgeGroup
- func (edgeGroup *AssociationEdgeGroup) AddActionEdges(list []string)
- func (edgeGroup *AssociationEdgeGroup) DefaultNullState() string
- func (edgeGroup *AssociationEdgeGroup) EdgeIdentifier() string
- func (edgeGroup *AssociationEdgeGroup) GetAssociationByName(edgeName string) *AssociationEdge
- func (edgeGroup *AssociationEdgeGroup) GetConstNameForEdgeName(edgeName string) string
- func (edgeGroup *AssociationEdgeGroup) GetConstNameForUnknown() string
- func (edgeGroup *AssociationEdgeGroup) GetEnumValues() []string
- func (edgeGroup *AssociationEdgeGroup) GetGraphQLNameForStatusMethod(cfg codegenapi.Config) string
- func (edgeGroup *AssociationEdgeGroup) GetIDArg() string
- func (edgeGroup *AssociationEdgeGroup) GetQuotedConstNameForEdgeName(edgeName string) string
- func (edgeGroup *AssociationEdgeGroup) GetStatusEdges() []*AssociationEdge
- func (edgeGroup *AssociationEdgeGroup) GetStatusFieldName() string
- func (edgeGroup *AssociationEdgeGroup) GetStatusFuncName() string
- func (edgeGroup *AssociationEdgeGroup) GetStatusMap() map[string]string
- func (edgeGroup *AssociationEdgeGroup) GetStatusMapMethod() string
- func (edgeGroup *AssociationEdgeGroup) GetStatusMethod() string
- func (edgeGroup *AssociationEdgeGroup) GetStatusMethodReturn() string
- func (edgeGroup *AssociationEdgeGroup) GetStatusValues() []string
- func (edgeGroup *AssociationEdgeGroup) IsNullable() bool
- func (edgeGroup *AssociationEdgeGroup) UseEdgeInStatusAction(edgeName string) bool
- type ConnectionEdge
- type DestinationEdgeInterface
- type Edge
- type EdgeAction
- type EdgeInfo
- func (e *EdgeInfo) AddDestinationEdgeFromNonPolymorphicOptions(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, ...) error
- func (e *EdgeInfo) AddDestinationEdgeFromPolymorphicOptions(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, ...) error
- func (e *EdgeInfo) AddEdgeFromForeignKeyIndex(cfg codegenapi.Config, dbColName, edgeName, nodeName string) error
- func (e *EdgeInfo) AddEdgeFromInverseFieldEdge(cfg codegenapi.Config, sourceSchemaName, destinationPackageName string, ...) (*AssociationEdge, error)
- func (e *EdgeInfo) AddFieldEdgeFromFieldEdgeInfo(cfg codegenapi.Config, fieldName string, fieldEdgeInfo *base.FieldEdgeInfo, ...) error
- func (e *EdgeInfo) AddFieldEdgeFromForeignKeyInfo(cfg codegenapi.Config, fieldName, nodeName string, nullable bool, ...) error
- func (e *EdgeInfo) AddIndexedEdgeFromNonPolymorphicSource(cfg codegenapi.Config, ...) error
- func (e *EdgeInfo) AddIndexedEdgeFromSource(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, ...) error
- func (e *EdgeInfo) CreateEdgeBaseFile() bool
- func (e *EdgeInfo) GetAssociationEdgeByName(edgeName string) *AssociationEdge
- func (e *EdgeInfo) GetAssociationEdgeGroupByStatusName(groupStatusName string) *AssociationEdgeGroup
- func (e *EdgeInfo) GetConnectionEdges() []ConnectionEdge
- func (e *EdgeInfo) GetDestinationEdgeByName(edgeName string) ConnectionEdge
- func (e *EdgeInfo) GetEdgeQueryIndexedEdgeByName(edgeName string) *IndexedEdge
- func (e *EdgeInfo) GetEdgesForIndexLoader() []IndexedConnectionEdge
- func (e *EdgeInfo) GetFieldEdgeByName(edgeName string) *FieldEdge
- func (e *EdgeInfo) GetForeignKeyEdgeByName(edgeName string) *ForeignKeyEdge
- func (e *EdgeInfo) GetIndexedEdgeByName(edgeName string) *IndexedEdge
- func (e *EdgeInfo) GetSingularEdges() []Edge
- func (e *EdgeInfo) HasAssociationEdges() bool
- type EdgeWithNameConflict
- type EntConfigInfo
- type FieldEdge
- func (e *FieldEdge) CamelCaseEdgeName() string
- func (e *FieldEdge) GetEdgeName() string
- func (e *FieldEdge) GetEntConfig() *EntConfigInfo
- func (e *FieldEdge) GetNodeInfo() nodeinfo.NodeInfo
- func (edge *FieldEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
- func (e *FieldEdge) GraphQLEdgeName() string
- func (e *FieldEdge) HideFromGraphQL() bool
- func (edge *FieldEdge) IsList() bool
- func (edge *FieldEdge) NonPolymorphicList() bool
- func (edge *FieldEdge) PolymorphicEdge() bool
- type ForeignKeyEdge
- func (e ForeignKeyEdge) EdgeIdentifier() string
- func (e *ForeignKeyEdge) EdgeQueryBase() string
- func (e *ForeignKeyEdge) ErrorMessage(edgeInfo *EdgeInfo) error
- func (e *ForeignKeyEdge) GenerateBaseClass() bool
- func (e *ForeignKeyEdge) GetCountFactoryName() string
- func (e *ForeignKeyEdge) GetDataFactoryName() string
- func (e *ForeignKeyEdge) GetGraphQLConnectionName() string
- func (e *ForeignKeyEdge) GetGraphQLConnectionType() string
- func (e *ForeignKeyEdge) GetGraphQLEdgePrefix() string
- func (e *ForeignKeyEdge) GetOverwriteConstructorInfo() *OverwriteConstructorInfo
- func (e *ForeignKeyEdge) GetSourceNodeName() string
- func (e *ForeignKeyEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
- func (e *ForeignKeyEdge) PluralEdge() bool
- func (e *ForeignKeyEdge) PolymorphicEdge() bool
- func (e *ForeignKeyEdge) QuotedDBColName() string
- func (e ForeignKeyEdge) Singular() string
- func (e *ForeignKeyEdge) SourceIsPolymorphic() bool
- func (e *ForeignKeyEdge) TsEdgeQueryEdgeName() string
- func (e *ForeignKeyEdge) TsEdgeQueryName() string
- func (e *ForeignKeyEdge) UniqueEdge() bool
- type IndexEdgeOptions
- type IndexEdgeOpts
- type IndexedConnectionEdge
- type IndexedEdge
- func (e IndexedEdge) EdgeIdentifier() string
- func (e *IndexedEdge) EdgeQueryBase() string
- func (e *IndexedEdge) GenerateBaseClass() bool
- func (e *IndexedEdge) GetCountFactoryName() string
- func (e *IndexedEdge) GetDataFactoryName() string
- func (e *IndexedEdge) GetGraphQLConnectionName() string
- func (e *IndexedEdge) GetGraphQLConnectionType() string
- func (e *IndexedEdge) GetGraphQLEdgePrefix() string
- func (e *IndexedEdge) GetOverwriteConstructorInfo() *OverwriteConstructorInfo
- func (e *IndexedEdge) GetSourceNodeName() string
- func (e *IndexedEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
- func (e *IndexedEdge) PluralEdge() bool
- func (e *IndexedEdge) PolymorphicEdge() bool
- func (e *IndexedEdge) QuotedDBColName() string
- func (e IndexedEdge) Singular() string
- func (e *IndexedEdge) SourceIsPolymorphic() bool
- func (e *IndexedEdge) TsEdgeQueryEdgeName() string
- func (e *IndexedEdge) TsEdgeQueryName() string
- func (e *IndexedEdge) UniqueEdge() bool
- type InverseAssocEdge
- func (e *InverseAssocEdge) CamelCaseEdgeName() string
- func (e *InverseAssocEdge) GetEdgeName() string
- func (e *InverseAssocEdge) GetEntConfig() *EntConfigInfo
- func (e *InverseAssocEdge) GetNodeInfo() nodeinfo.NodeInfo
- func (e *InverseAssocEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
- func (e *InverseAssocEdge) GraphQLEdgeName() string
- func (e *InverseAssocEdge) HideFromGraphQL() bool
- func (e *InverseAssocEdge) PolymorphicEdge() bool
- type OverwriteConstructorInfo
- type PluralEdge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssocEdgeEqual ¶ added in v0.0.38
func AssocEdgeEqual(existingEdge, edge *AssociationEdge) bool
func AssocEdgeGroupEqual ¶ added in v0.0.38
func AssocEdgeGroupEqual(g1, g2 *AssociationEdgeGroup) bool
intentionally skips EdgeActions since actions are high level objects of their own which will do their own comparison
func AssocEdgesEqual ¶ added in v0.0.38
func AssocEdgesEqual(l1, l2 []*AssociationEdge) bool
func CompareAssocEdgesMap ¶ added in v0.0.38
func CompareAssocEdgesMap(m1, m2 map[string]*AssociationEdge, opts ...change.CompareOption) []change.Change
func CompareAssociationEdge ¶ added in v0.0.38
func CompareAssociationEdge(existingEdge, edge *AssociationEdge) []change.Change
CompareAssociationEdge compares 2 actions to see what changes intentionally skips EdgeActions since actions are high level objects of their own which will do their own comparison
func CompareEdgeInfo ¶ added in v0.0.38
func CompareEdgeInfo(e1, e2 *EdgeInfo, opts ...change.CompareOption) []change.Change
Compares edges, assoc edge groups, field edge, connection edge
func CompareFieldEdge ¶ added in v0.1.0
func CompareForeignKeyEdge ¶ added in v0.1.0
func CompareForeignKeyEdge(existingEdge, edge *ForeignKeyEdge) []change.Change
func CompareIndexedEdge ¶ added in v0.1.0
func CompareIndexedEdge(existingEdge, edge *IndexedEdge) []change.Change
func ForceEdgePolymorphic ¶ added in v0.1.0
func ForceEdgePolymorphic() func(*opts)
func GetCommonEdgeInfoForTest ¶ added in v0.1.0
func GetCommonEdgeInfoForTest(edgeName string, entConfig *EntConfigInfo, ) commonEdgeInfo
func TsEdgeConst ¶
Types ¶
type ActionableEdge ¶
type ActionableEdge interface {
EdgeIdentifier() string
}
ActionableEdge indicates an edge that can be used in an action. This provides the edge identifier that can be used in edge action PS: why am I so bad at names?
type AssociationEdge ¶
type AssociationEdge struct { EdgeConst string TsEdgeConst string Symmetric bool Unique bool InverseEdge *InverseAssocEdge IsInverseEdge bool TableName string // TableName will be gotten from the GroupName if part of a group or derived from each edge // will eventually be made configurable to the user EdgeActions []*EdgeAction PatternName string // contains filtered or unexported fields }
func AssocEdgeFromInput ¶
func AssocEdgeFromInput(cfg codegenapi.Config, packageName string, edge *input.AssocEdge, fns ...func(*opts)) (*AssociationEdge, error)
func (*AssociationEdge) AddInverseEdge ¶
func (e *AssociationEdge) AddInverseEdge(inverseEdgeInfo *EdgeInfo) error
func (*AssociationEdge) AssocEdgeBaseImport ¶ added in v0.1.0
func (e *AssociationEdge) AssocEdgeBaseImport(cfg codegenapi.Config) *tsimport.ImportPath
func (*AssociationEdge) CamelCaseEdgeName ¶
func (e *AssociationEdge) CamelCaseEdgeName() string
func (*AssociationEdge) CloneWithCommonInfo ¶
func (e *AssociationEdge) CloneWithCommonInfo(cfg codegenapi.Config, nodeName string) (*AssociationEdge, error)
func (*AssociationEdge) CreateEdge ¶
func (e *AssociationEdge) CreateEdge() bool
func (*AssociationEdge) EdgeIdentifier ¶
func (e *AssociationEdge) EdgeIdentifier() string
func (*AssociationEdge) EdgeQueryBase ¶
func (e *AssociationEdge) EdgeQueryBase() string
func (*AssociationEdge) GenerateBase ¶
func (e *AssociationEdge) GenerateBase() bool
func (*AssociationEdge) GenerateSourceLoadEntOptions ¶ added in v0.0.31
func (e *AssociationEdge) GenerateSourceLoadEntOptions() bool
func (*AssociationEdge) GetCountFactoryName ¶
func (e *AssociationEdge) GetCountFactoryName() string
func (*AssociationEdge) GetDataFactoryName ¶
func (e *AssociationEdge) GetDataFactoryName() string
func (*AssociationEdge) GetEdgeName ¶
func (e *AssociationEdge) GetEdgeName() string
func (*AssociationEdge) GetEntConfig ¶
func (e *AssociationEdge) GetEntConfig() *EntConfigInfo
func (*AssociationEdge) GetGraphQLConnectionName ¶
func (e *AssociationEdge) GetGraphQLConnectionName() string
func (*AssociationEdge) GetGraphQLConnectionType ¶ added in v0.1.0
func (e *AssociationEdge) GetGraphQLConnectionType() string
func (*AssociationEdge) GetGraphQLEdgePrefix ¶
func (e *AssociationEdge) GetGraphQLEdgePrefix() string
func (*AssociationEdge) GetNodeInfo ¶
func (*AssociationEdge) GetSourceNodeName ¶
func (e *AssociationEdge) GetSourceNodeName() string
func (*AssociationEdge) GetTSGraphQLTypeImports ¶
func (edge *AssociationEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
func (*AssociationEdge) GraphQLEdgeName ¶
func (e *AssociationEdge) GraphQLEdgeName() string
func (*AssociationEdge) HideFromGraphQL ¶
func (e *AssociationEdge) HideFromGraphQL() bool
func (*AssociationEdge) PluralEdge ¶
func (e *AssociationEdge) PluralEdge() bool
func (*AssociationEdge) PolymorphicEdge ¶
func (e *AssociationEdge) PolymorphicEdge() bool
func (*AssociationEdge) Singular ¶
func (e *AssociationEdge) Singular() string
func (*AssociationEdge) TsEdgeQueryEdgeName ¶
func (e *AssociationEdge) TsEdgeQueryEdgeName() string
func (*AssociationEdge) TsEdgeQueryName ¶
func (e *AssociationEdge) TsEdgeQueryName() string
func (*AssociationEdge) UniqueEdge ¶
func (e *AssociationEdge) UniqueEdge() bool
type AssociationEdgeGroup ¶
type AssociationEdgeGroup struct { GroupName string // this is the name of the edge which is different from the name of the status. confusing GroupStatusName string // should be something like RsvpStatus TSGroupStatusName string // changes RsvpStatus to rsvpStatus DestNodeInfo nodeinfo.NodeInfo ConstType string // and then this becomes EventRsvpStatus Edges map[string]*AssociationEdge // TODO... EdgeActions []*EdgeAction StatusEnums []string ViewerBased bool NullStateFn string NullStates []string NodeInfo nodeinfo.NodeInfo // contains filtered or unexported fields }
func AssocEdgeGroupFromInput ¶ added in v0.1.0
func AssocEdgeGroupFromInput(cfg codegenapi.Config, packageName string, node *input.Node, edgeGroup *input.AssocEdgeGroup, edgeInfo *EdgeInfo) (*AssociationEdgeGroup, error)
func (*AssociationEdgeGroup) AddActionEdges ¶
func (edgeGroup *AssociationEdgeGroup) AddActionEdges(list []string)
func (*AssociationEdgeGroup) DefaultNullState ¶
func (edgeGroup *AssociationEdgeGroup) DefaultNullState() string
func (*AssociationEdgeGroup) EdgeIdentifier ¶
func (edgeGroup *AssociationEdgeGroup) EdgeIdentifier() string
func (*AssociationEdgeGroup) GetAssociationByName ¶
func (edgeGroup *AssociationEdgeGroup) GetAssociationByName(edgeName string) *AssociationEdge
func (*AssociationEdgeGroup) GetConstNameForEdgeName ¶
func (edgeGroup *AssociationEdgeGroup) GetConstNameForEdgeName(edgeName string) string
func (*AssociationEdgeGroup) GetConstNameForUnknown ¶
func (edgeGroup *AssociationEdgeGroup) GetConstNameForUnknown() string
func (*AssociationEdgeGroup) GetEnumValues ¶
func (edgeGroup *AssociationEdgeGroup) GetEnumValues() []string
func (*AssociationEdgeGroup) GetGraphQLNameForStatusMethod ¶ added in v0.1.0
func (edgeGroup *AssociationEdgeGroup) GetGraphQLNameForStatusMethod(cfg codegenapi.Config) string
func (*AssociationEdgeGroup) GetIDArg ¶
func (edgeGroup *AssociationEdgeGroup) GetIDArg() string
func (*AssociationEdgeGroup) GetQuotedConstNameForEdgeName ¶
func (edgeGroup *AssociationEdgeGroup) GetQuotedConstNameForEdgeName(edgeName string) string
func (*AssociationEdgeGroup) GetStatusEdges ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusEdges() []*AssociationEdge
func (*AssociationEdgeGroup) GetStatusFieldName ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusFieldName() string
func (*AssociationEdgeGroup) GetStatusFuncName ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusFuncName() string
func (*AssociationEdgeGroup) GetStatusMap ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusMap() map[string]string
func (*AssociationEdgeGroup) GetStatusMapMethod ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusMapMethod() string
func (*AssociationEdgeGroup) GetStatusMethod ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusMethod() string
func (*AssociationEdgeGroup) GetStatusMethodReturn ¶ added in v0.1.0
func (edgeGroup *AssociationEdgeGroup) GetStatusMethodReturn() string
func (*AssociationEdgeGroup) GetStatusValues ¶
func (edgeGroup *AssociationEdgeGroup) GetStatusValues() []string
func (*AssociationEdgeGroup) IsNullable ¶ added in v0.1.0
func (edgeGroup *AssociationEdgeGroup) IsNullable() bool
func (*AssociationEdgeGroup) UseEdgeInStatusAction ¶
func (edgeGroup *AssociationEdgeGroup) UseEdgeInStatusAction(edgeName string) bool
type ConnectionEdge ¶
type ConnectionEdge interface { // NOTE: update compareConnectionEdge if anything changes here Edge // For custom edges... GetSourceNodeName() string GetGraphQLEdgePrefix() string GetGraphQLConnectionName() string GetGraphQLConnectionType() string TsEdgeQueryEdgeName() string TsEdgeQueryName() string UniqueEdge() bool }
type DestinationEdgeInterface ¶ added in v0.1.0
type DestinationEdgeInterface interface { UniqueEdge() bool QuotedDBColName() string GetEntConfig() *EntConfigInfo GetNodeInfo() nodeinfo.NodeInfo }
type Edge ¶
type Edge interface { // NOTE: update compareEdge if anything changes here GetEdgeName() string GetNodeInfo() nodeinfo.NodeInfo GetEntConfig() *EntConfigInfo GraphQLEdgeName() string CamelCaseEdgeName() string HideFromGraphQL() bool PolymorphicEdge() bool GetTSGraphQLTypeImports() []*tsimport.ImportPath }
type EdgeAction ¶
type EdgeAction struct { Action string CustomActionName string CustomGraphQLName string ExposeToGraphQL bool ActionOnlyFields []*input.ActionField CanViewerDo *input.CanViewerDo CanFail bool }
EdgeAction holds as little data as possible about the edge action and depends on action to take that information, process it and generate the action specific metadata
type EdgeInfo ¶
type EdgeInfo struct { // TODO hide FieldEdges etc // make them accessors since we want to control mutations FieldEdges []*FieldEdge // TODO clean this up. unclear what the difference is at this point... // note: look at CompareEdgeInfo in compare_edge.go as this changes // indexedEdgeQueriesMap has both foreign key and index edges so only comparing // that. not comparing destinationEdgesMap as that only includes foreignKey edges // if this changes, logic there should change IndexedEdgeQueries []IndexedConnectionEdge // DestinationEdges. edges that can be gotten from this node // foreign key edges + polymorphic indexed fields... // this doesn't include Assoc edges which are also connection edges... DestinationEdges []ConnectionEdge Associations []*AssociationEdge AssocGroups []*AssociationEdgeGroup SourcePackageName string SourceNodeName string // contains filtered or unexported fields }
func EdgeInfoFromInput ¶
func NewEdgeInfo ¶
func (*EdgeInfo) AddDestinationEdgeFromNonPolymorphicOptions ¶ added in v0.1.0
func (*EdgeInfo) AddDestinationEdgeFromPolymorphicOptions ¶
func (e *EdgeInfo) AddDestinationEdgeFromPolymorphicOptions(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, polymorphic *base.PolymorphicOptions, foreignNode string) error
func (*EdgeInfo) AddEdgeFromForeignKeyIndex ¶
func (e *EdgeInfo) AddEdgeFromForeignKeyIndex(cfg codegenapi.Config, dbColName, edgeName, nodeName string) error
func (*EdgeInfo) AddEdgeFromInverseFieldEdge ¶ added in v0.0.35
func (e *EdgeInfo) AddEdgeFromInverseFieldEdge(cfg codegenapi.Config, sourceSchemaName, destinationPackageName string, edge *input.InverseFieldEdge, patternName string) (*AssociationEdge, error)
func (*EdgeInfo) AddFieldEdgeFromFieldEdgeInfo ¶
func (*EdgeInfo) AddFieldEdgeFromForeignKeyInfo ¶
func (*EdgeInfo) AddIndexedEdgeFromNonPolymorphicSource ¶ added in v0.1.0
func (e *EdgeInfo) AddIndexedEdgeFromNonPolymorphicSource(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName, foreignNode, edgeConstName string) error
func (*EdgeInfo) AddIndexedEdgeFromSource ¶
func (e *EdgeInfo) AddIndexedEdgeFromSource(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, polymorphic *base.PolymorphicOptions) error
func (*EdgeInfo) CreateEdgeBaseFile ¶
func (*EdgeInfo) GetAssociationEdgeByName ¶
func (e *EdgeInfo) GetAssociationEdgeByName(edgeName string) *AssociationEdge
func (*EdgeInfo) GetAssociationEdgeGroupByStatusName ¶
func (e *EdgeInfo) GetAssociationEdgeGroupByStatusName(groupStatusName string) *AssociationEdgeGroup
func (*EdgeInfo) GetConnectionEdges ¶
func (e *EdgeInfo) GetConnectionEdges() []ConnectionEdge
func (*EdgeInfo) GetDestinationEdgeByName ¶
func (e *EdgeInfo) GetDestinationEdgeByName(edgeName string) ConnectionEdge
func (*EdgeInfo) GetEdgeQueryIndexedEdgeByName ¶
func (e *EdgeInfo) GetEdgeQueryIndexedEdgeByName(edgeName string) *IndexedEdge
func (*EdgeInfo) GetEdgesForIndexLoader ¶
func (e *EdgeInfo) GetEdgesForIndexLoader() []IndexedConnectionEdge
func (*EdgeInfo) GetFieldEdgeByName ¶
func (*EdgeInfo) GetForeignKeyEdgeByName ¶
func (e *EdgeInfo) GetForeignKeyEdgeByName(edgeName string) *ForeignKeyEdge
func (*EdgeInfo) GetIndexedEdgeByName ¶
func (e *EdgeInfo) GetIndexedEdgeByName(edgeName string) *IndexedEdge
func (*EdgeInfo) GetSingularEdges ¶
func (*EdgeInfo) HasAssociationEdges ¶
type EdgeWithNameConflict ¶ added in v0.1.0
type EntConfigInfo ¶ added in v0.1.0
TODO kill this
func GetEntConfigFromName ¶ added in v0.1.0
func GetEntConfigFromName(packageName string) *EntConfigInfo
TODO kill
type FieldEdge ¶
type FieldEdge struct { FieldName string TSFieldName string // InverseEdgeName string Nullable bool InverseEdge *input.InverseFieldEdge Polymorphic *base.PolymorphicOptions // user given edge name is the name provided by the user // done via fieldEdge.IndexEdge.Name UserGivenEdgeName string EdgeConstName string // contains filtered or unexported fields }
func GetFieldEdge ¶ added in v0.1.0
func GetFieldEdge(cfg codegenapi.Config, fieldName string, fieldEdgeInfo *base.FieldEdgeInfo, nullable bool, fieldType enttype.Type, ) (*FieldEdge, error)
func (*FieldEdge) CamelCaseEdgeName ¶
func (e *FieldEdge) CamelCaseEdgeName() string
func (*FieldEdge) GetEdgeName ¶
func (e *FieldEdge) GetEdgeName() string
func (*FieldEdge) GetEntConfig ¶
func (e *FieldEdge) GetEntConfig() *EntConfigInfo
func (*FieldEdge) GetNodeInfo ¶
func (*FieldEdge) GetTSGraphQLTypeImports ¶
func (edge *FieldEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
func (*FieldEdge) GraphQLEdgeName ¶
func (e *FieldEdge) GraphQLEdgeName() string
func (*FieldEdge) HideFromGraphQL ¶
func (e *FieldEdge) HideFromGraphQL() bool
func (*FieldEdge) NonPolymorphicList ¶ added in v0.0.35
func (*FieldEdge) PolymorphicEdge ¶
type ForeignKeyEdge ¶
type ForeignKeyEdge struct { // note that if anything is changed here, need to update foreignKeyEdgeEqual() in compare_edge.go SourceNodeName string // contains filtered or unexported fields }
func GetForeignKeyEdge ¶ added in v0.1.0
func GetForeignKeyEdge(cfg codegenapi.Config, dbColName, edgeName, nodeName, sourceNodeName string) *ForeignKeyEdge
func (ForeignKeyEdge) EdgeIdentifier ¶
func (e ForeignKeyEdge) EdgeIdentifier() string
func (*ForeignKeyEdge) EdgeQueryBase ¶ added in v0.1.0
func (e *ForeignKeyEdge) EdgeQueryBase() string
func (*ForeignKeyEdge) ErrorMessage ¶ added in v0.1.0
func (e *ForeignKeyEdge) ErrorMessage(edgeInfo *EdgeInfo) error
func (*ForeignKeyEdge) GenerateBaseClass ¶ added in v0.1.0
func (e *ForeignKeyEdge) GenerateBaseClass() bool
func (*ForeignKeyEdge) GetCountFactoryName ¶
func (e *ForeignKeyEdge) GetCountFactoryName() string
func (*ForeignKeyEdge) GetDataFactoryName ¶
func (e *ForeignKeyEdge) GetDataFactoryName() string
func (*ForeignKeyEdge) GetGraphQLConnectionName ¶
func (e *ForeignKeyEdge) GetGraphQLConnectionName() string
func (*ForeignKeyEdge) GetGraphQLConnectionType ¶ added in v0.1.0
func (e *ForeignKeyEdge) GetGraphQLConnectionType() string
func (*ForeignKeyEdge) GetGraphQLEdgePrefix ¶
func (e *ForeignKeyEdge) GetGraphQLEdgePrefix() string
func (*ForeignKeyEdge) GetOverwriteConstructorInfo ¶ added in v0.1.0
func (e *ForeignKeyEdge) GetOverwriteConstructorInfo() *OverwriteConstructorInfo
func (*ForeignKeyEdge) GetSourceNodeName ¶
func (e *ForeignKeyEdge) GetSourceNodeName() string
func (*ForeignKeyEdge) GetTSGraphQLTypeImports ¶
func (e *ForeignKeyEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
func (*ForeignKeyEdge) PluralEdge ¶
func (e *ForeignKeyEdge) PluralEdge() bool
func (*ForeignKeyEdge) PolymorphicEdge ¶
func (e *ForeignKeyEdge) PolymorphicEdge() bool
func (*ForeignKeyEdge) QuotedDBColName ¶
func (e *ForeignKeyEdge) QuotedDBColName() string
func (*ForeignKeyEdge) SourceIsPolymorphic ¶ added in v0.0.31
func (e *ForeignKeyEdge) SourceIsPolymorphic() bool
func (*ForeignKeyEdge) TsEdgeQueryEdgeName ¶
func (e *ForeignKeyEdge) TsEdgeQueryEdgeName() string
func (*ForeignKeyEdge) TsEdgeQueryName ¶
func (e *ForeignKeyEdge) TsEdgeQueryName() string
func (*ForeignKeyEdge) UniqueEdge ¶
func (e *ForeignKeyEdge) UniqueEdge() bool
type IndexEdgeOptions ¶ added in v0.1.0
type IndexEdgeOpts ¶ added in v0.1.0
type IndexEdgeOpts func(*IndexEdgeOptions)
func WithDefaultEdgeName ¶ added in v0.1.0
func WithDefaultEdgeName(name string) IndexEdgeOpts
func WithEdgeConstName ¶ added in v0.1.0
func WithEdgeConstName(name string) IndexEdgeOpts
type IndexedConnectionEdge ¶
type IndexedConnectionEdge interface { // NOTE: update compareIndexedConnectionEdge if anything changes here ConnectionEdge SourceIsPolymorphic() bool QuotedDBColName() string GenerateBaseClass() bool EdgeQueryBase() string // OverwriteConstructor so that we can have strong types for class GetOverwriteConstructorInfo() *OverwriteConstructorInfo }
type IndexedEdge ¶
type IndexedEdge struct { // note that if anything is changed here, need to update indexedEdgeEqual() in compare_edge.go SourceNodeName string // contains filtered or unexported fields }
this is like a foreign key edge except different refers to a field that's indexed but doesn't want to reference it as a foreign key currently best use case is as a polymorphic field but nothing stopping this from being non-polymorphic
func GetIndexedEdge ¶ added in v0.1.0
func GetIndexedEdge(cfg codegenapi.Config, tsFieldName, quotedDBColName, nodeName string, polymorphic *base.PolymorphicOptions, foreignNode string, opts ...IndexEdgeOpts) *IndexedEdge
func (IndexedEdge) EdgeIdentifier ¶
func (e IndexedEdge) EdgeIdentifier() string
func (*IndexedEdge) EdgeQueryBase ¶ added in v0.1.0
func (e *IndexedEdge) EdgeQueryBase() string
func (*IndexedEdge) GenerateBaseClass ¶ added in v0.1.0
func (e *IndexedEdge) GenerateBaseClass() bool
func (*IndexedEdge) GetCountFactoryName ¶
func (e *IndexedEdge) GetCountFactoryName() string
func (*IndexedEdge) GetDataFactoryName ¶
func (e *IndexedEdge) GetDataFactoryName() string
func (*IndexedEdge) GetGraphQLConnectionName ¶
func (e *IndexedEdge) GetGraphQLConnectionName() string
func (*IndexedEdge) GetGraphQLConnectionType ¶ added in v0.1.0
func (e *IndexedEdge) GetGraphQLConnectionType() string
func (*IndexedEdge) GetGraphQLEdgePrefix ¶
func (e *IndexedEdge) GetGraphQLEdgePrefix() string
func (*IndexedEdge) GetOverwriteConstructorInfo ¶ added in v0.1.0
func (e *IndexedEdge) GetOverwriteConstructorInfo() *OverwriteConstructorInfo
func (*IndexedEdge) GetSourceNodeName ¶
func (e *IndexedEdge) GetSourceNodeName() string
TODO what are we doing here
func (*IndexedEdge) GetTSGraphQLTypeImports ¶
func (e *IndexedEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
func (*IndexedEdge) PluralEdge ¶
func (e *IndexedEdge) PluralEdge() bool
func (*IndexedEdge) PolymorphicEdge ¶
func (e *IndexedEdge) PolymorphicEdge() bool
func (*IndexedEdge) QuotedDBColName ¶
func (e *IndexedEdge) QuotedDBColName() string
func (*IndexedEdge) SourceIsPolymorphic ¶ added in v0.0.31
func (e *IndexedEdge) SourceIsPolymorphic() bool
func (*IndexedEdge) TsEdgeQueryEdgeName ¶
func (e *IndexedEdge) TsEdgeQueryEdgeName() string
func (*IndexedEdge) TsEdgeQueryName ¶
func (e *IndexedEdge) TsEdgeQueryName() string
func (*IndexedEdge) UniqueEdge ¶
func (e *IndexedEdge) UniqueEdge() bool
type InverseAssocEdge ¶
type InverseAssocEdge struct { EdgeConst string // contains filtered or unexported fields }
func (*InverseAssocEdge) CamelCaseEdgeName ¶
func (e *InverseAssocEdge) CamelCaseEdgeName() string
func (*InverseAssocEdge) GetEdgeName ¶
func (e *InverseAssocEdge) GetEdgeName() string
func (*InverseAssocEdge) GetEntConfig ¶
func (e *InverseAssocEdge) GetEntConfig() *EntConfigInfo
func (*InverseAssocEdge) GetNodeInfo ¶
func (*InverseAssocEdge) GetTSGraphQLTypeImports ¶
func (e *InverseAssocEdge) GetTSGraphQLTypeImports() []*tsimport.ImportPath
func (*InverseAssocEdge) GraphQLEdgeName ¶
func (e *InverseAssocEdge) GraphQLEdgeName() string
func (*InverseAssocEdge) HideFromGraphQL ¶
func (e *InverseAssocEdge) HideFromGraphQL() bool
func (*InverseAssocEdge) PolymorphicEdge ¶
func (e *InverseAssocEdge) PolymorphicEdge() bool
type OverwriteConstructorInfo ¶ added in v0.1.0
type OverwriteConstructorInfo struct {
Import *tsimport.ImportPath
}
type PluralEdge ¶
marker interface