Skip to content

Commit e558fd9

Browse files
committed
remove NullTime from README
1 parent 5ddb713 commit e558fd9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,7 @@ The default internal output type of MySQL `DATE` and `DATETIME` values is `[]byt
458458
However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical equivalent in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](https://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
459459

460460
**Caution:** As of Go 1.1, this makes `time.Time` the only variable type you can scan `DATE` and `DATETIME` values into. This breaks for example [`sql.RawBytes` support](https://github.com/go-sql-driver/mysql/wiki/Examples#rawbytes).
461-
462-
Alternatively you can use the [`NullTime`](https://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
463-
461+
s
464462

465463
### Unicode support
466464
Since version 1.5 Go-MySQL-Driver automatically uses the collation ` utf8mb4_general_ci` by default.

0 commit comments

Comments
 (0)