Method: Valkyrie::Persistence::Postgres::QueryService#find_inverse_references_query

Defined in:
lib/valkyrie/persistence/postgres/query_service.rb

#find_inverse_references_queryString

Generate the SQL query for retrieving member resources in PostgreSQL using a

JSON object literal as an argument (e. g. { "alternate_ids": [{"id": "d6e88f80-41b3-4dbf-a2a0-cd79e20f6d10"}] }).

This uses JSON functions in order to retrieve JSON property values



181
182
183
184
185
186
# File 'lib/valkyrie/persistence/postgres/query_service.rb', line 181

def find_inverse_references_query
  <<-SQL
    SELECT * FROM orm_resources WHERE
    metadata @> ?
  SQL
end