sqlx/tests/postgres
Austin Bonander 4fc5b30d65
breaking: fix name collision in FromRow, return Error::ColumnDecode for TryFrom errors (#3356)
* chore: create regression test for #3344

* fix(derives): use a parameter name that's less likely to collide

* breaking(derives): emit `Error::ColumnDecode` when a `TryFrom` conversion fails in `FromRow`

Breaking because `#[sqlx(default)]` on an individual field or the struct itself would have previously suppressed the error. This doesn't seem like good behavior as it could result in some potentially very difficult bugs.

Instead of using `TryFrom` for these fields, just implement `From` and apply the default explicitly.

* fix: run `cargo fmt`

* fix: use correct field in `ColumnDecode`
2024-07-19 23:03:47 -07:00
..
fixtures feat: implement testing utilities (#2001) 2022-08-02 14:38:12 -07:00
migrations feat: implement testing utilities (#2001) 2022-08-02 14:38:12 -07:00
migrations_no_tx feat: no tx migration (#3181) 2024-04-19 15:42:44 -07:00
migrations_reversible fix: ensure migration progress is not lost for PG, mysql and sqlite (#1991) 2022-09-12 17:52:04 -07:00
migrations_simple fix: ensure migration progress is not lost for PG, mysql and sqlite (#1991) 2022-09-12 17:52:04 -07:00
derives.rs breaking: fix name collision in FromRow, return Error::ColumnDecode for TryFrom errors (#3356) 2024-07-19 23:03:47 -07:00
describe.rs feat(postgres): expose PgTypeKind 2020-07-24 07:28:59 -07:00
Dockerfile Add client SSL authentication using key-file for Postgres, MySQL and MariaDB (#1850) 2023-02-21 13:25:25 -08:00
error.rs feat: better database errors (#2109) 2023-02-21 13:25:25 -08:00
macros.rs feat(citext): support postgres citext (#2478) 2023-10-11 18:03:17 -07:00
migrate.rs feat: no tx migration (#3181) 2024-04-19 15:42:44 -07:00
pg_hba.conf Add client SSL authentication using key-file for Postgres, MySQL and MariaDB (#1850) 2023-02-21 13:25:25 -08:00
postgres.rs fix: ignore flaky copy_can_work_with_failed_transactions test 2024-06-13 13:11:36 -07:00
setup.sql feat(cube): support postgres cube (#3188) 2024-07-11 22:30:49 -07:00
test-attr.rs feat: no tx migration (#3181) 2024-04-19 15:42:44 -07:00
test-query.sql refactor(macros): remove ResultExt and macro_result!() 2020-07-21 21:19:31 -07:00
types.rs feat(cube): support postgres cube (#3188) 2024-07-11 22:30:49 -07:00