Skip to content

Commit

Permalink
Merge pull request #126 from stephenafamo/fix/func-as
Browse files Browse the repository at this point in the history
Include "AS" in function query if alias is set
  • Loading branch information
stephenafamo authored Nov 16, 2023
2 parents 974d0b4 + f76c1e6 commit 83076df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dialect/psql/dialect/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (f *Function) WriteSQL(w io.Writer, d bob.Dialect, start int) ([]any, error
}
args = append(args, filterArgs...)

if len(f.columns) > 0 {
if len(f.columns) > 0 || len(f.alias) > 0 {
w.Write([]byte(" AS "))
}

Expand Down

0 comments on commit 83076df

Please sign in to comment.