Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spanner: Allow encoding and decoding to pointers
This CL adds support for decoding and encoding Spanner values to fields that have a pointer type to a base type. This makes working with nullable values more natural, as it makes it possible to define a field as *string instead of having to use the special spanner.NullString type. This CL does NOT add support for decoding and encoding to pointers to custom types that point back to base types. I.e. the following struct cannot be used to decode rows from Spanner. type CustomString string type Entity struct { ID *CustomString } Fixes #1684 Change-Id: Id5cb4c0b189d27ab9c7fff4b37be1cc69c7644b7 Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/50650 Reviewed-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Hengfeng Li <hengfeng@google.com>
- Loading branch information