@@ -53,8 +53,8 @@ similar fashion to database/sql. The second is to use a pointer to a pointer.
53
53
return err
54
54
}
55
55
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.
58
58
59
59
JSON Support
60
60
@@ -159,11 +159,10 @@ example_child_records_test.go for an example.
159
159
160
160
Overview of Scanning Implementation
161
161
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.
167
166
168
167
If a Go value is not supported directly by a Codec then Map will try wrapping it with additional logic and try again.
169
168
For example, Int8Codec does not support scanning into a renamed type (e.g. type myInt64 int64). But Map will detect that
0 commit comments