MCPcopy Create free account
hub / github.com/ent/ent / From

Function From

dialect/sql/sqlgraph/graph.go:103–111  ·  view source on GitHub ↗

From sets the source of the step.

(table, column string, v ...any)

Source from the content-addressed store, hash-verified

101
102// From sets the source of the step.
103func From(table, column string, v ...any) StepOption {
104 return func(s *Step) {
105 s.From.Table = table
106 s.From.Column = column
107 if len(v) > 0 {
108 s.From.V = v[0]
109 }
110 }
111}
112
113// To sets the destination of the step.
114func To(table, column string) StepOption {

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.56
TestSetNeighborsFunction · 0.56
TestHasNeighborsFunction · 0.56
TestHasNeighborsWithFunction · 0.56
TestOrderByNeighborTermsFunction · 0.56