I am looking for a reliable solution to connect to a MySQL database from Go. I\'ve seen some libraries around but it is difficult to determine the different states of comple
few things to take note the select 1 row example :
row := con.QueryRow("select mdpr, x, y, z from sometable where id=?",id)
cb := new(SomeThing)
err := row.Scan(&cb.Mdpr, &cb.X, &cb.Y, &cb.Z)
there is a missing row.Next()
in this example. it need to call the row.Next()
to grab the first row returned.
also there is some inflexibility to the library which in some way try to promote data minimalism. if you try to select columns that is not Scan it will throw errors (not just warnings)