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

Method With

dialect/sql/builder.go:3497–3501  ·  view source on GitHub ↗

With creates a WithBuilder for the configured dialect. Dialect(dialect.Postgres). With("users_view"). As(Select().From(Table("users")))

(name string)

Source from the content-addressed store, hash-verified

3495// With("users_view").
3496// As(Select().From(Table("users")))
3497func (d *DialectBuilder) With(name string) *WithBuilder {
3498 b := With(name)
3499 b.SetDialect(d.dialect)
3500 return b
3501}
3502
3503func isAlias(s string) bool {
3504 return strings.Contains(s, " AS ") || strings.Contains(s, " as ")

Callers

nothing calls this directly

Calls 2

WithFunction · 0.85
SetDialectMethod · 0.65

Tested by

no test coverage detected