prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
583 stars 61 forks source link

fix(pg): json extraction works with json cols too #323

Closed Weakky closed 2 years ago

Weakky commented 2 years ago

Overview

Related to https://github.com/prisma/prisma/issues/8977

Prior to this fix, json extraction was only working with columns of type jsonb. We now always cast the result of the JSON extraction to ::jsonb.

Also, I've refactored the JSON filtering tests so that they test Postgres for both a column of type jsonb and json.