Skip to content

Row.try_get() should check the decoding type against the type reported by the server #8

Description

@abonander

If there is a schema mismatch between when query!()'s checks were run and when the query is actually executed, we can have unexpected (but still technically safe) behavior in most of our Decode impls due to various assumptions (#7).

Since Postgres and MySQL both report to us the data types in the result, we should check that the type we've been asked to decode matches via <DB as HasSqlType<T>>::metadata().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions