3 ms·
I guess I often rely on column order in Go, given Rows.Scan() [0]... so `select ` would be scary since someone may ALTER the table. Maybe that's the antipatter
by tejasmanohar 8y ago
I guess I often rely on column order in Go, given Rows.Scan() [0]... so `select ` would be scary since someone may ALTER the table.
Maybe that's the antipattern! But it's also a feature so I feel like you're better off avoiding the . Also, if someone adds additional big columns, you may incur additional, unnecessary cost
[0]: https://golang.org/pkg/database/sql/#Rows.Scan https://golang.org/pkg/database/sql/#Rows.Scan