Method: Valkyrie::Persistence::Postgres::QueryService#find_inverse_references_with_type_query
- Defined in:
- lib/valkyrie/persistence/postgres/query_service.rb
#find_inverse_references_with_type_query ⇒ String
Generate the SQL query for retrieving member resources in PostgreSQL using a
JSON object literal (e. g. { "alternate_ids": [{"id": "d6e88f80-41b3-4dbf-a2a0-cd79e20f6d10"}] }).
and resource type as arguments
This uses JSON functions in order to retrieve JSON property values
195 196 197 198 199 200 201 |
# File 'lib/valkyrie/persistence/postgres/query_service.rb', line 195 def find_inverse_references_with_type_query <<-SQL SELECT * FROM orm_resources WHERE metadata @> ? AND internal_resource = ? SQL end |