Add new comma expression
This commit is contained in:
		
							parent
							
								
									d4f3c109d6
								
							
						
					
					
						commit
						8305e6bf42
					
				@ -43,3 +43,17 @@ func (s Select) MergeClause(clause *Clause) {
 | 
			
		||||
		clause.Expression = s
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CommaExpression represents a group of expressions separated by commas.
 | 
			
		||||
type CommaExpression struct {
 | 
			
		||||
	Exprs []Expression
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (comma CommaExpression) Build(builder Builder) {
 | 
			
		||||
	for idx, expr := range comma.Exprs {
 | 
			
		||||
		if idx > 0 {
 | 
			
		||||
			_, _ = builder.WriteString(", ")
 | 
			
		||||
		}
 | 
			
		||||
		expr.Build(builder)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user