MCPcopy
hub / github.com/ent/ent / NewStep

Function NewStep

dialect/sql/sqlgraph/graph.go:138–144  ·  view source on GitHub ↗

NewStep gets list of options and returns a configured step. NewStep( From("table", "pk", V), To("table", "pk"), Edge("name", O2M, "fk"), )

(opts ...StepOption)

Source from the content-addressed store, hash-verified

136// Edge("name", O2M, "fk"),
137// )
138func NewStep(opts ...StepOption) *Step {
139 s := &Step{}
140 for _, opt := range opts {
141 opt(s)
142 }
143 return s
144}
145
146// FromEdgeOwner returns true if the step is from an edge owner.
147// i.e., from the table that holds the foreign-key.

Callers 15

OrderByEdgeCountFunction · 0.92
OrderByEdgeTermsFunction · 0.92
QueryOwnerMethod · 0.92
QueryAdminsMethod · 0.92
QueryAdminsMethod · 0.92
QueryOwnerMethod · 0.92
QueryOwnerMethod · 0.92
QueryCarMethod · 0.92
QueryPetsMethod · 0.92
QueryFriendsMethod · 0.92
QueryCarMethod · 0.92
QueryPetsMethod · 0.92

Calls

no outgoing calls

Tested by 9

OrderByEdgeCountFunction · 0.74
OrderByEdgeTermsFunction · 0.74
TestNeighborsFunction · 0.68
TestSetNeighborsFunction · 0.68
TestHasNeighborsFunction · 0.68
TestHasNeighborsWithFunction · 0.68
TestOrderByNeighborTermsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…