Commit Graph

31 Commits (04bcc0219dc3acf67f27e68decd6dffe97334779)

Author SHA1 Message Date
nolandseigler b25d092d20
formatting 2024-07-11 23:30:28 -04:00
nolandseigler 7fceb64dee
in rows.go 'fieldPosByName' use boolean to replace '_' and only execution replacements when there are no db tags present 2024-07-11 23:28:21 -04:00
nolandseigler 7a35585143
example test case that demonstrates snake case collision in db tags caused by rows.go 'fieldPosByName' 2024-07-11 22:39:29 -04:00
Felix 0cc4c14e62 Add test to validate CollectRows for empty Rows
https://github.com/jackc/pgx/issues/1924
https://github.com/jackc/pgx/issues/1925
2024-03-06 22:05:32 -06:00
Tikhon Fedulov 4367ee0598 Update TestRowToStructByName with snake case support 2023-12-25 09:47:10 -06:00
Julien GOTTELAND 9ee7d29cf9 Add CollectExactlyOneRow function 2023-08-19 18:31:41 -05:00
Jack Christensen 1a9b2a53a5 Fix staticcheck issues 2023-07-28 18:04:31 -05:00
Jack Christensen 2f6fcf8eb0 RowTo(AddrOf)StructByPos ignores fields with "-" db tag
https://github.com/jackc/pgx/discussions/1682
2023-07-15 09:39:20 -05:00
Jack Christensen 05440f9d3f Drastically increase allowed test times for potato CI
The context timeouts for tests are designed to give a better error
message when something hangs rather than the test just timing out.
Unfortunately, the potato CI frequently has some test or another
randomly take a long time. While the increased times are somewhat less
than optimal on a real computer, hopefully this will solve the
flickering CI.
2023-07-11 21:16:08 -05:00
Jack Christensen 8e6cf8f3a5 Add comment to test 2023-06-20 08:49:33 -05:00
Jack Christensen 91cba90e8d Fix: RowScanner errors are fatal to Rows
https://github.com/jackc/pgx/issues/1654
2023-06-20 08:48:06 -05:00
Jack Christensen 9f00b6f750 Use context timeouts in more tests
Tests should timeout in a reasonable time if something is stuck. In
particular this is important when testing deadlock conditions such as
can occur with the copy protocol if both the client and the server are
blocked writing until the other side does a read.
2023-05-29 10:25:57 -05:00
Jack Christensen f59e8bf555 Fix: RowToStructByPos with embedded unexported struct
https://github.com/jackc/pgx/issues/1583
2023-04-27 21:03:58 -05:00
Daniel Castro f72a147db3 skip cockroachdb 2023-04-05 17:36:00 -05:00
Daniel Castro 8b7c699b8f proper naming 2023-04-05 17:36:00 -05:00
Daniel Castro 215ffafc74 fix tests 2023-04-05 17:36:00 -05:00
Daniel Castro 5eeaa201d9 add extra tests 2023-04-05 17:36:00 -05:00
Audi P. Risa P 193bab416f add RowTo(AddrOf)StructByNameLax 2023-03-25 09:57:38 -05:00
Jack Christensen 2e9e2865f9 Added more docs and tests 2022-11-12 10:13:20 -06:00
Pavlo Golub 14be51536b implement `RowToStructByName` and `RowToAddrOfStructByName` 2022-11-12 09:39:54 -06:00
Baptiste Fontaine 3e825ec898 Fix RowToStructByPos on structs with multiple anonymous sub-structs
Fixes #1343
2022-10-22 10:02:32 -05:00
Jack Christensen 6e40968cfc CollectOneRow prefers PostgreSQL error over pgx.ErrorNoRows
fixes https://github.com/jackc/pgx/issues/1334
2022-10-22 08:44:06 -05:00
Jack Christensen ee2622a8e6 RowToStructByPos supports embedded structs
https://github.com/jackc/pgx/issues/1273#issuecomment-1236966785
2022-09-06 18:32:10 -05:00
Jack Christensen 2da0a11c52 Skip some examples on CockroachDB 2022-07-23 10:52:35 -05:00
Jack Christensen 68b7e12df2 Add examples 2022-07-23 08:52:01 -05:00
Jack Christensen 7974a102fc Improve Scan error messages 2022-07-09 21:47:39 -05:00
Jack Christensen 62f0347586 Add CollectOneRow 2022-07-09 16:59:29 -05:00
Jack Christensen 90c2dc6f68 Rename ForEachScannedRow to ForEachRow 2022-07-09 16:47:28 -05:00
Jack Christensen da192291f7 Add CollectRows and RowTo* functions
Collect functionality was originally developed in pgxutil
2022-07-09 16:39:42 -05:00
Jack Christensen 76946fb5a3 Replace QueryFunc with ForEachScannedRow 2022-07-07 20:29:04 -05:00
Jack Christensen c1495aace0 Add RowScanner interface 2022-04-30 12:49:12 -05:00