I'm interested in streaming results from a *database/sql* query to a 
template rendered with *html/template*. More specifically, for performance 
reasons, I'm interested in streaming an array of results from the database  
straight to text/template without allocating a slice beforehand. My idea is 
that the query rows will be rendered and sent over the network as they are 
retrieved, rather than retrieving the full result set from the database and 
then starting the render, e.g. where the template calls Rows.Next(). Has 
anyone managed to hook up the *database/sql* Rows.Next() API to the 
*html/template* templating language? I can't figure out if it's possible to 
emulate a while loop in the templating language since {{range}} only works 
on slices.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to