You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function should be added since it's very usefull to get the output of a
SQL statement.
* * *
func (c *Conn) QueryOutput(statement string) (a []string, err os.Error) {
query, err := c.Prepare(statement)
if err != nil {
return
}
defer query.Finalize()
if err = query.Exec(); err != nil {
return
}
var field string
for {
if ok := query.Next(); !ok {
break
}
if err = query.Scan(&field); err != nil {
return nil, err
}
a = append(a, field)
}
return
}
* * *
Original issue reported on code.google.com by raul....@sent.com on 1 Dec 2010 at 12:06
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
raul....@sent.com
on 1 Dec 2010 at 12:06The text was updated successfully, but these errors were encountered: