Commit 0b2c7f3a authored by gwenn's avatar gwenn

Improve Stmt#Select signature.

parent f99eac24
......@@ -170,7 +170,13 @@ func (s *Stmt) Insert(args ...interface{}) (int64, error) {
// //Scan
// })
// // TODO error handling
func (s *Stmt) Select(rowCallbackHandler func(s *Stmt) error) error {
func (s *Stmt) Select(rowCallbackHandler func(s *Stmt) error, args ...interface{}) error {
if len(args) > 0 {
err := s.Bind(args...)
if err != nil {
return err
}
}
for {
if ok, err := s.Next(); err != nil {
return err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment