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

fix db locked

This commit is contained in:
slene
2013-12-31 09:55:29 +08:00
parent 383a04f4c2
commit 61c0b3e286
3 changed files with 20 additions and 4 deletions

View File

@ -1392,7 +1392,8 @@ func TestQueryRows(t *testing.T) {
var ids []int
var usernames []string
num, err = dORM.Raw("SELECT id, user_name FROM user ORDER BY id asc").QueryRows(&ids, &usernames)
query = fmt.Sprintf("SELECT %sid%s, %suser_name%s FROM %suser%s ORDER BY %sid%s ASC", Q, Q, Q, Q, Q, Q, Q, Q)
num, err = dORM.Raw(query).QueryRows(&ids, &usernames)
throwFailNow(t, err)
throwFailNow(t, AssertIs(num, 3))
throwFailNow(t, AssertIs(len(ids), 3))