Skip to content

(BREAKING: 0.5) patch nullable inference in Postgres using EXPLAIN - #566

Merged
abonander merged 1 commit into
release/0.5from
ab/postgres-nullable
Sep 9, 2020
Merged

abonander merged 1 commit into
release/0.5from
ab/postgres-nullable

Conversation

@abonander

@abonander abonander commented Jul 27, 2020 •

Copy link
Copy Markdown
Collaborator

BREAKING CHANGE: some columns emitted by query!() and query_as!(), primarily those brought in by a [LEFT | RIGHT | FULL] JOIN will become Option<T> where they were T before.

In practice breakage should be minimal as these would result in UnexpectedNull errors at runtime unless they were manually overridden with foo as "foo?" already.

However, I expect there to be edge cases that aren't covered yet, thus why we've chosen to land this in 0.5 and kick out an early alpha for testing.

  • requires the json feature (and thus the serde and serde_json features) to always be on for postgres (to parse EXPLAIN VERBOSE output, possible formats are JSON, XML, YAML or text)

closes #367

@abonander abonander changed the title WIP patch nullable inference in Postgres using EXPLAIn WIP patch nullable inference in Postgres using EXPLAIN Jul 27, 2020
@abonander
abonander force-pushed the ab/postgres-nullable branch from 38f79e0 to ea0c1a9 Compare July 27, 2020 08:30
@abonander abonander changed the title WIP patch nullable inference in Postgres using EXPLAIN patch nullable inference in Postgres using EXPLAIN Jul 27, 2020
@abonander
abonander force-pushed the ab/postgres-nullable branch from ea0c1a9 to 9f5dd8f Compare July 27, 2020 08:43
@abonander abonander changed the title patch nullable inference in Postgres using EXPLAIN (BREAKING) patch nullable inference in Postgres using EXPLAIN Jul 27, 2020
@abonander
abonander force-pushed the ab/postgres-nullable branch from 9f5dd8f to 67d6cb4 Compare July 27, 2020 08:59
@abonander abonander added this to the 0.5 milestone Jul 27, 2020
@abonander
abonander force-pushed the ab/postgres-nullable branch 3 times, most recently from bd750bb to ffba4b6 Compare July 27, 2020 09:17
@abonander abonander changed the title (BREAKING) patch nullable inference in Postgres using EXPLAIN (BREAKING: 0.5) patch nullable inference in Postgres using EXPLAIN Jul 27, 2020
@abonander
abonander changed the base branch from master to release/0.5 July 27, 2020 20:01
@abonander
abonander force-pushed the ab/postgres-nullable branch from ffba4b6 to 9ef7d1b Compare July 27, 2020 20:01
BREAKING CHANGE: some columns in `query!()` et. al. output will change from `T` to `Option<T>`

breakage should be minimal in practice as
these columns will need to have been manually
overridden anyway to avoid runtime errors

Signed-off-by: Austin Bonander <austin@launchbadge.com>
@abonander
abonander force-pushed the ab/postgres-nullable branch from 9ef7d1b to 711a24c Compare July 27, 2020 20:03
@abonander
abonander marked this pull request as ready for review July 27, 2020 20:03
@abonander
abonander merged commit 0a396e2 into release/0.5 Sep 9, 2020
@abonander
abonander deleted the ab/postgres-nullable branch September 9, 2020 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant