mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql: append selector alias only if defined (#3399)
This commit is contained in:
@@ -2824,8 +2824,10 @@ func (s *Selector) Query() (string, []any) {
|
||||
b.Wrap(func(b *Builder) {
|
||||
b.Join(t)
|
||||
})
|
||||
b.WriteString(" AS ")
|
||||
b.Ident(t.as)
|
||||
if t.as != "" {
|
||||
b.WriteString(" AS ")
|
||||
b.Ident(t.as)
|
||||
}
|
||||
case *WithBuilder:
|
||||
t.SetDialect(s.dialect)
|
||||
b.Ident(t.Name())
|
||||
|
||||
Reference in New Issue
Block a user