Avoid unnecessary double wrapping of SELECT statement when used as single function parameter.
This commit is contained in:
parent
22b2901336
commit
d197956271
16 changed files with 97 additions and 77 deletions
|
|
@ -195,10 +195,19 @@ func (s *statementImpl) serialize(statement StatementType, out *SQLBuilder, opti
|
|||
out.IncreaseIdent()
|
||||
}
|
||||
|
||||
if contains(options, Ident) {
|
||||
out.IncreaseIdent()
|
||||
}
|
||||
|
||||
for _, clause := range s.Clauses {
|
||||
clause.Serialize(statement, out, FallTrough(options)...)
|
||||
}
|
||||
|
||||
if contains(options, Ident) {
|
||||
out.DecreaseIdent()
|
||||
out.NewLine()
|
||||
}
|
||||
|
||||
if !contains(options, NoWrap) {
|
||||
out.DecreaseIdent()
|
||||
out.NewLine()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue