CMogilko on v6.2.2
CMogilko on master
upgrade version golang.org/x/sy… (compare)
Filter(func(row r.Term) r.Term {
return row.Field("updated_at").During(r.Time(2014, 8, 12, 'Z'), r.Time(2014, 8, 12, 'Z'))
}).Run(session)
I'm currently querying RethinkDB and then pushing them through https://github.com/martini-contrib/render.
How can I make this faster? Do I need to fill up the slice using cursor.All? Or can I stream the cursor directly into the JSON creator in some way?
r.DB("pi_baker").Table("observations").OrderBy(r.Desc("datetime")).Limit(5760).Pluck("datetime", "temp", "humidity").Run(session)
if err != nil {
log.Fatalln(err.Error())
}
var docRows []interface{}
cursor.All(&docRows)
renderer.JSON(200, map[string]interface{}{"obs": docRows})
.ToJSON()
?