File tree Expand file tree Collapse file tree 1 file changed +7
-22
lines changed
Expand file tree Collapse file tree 1 file changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package pq
22
33import (
44 "bytes"
5- "database/sql/driver "
5+ "database/sql"
66 "encoding/binary"
77 "encoding/hex"
88 "errors"
@@ -609,24 +609,9 @@ func encodeBytea(serverVersion int, v []byte) (result []byte) {
609609 return result
610610}
611611
612- // NullTime represents a time.Time that may be null. NullTime implements the
613- // sql.Scanner interface so it can be used as a scan destination, similar to
614- // sql.NullString.
615- type NullTime struct {
616- Time time.Time
617- Valid bool // Valid is true if Time is not NULL
618- }
619-
620- // Scan implements the Scanner interface.
621- func (nt * NullTime ) Scan (value any ) error {
622- nt .Time , nt .Valid = value .(time.Time )
623- return nil
624- }
625-
626- // Value implements the driver Valuer interface.
627- func (nt NullTime ) Value () (driver.Value , error ) {
628- if ! nt .Valid {
629- return nil , nil
630- }
631- return nt .Time , nil
632- }
612+ // NullTime represents a [time.Time] that may be null.
613+ // NullTime implements the [sql.Scanner] interface so
614+ // it can be used as a scan destination, similar to [sql.NullString].
615+ //
616+ // Deprecated: this is an alias for [sql.NullTime].
617+ type NullTime = sql.NullTime
You can’t perform that action at this time.
0 commit comments