add
parent
80b80e01eb
commit
3c24765cac
|
@ -6,6 +6,10 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
func (s *SqlBuilder[T]) SetSql(sql string) {
|
||||
s.Sql = sql
|
||||
}
|
||||
|
||||
// 如果添加的条件是in条件,则格式为"id in (?)",args参数为slice类型,并且每次调用该方法只能有一个in条件
|
||||
func (s *SqlBuilder[T]) Conditions(cond string, args ...interface{}) {
|
||||
if strings.HasPrefix(cond, " and") {
|
||||
|
|
Loading…
Reference in New Issue