mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 03:01:00 +00:00
fix bug in postgres
This commit is contained in:
parent
436f9a7468
commit
1c52f6834a
@ -1135,6 +1135,8 @@ func (d *dbBase) ReadValues(q dbQuerier, qs *querySet, mi *modelInfo, cond *Cond
|
||||
|
||||
query := fmt.Sprintf("SELECT %s FROM %s%s%s T0 %s%s%s%s", sels, Q, mi.table, Q, join, where, orderBy, limit)
|
||||
|
||||
d.ins.ReplaceMarks(&query)
|
||||
|
||||
var rs *sql.Rows
|
||||
if r, err := q.Query(query, args...); err != nil {
|
||||
return 0, err
|
||||
|
@ -766,6 +766,10 @@ func TestValues(t *testing.T) {
|
||||
throwFail(t, AssertIs(maps[0]["Profile__Age"], 28))
|
||||
throwFail(t, AssertIs(maps[2]["Profile__Age"], nil))
|
||||
}
|
||||
|
||||
num, err = qs.Filter("UserName", "slene").Values(&maps)
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 1))
|
||||
}
|
||||
|
||||
func TestValuesList(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user