dialect/sql: allow appending select columns to query

This commit is contained in:
Ariel Mashraki
2021-06-01 11:35:59 +03:00
committed by Ariel Mashraki
parent fdc5f2b7e9
commit f5c284787f
88 changed files with 621 additions and 761 deletions

View File

@@ -1802,6 +1802,12 @@ func (s *Selector) Select(columns ...string) *Selector {
return s
}
// AppendSelect appends additional columns/expressions to the SELECT statement.
func (s *Selector) AppendSelect(columns ...string) *Selector {
s.columns = append(s.columns, columns...)
return s
}
// SelectedColumns returns the selected columns of the Selector.
func (s *Selector) SelectedColumns() []string {
return s.columns