waleedahmed0001 commented on issue #993:
URL: https://github.com/apache/age/issues/993#issuecomment-1595697806

   The syntax of exist clause is mentioned below:
   
   **Syntax:**
   exists(property)
   
   Returns:
   An agtype boolean
   
   Arguments:
   property | A property from a vertex or edge
   
   A query using the exist is mentioned below:
   
   ```
   SELECT *
   FROM cypher('graph_name', $$
        MATCH (n)
        WHERE exists(n.surname)
        RETURN n.first_name, n.last_name
   $$) as (first_name agtype, last_name agtype);
   ```
   
   **Exists(Path)**
   EXISTS(path) returns true if for the given path, there already exists the 
given path.
   
   ```
   SELECT *
   FROM cypher('graph_name', $$
        MATCH (n)
        WHERE exists((n)-[]-({name: 'Willem Defoe'}))
        RETURN n.full_name
   $$) as (full_name agtype);
   ```
   
   You can get more help from this 
[documentation](https://age.apache.org/age-manual/master/functions/predicate_functions.html#exists-path)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to