[go-nuts] First column in sql rows.Scan is always zero

2020-06-10 Thread Daniel Theophanes
Can you try to use github.com/golang-sql/table ? That might help. -- 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. To v

[go-nuts] First column in sql rows.Scan is always zero

2020-06-10 Thread David Suarez
Lol! Lack of sleep is real... apologies for the horrible keyboard offset below. What I was trying to suggest was to check the case on your ID field. In your struct it is all capitalized. The constant and my guess the dereferenced string is a lower case i with a capital D. Running your code

[go-nuts] First column in sql rows.Scan is always zero

2020-06-08 Thread David Suarez
I havemf eun tour code bit the lower case "eye" jumps out as something to look at... "case iD". Hope that helps. A debugger to walk through should help! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] First column in sql rows.Scan is always zero

2020-06-08 Thread Saied Seghatoleslami
I am scanning database tables into a structure explicitly (with &struct.field) that works just fine (working path below). But my tables have different columns, so I am working to generalize the API. There are two methods that build and reverse a []interface{} to be supplied to scan. I have