MCPcopy
hub / github.com/ent/ent / ref

Method ref

dialect/sql/builder.go:1640–1652  ·  view source on GitHub ↗

ref returns the table reference.

()

Source from the content-addressed store, hash-verified

1638
1639// ref returns the table reference.
1640func (s *SelectTable) ref() string {
1641 if !s.quote {
1642 return s.name
1643 }
1644 b := &Builder{dialect: s.dialect}
1645 b.writeSchema(s.schema)
1646 b.Ident(s.name)
1647 if s.as != "" {
1648 b.WriteString(" AS ")
1649 b.Ident(s.as)
1650 }
1651 return b.String()
1652}
1653
1654// implement the table view.
1655func (*SelectTable) view() {}

Callers 2

QueryMethod · 0.80
joinSetOpsMethod · 0.80

Calls 4

writeSchemaMethod · 0.95
IdentMethod · 0.95
WriteStringMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected