feature: new builder WhereClause dedicated for WHERE

This commit is contained in:
Huan Du
2024-04-13 23:32:24 +08:00
parent 8fc213eb7b
commit 96e64e9b7d
16 changed files with 560 additions and 86 deletions
+2 -6
View File
@@ -3,10 +3,6 @@
package sqlbuilder
import (
"strings"
)
// injection is a helper type to manage injected SQLs in all builders.
type injection struct {
markerSQLs map[injectionMarker][]string
@@ -36,6 +32,6 @@ func (injection *injection) WriteTo(buf *stringBuilder, marker injectionMarker)
return
}
s := strings.Join(sqls, " ")
buf.WriteLeadingString(s)
buf.WriteLeadingString("")
buf.WriteStrings(sqls, " ")
}