We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6f785f commit c832c96Copy full SHA for c832c96
docs/tutorials/getting-started-mysql.md
@@ -99,7 +99,7 @@ import (
99
func run() error {
100
ctx := context.Background()
101
102
- db, err := sql.Open("mysql", "user:password@/dbname")
+ db, err := sql.Open("mysql", "user:password@/dbname?parseTime=true")
103
if err != nil {
104
return err
105
}
@@ -155,3 +155,8 @@ go build ./...
155
156
To make that possible, sqlc generates readable, **idiomatic** Go code that you
157
otherwise would have had to write yourself. Take a look in `tutorial/query.sql.go`.
158
+
159
+If your tables have columns with date or time types, sqlc expects these values
160
+to scan into `time.Time` structs. If you're using
161
+`github.com/go-sql-driver/mysql`, ensure that `parseTime=true` has been added to
162
+the connection string.
0 commit comments