-
Notifications
You must be signed in to change notification settings - Fork 18.9k
database/sql/driver: Scan.Next documentation incorrect #6497
Copy link
Copy link
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge
Milestone
Description
by Christopher.Pfohl:
What is the expected output? String types from a database should have a go type of 'string' in Scanner.Scan. What do you see instead? String types have a go type of `[]byte` Which compiler are you using (5g, 6g, 8g, gccgo)? Whatever installed when I apt-get'ed from ppa:duh/golang Which operating system are you using? Ubuntu 13.04 Which version are you using? (run 'go version') 1.1.1 linux/amd64 Please provide any additional information below. database/sql/driver.Rows.Next's documentation states that all strings ought to be converted to []byte database/sql.Scanner.Scan's documentation suggests that a string is a legitimate type to expect...but all the types that actually *are* strings actually wind up being []byte because the driver's obey the above documentation (see mgodbc for a case in point, line 916). Note, that removing the conversion to []byte still works, so I suspect that the database/sql/driver.Rows.Next documentation is simply out of date.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge