Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,20 @@ CREATE TABLE authors (
```

All PostgreSQL time and date types are returned as `time.Time` structs. For
null time or date values, the `NullTime` type is used from the
`github.com/lib/pq` package.
null time or date values, the `NullTime` type from `database/sql` is used.

```go
package db

import (
"time"

"github.com/lib/pq"
"database/sql"
)

type Author struct {
ID int
CreatedAt time.Time
UpdatedAt pq.NullTime
UpdatedAt sql.NullTime
}
```