watermarkchurch / wcc-contentful

An alternative to Contentful's contentful.rb ruby client, contentful_model, and contentful_rails gems all in one.
MIT License
2 stars 1 forks source link

Postgres store can't do `find_by` equality check on numeric values #242

Closed gburgett closed 3 years ago

gburgett commented 3 years ago

Postgres store casts numeric values to ::text in the _eq query

# lib/wcc/contentful/store/postgres_store.rb
      def _eq(path, expected, params)
        ...

        " AND t.data->#{quote_parameter_path(path)}" \
          " ? $#{push_param(expected, params)}::text"
      end

This causes a find_by against a numeric value to never match.