fix: identifier for columns w/o table name / alias (#2449)

This commit is contained in:
Livio Amstutz
2021-10-01 09:45:45 +02:00
committed by GitHub
parent f14ca1dc00
commit 4dbe68f626

View File

@@ -259,10 +259,13 @@ type Column struct {
} }
func (c Column) identifier() string { func (c Column) identifier() string {
if c.table.alias == "" { if c.table.alias != "" {
return c.table.alias + "." + c.name
}
if c.table.name != "" {
return c.table.name + "." + c.name return c.table.name + "." + c.name
} }
return c.table.alias + "." + c.name return c.name
} }
func (c Column) setTable(t table) Column { func (c Column) setTable(t table) Column {