I feel like I must be totally missing the point.
I try to run something along the lines of the example below, but the ?
is not expanded into the argument passed in.
import (
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
db, err := sql.Open(...)
if err != nil { ... }
_, err = db.Query("SELECT * FROM foo WHERE bar=?", bar)
Also, who's concern is expanding it? it show's up in the doc of database/sql
but other conversations hinted it may be the concern of the driver.
What am I missing? Any pointer in the right direction is greatly appreciated.