Update expression_ext.go

This commit is contained in:
markussilberbauer-dm 2022-06-30 13:42:55 +02:00 committed by Gerhard Gruber
parent c9e5b3665c
commit 1acc3bb3ae

View File

@ -277,6 +277,11 @@ func (e *expr) SumExpr() *expr {
return e
}
func (e *expr) ReplaceExpr(search string,replace string) *expr {
e.expr = fmt.Sprintf("REPLACE(%s,'%s','%s')",e.expr,search,replace);
return e
}
func (db *DB) GroupConcatExpr(e *expr, separator string, orderExpr *expr) *expr {
e.args = append(e.args, orderExpr.args...)