Skip to content

Commit 14bda65

Browse files
committed
Correct pgtype docs
1 parent 9e3c4fb commit 14bda65

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pgtype/doc.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ similar fashion to database/sql. The second is to use a pointer to a pointer.
5353
return err
5454
}
5555
56-
When using nullable pgtype types as parameters for queries, one has to remember
57-
to explicitly set their Valid field to true, otherwise the parameter's value will be NULL.
56+
When using nullable pgtype types as parameters for queries, one has to remember to explicitly set their Valid field to
57+
true, otherwise the parameter's value will be NULL.
5858
5959
JSON Support
6060
@@ -159,11 +159,10 @@ example_child_records_test.go for an example.
159159
160160
Overview of Scanning Implementation
161161
162-
The first step is to use the OID to lookup the correct Codec. If the OID is unavailable, Map will try to find the OID
163-
from previous calls of Map.RegisterDefaultPgType. The Map will call the Codec's PlanScan method to get a plan for
164-
scanning into the Go value. A Codec will support scanning into one or more Go types. Oftentime these Go types are
165-
interfaces rather than explicit types. For example, PointCodec can use any Go type that implements the PointScanner and
166-
PointValuer interfaces.
162+
The first step is to use the OID to lookup the correct Codec. The Map will call the Codec's PlanScan method to get a
163+
plan for scanning into the Go value. A Codec will support scanning into one or more Go types. Oftentime these Go types
164+
are interfaces rather than explicit types. For example, PointCodec can use any Go type that implements the PointScanner
165+
and PointValuer interfaces.
167166
168167
If a Go value is not supported directly by a Codec then Map will try wrapping it with additional logic and try again.
169168
For example, Int8Codec does not support scanning into a renamed type (e.g. type myInt64 int64). But Map will detect that

0 commit comments

Comments
 (0)