View definition

(QuerySeter).SetCond

Defined in github.com/astaxie/beego/orm/types.go

Description

set condition to QuerySeter. sql's where condition

cond := orm.NewCondition()
cond1 := cond.And("profile__isnull", false).AndNot("status__in", 1).Or("profile__age__gt", 2000)
//sql-> WHERE T0.`profile_id` IS NOT NULL AND NOT T0.`Status` IN (?) OR T1.`age` >  2000
num, err := qs.SetCond(cond1).Count()

SetCond is referenced in 13 repositories

github.com/astaxie/beego github.com/endville/gpsapi github.com/ywg2048/Golang_server

...