pgx/pgtype
Nick Farrell 47977703e1
Load types using a single SQL query
When loading even a single type into pgx's type map, multiple SQL
queries are performed in series. Over a slow link, this is not ideal.
Worse, if multiple types are being registered, this is repeated multiple
times.

This commit add LoadTypes, which can retrieve type
mapping information for multiple types in a single SQL call, including
recursive fetching of dependent types.
RegisterTypes performs the second stage of this operation.
2024-07-01 15:34:17 +10:00
..
zeronull zeronull.Timestamptz should use pgtype.Timestamptz 2023-07-22 08:35:32 -05:00
array.go fix error message to print the unexpected rune 2023-12-01 18:23:23 -06:00
array_codec.go Move typed nil handling to Map.Encode from anynil 2024-05-18 22:39:28 -05:00
array_codec_test.go pgtype array: Fix encoding of vtab \v 2023-06-17 17:15:58 -05:00
array_test.go
bits.go Fix: pgtype.Bits makes copy of data from read buffer 2024-02-23 17:40:11 -06:00
bits_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
bool.go support different bool string representations 2023-04-27 20:29:41 -05:00
bool_test.go
box.go
box_test.go
builtin_wrappers.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
bytea.go Fix: driver.Value representation of bytea should be []byte not string 2022-12-21 17:54:42 -06:00
bytea_test.go Fix test asserts: reverse expected-actual 2024-05-14 20:07:10 -05:00
circle.go
circle_test.go
composite.go
composite_test.go Fix scanning a table type into a struct 2023-04-20 20:13:37 -05:00
convert.go Remove some now unused pgtype code 2023-07-10 20:23:42 -05:00
date.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
date_test.go Fix text decoding of dates with 5 digit years 2022-11-12 07:01:11 -06:00
derived_types_test.go Load types using a single SQL query 2024-07-01 15:34:17 +10:00
doc.go Move typed nil handling to Map.Encode from anynil 2024-05-18 22:39:28 -05:00
enum_codec.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
enum_codec_test.go Fix test asserts: reverse expected-actual 2024-05-14 20:07:10 -05:00
example_child_records_test.go Drastically increase allowed test times for potato CI 2023-07-11 21:16:08 -05:00
example_custom_type_test.go Add child records docs and examples 2022-07-23 10:11:13 -05:00
example_json_test.go Add child records docs and examples 2022-07-23 10:11:13 -05:00
float4.go Fix scan float4 into sql.Scanner 2024-02-23 18:18:03 -06:00
float4_test.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
float8.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
float8_test.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
hstore.go pgtype.Hstore: add a round-trip test for binary and text codecs 2023-06-29 17:25:47 -05:00
hstore_test.go Drastically increase allowed test times for potato CI 2023-07-11 21:16:08 -05:00
inet.go Spelling and grammar fixes 2023-10-07 09:26:23 -05:00
inet_test.go Use netip package for representing inet and cidr types 2022-07-10 14:31:55 -05:00
int.go pgtype Int fix minimum error message. 2022-12-17 09:10:02 -06:00
int.go.erb pgtype Int fix minimum error message. 2022-12-17 09:10:02 -06:00
int_test.go
int_test.go.erb
integration_benchmark_test.go Fix broken benchmarks 2023-02-10 20:26:18 -06:00
integration_benchmark_test.go.erb Rename ForEachScannedRow to ForEachRow 2022-07-09 16:47:28 -05:00
integration_benchmark_test_gen.sh
interval.go Fix interval encoding to allow 0s and avoid extra spaces 2024-05-30 09:48:53 +02:00
interval_test.go Fix interval encoding to allow 0s and avoid extra spaces 2024-05-30 09:48:53 +02:00
json.go Add support for custom JSON marshal and unmarshal. 2024-05-18 08:02:09 -05:00
json_test.go Add support for custom JSON marshal and unmarshal. 2024-05-18 08:02:09 -05:00
jsonb.go Add support for custom JSON marshal and unmarshal. 2024-05-18 08:02:09 -05:00
jsonb_test.go Add support for custom JSON marshal and unmarshal. 2024-05-18 08:02:09 -05:00
line.go
line_test.go
lseg.go Encode text for Lseg includes [ and ] 2022-09-24 10:30:12 -05:00
lseg_test.go
ltree.go add ltree pgtype support 2024-01-26 09:06:13 -06:00
ltree_test.go add ltree pgtype support 2024-01-26 09:06:13 -06:00
macaddr.go
macaddr_test.go fix tests 2024-03-20 18:21:11 -05:00
multirange.go fix error message to print the unexpected rune 2023-12-01 18:23:23 -06:00
multirange_test.go Skip multirange tests on PG < 14 2022-04-23 16:55:24 -05:00
numeric.go pull out changes into new public function 2023-12-09 11:20:14 -06:00
numeric_test.go pull out changes into new public function 2023-12-09 11:20:14 -06:00
path.go
path_test.go
pgtype.go Load types using a single SQL query 2024-07-01 15:34:17 +10:00
pgtype_default.go Add support for custom JSON marshal and unmarshal. 2024-05-18 08:02:09 -05:00
pgtype_test.go Fix test asserts: reverse expected-actual 2024-05-14 20:07:10 -05:00
point.go Make use of strings.Cut 2023-10-04 20:41:55 +03:00
point_test.go
polygon.go
polygon_test.go
qchar.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
qchar_test.go
range.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
range_codec.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
range_codec_test.go
range_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
record_codec.go
record_codec_test.go
register_default_pg_types.go Add build tag to skip default PG type registration 2022-08-13 08:09:44 -05:00
register_default_pg_types_disabled.go Add build tag to skip default PG type registration 2022-08-13 08:09:44 -05:00
text.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
text_format_only_codec.go
text_test.go Remove rune to text conversion 2022-05-12 17:13:49 -05:00
tid.go Make use of strings.Cut 2023-10-04 20:41:55 +03:00
tid_test.go
time.go Allow scanning time without time zone into string 2024-05-10 10:52:41 -05:00
time_test.go make parsing stricter and add corresponding test 2024-04-16 12:18:06 -05:00
timestamp.go Add ScanLocation to pgtype.TimestampCodec 2024-05-08 08:35:05 -05:00
timestamp_test.go Add ScanLocation to pgtype.TimestampCodec 2024-05-08 08:35:05 -05:00
timestamptz.go Add ScanLocation to pgtype.TimestamptzCodec 2024-05-08 08:35:05 -05:00
timestamptz_test.go Add ScanLocation to pgtype.TimestamptzCodec 2024-05-08 08:35:05 -05:00
uint32.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
uint32_test.go
uuid.go feat: fast encodeUUID 2024-01-20 20:50:01 -06:00
uuid_test.go Scan binary UUID to string 2022-04-26 08:37:10 -05:00