MCPcopy
hub / github.com/ent/ent / With

Function With

dialect/sql/builder.go:2697–2707  ·  view source on GitHub ↗

With returns a new builder for the `WITH` statement. n := Queries{ With("users_view").As(Select().From(Table("users"))), Select().From(Table("users_view")), } return n.Query()

(name string, columns ...string)

Source from the content-addressed store, hash-verified

2695// }
2696// return n.Query()
2697func With(name string, columns ...string) *WithBuilder {
2698 return &WithBuilder{
2699 ctes: []struct {
2700 name string
2701 columns []string
2702 s *Selector
2703 }{
2704 {name: name, columns: columns},
2705 },
2706 }
2707}
2708
2709// WithRecursive returns a new builder for the `WITH RECURSIVE` statement.
2710//

Callers 5

TestBuilderFunction · 0.85
TestWindowFunctionFunction · 0.85
WithRecursiveFunction · 0.85
WithMethod · 0.85
WithMethod · 0.85

Calls

no outgoing calls

Tested by 2

TestBuilderFunction · 0.68
TestWindowFunctionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…