jrgemignani commented on issue #1555:
URL: https://github.com/apache/age/issues/1555#issuecomment-1928551371

   @MatheusFarias03 I'm not sure why you want to use this query. You are 
essentially calling cypher to find the items and then using SQL to get the ones 
with 'Vegano' in the name.
   
   ```
   -- With Cypher syntax.
   WITH graph_query as (
       SELECT * FROM cypher('TestGraph', $$
           MATCH ()-[E:OFFERS]->(P:Product)
           RETURN P.name, E.price ORDER BY P.name, E.price
       $$) AS (product agtype, price agtype)
   ) 
   SELECT * FROM graph_query 
   WHERE graph_query.product::text LIKE '%Vegano%';
   ```
   
   Something like the following should work just the same, but without the 
wrapping SQL -
   
   ```
   SELECT * FROM cypher('TestGraph', $$
           MATCH ()-[E:OFFERS]->(P:Product)
           WHERE P.name =~ 'Vegano'
           RETURN P.name, E.price ORDER BY P.name, E.price
       $$) AS (product agtype, price agtype)
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to