1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-03 17:00:19 +00:00

orm add operator between #518

This commit is contained in:
slene
2014-03-10 20:18:57 +08:00
committed by asta.xie
parent d0949b64c6
commit cacdb3228d
2 changed files with 17 additions and 4 deletions

View File

@ -653,6 +653,14 @@ func TestOperators(t *testing.T) {
num, err = qs.Filter("status__in", []*int{&n1}, &n2).Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 2))
num, err = qs.Filter("id__between", 2, 3).Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 2))
num, err = qs.Filter("id__between", []int{2, 3}).Count()
throwFail(t, err)
throwFail(t, AssertIs(num, 2))
}
func TestSetCond(t *testing.T) {
@ -1611,7 +1619,6 @@ func TestDelete(t *testing.T) {
throwFail(t, err)
throwFail(t, AssertIs(num, 4))
fmt.Println("...")
qs = dORM.QueryTable("comment")
num, err = qs.Filter("Post__User", 3).Delete()
throwFail(t, err)