The problem is that I do not know the query. All I want is to implement a 
method, which will accept (as a parameter) any Cypher query and will add 
clause (such as WHERE NOT) that will execute the same query but will also 
ignore all nodes and relationships which are labelled as “_META_DATA”. So I 
would be looking for such filter that will ignore these meta nodes and 
relationships independently on the rest of the cypher query. Something like 
WHERE NOT nodes.label=‘_META_DATA’ and relationships.label=‘_META_DATA’. In 
the example you proposed: MATCH (a)-[]-(b)-[]-(c)-[]-(a) WHERE NOT 
(a)-[:_META_DATA]-(b)-[:_META_DATA]-(c)-[:_META_DATA]-(a) WHERE clause is 
dependent on MATCH clause, so to create a general method to add WHERE 
clause to any cypher query, I would need to parse MATCH pattern first.

Dne středa 4. března 2015 15:31:25 UTC+1 Mahesh Lal napsal(a):
>
> Assuming that you have the "type" of relationship labelled as "_META_DATA" 
> you could use 
> WHERE NOT (a)-[:_META_DATA]-(b)-[:_META_DATA]-(c)-[:_META_DATA]-(a)
>
>
> -- Thanks and Regards
>    Mahesh Lal
>
>  
> On 4 March 2015 at 17:40, Jaroslav Ramba <[email protected] <javascript:>> 
> wrote:
>
>> Ho,
>>
>> Let say I have couple nodes and relationships that I want to be hidden. 
>> It means when I query something, those will never be in the result. They 
>> are not supposed to be part or real data that I have in the database. I 
>> know there is no such thing like metadata implemented in Neo4j, but is 
>> there any way to avoid it?
>>
>> This is what I have in mind. I would label those nodes and relationships 
>> with something like “_META_DATA”. Then I would receive user’s cypher query 
>> - for example:
>>
>> MATCH (a)-[]-(b)-[]-(c)-[]-(a) RETURN a,b,c
>>
>> and I would like to add “ignore all nodes and relationships that are 
>> labeled with “_META_DATA” so the cypher query would actually ignore those. 
>> So I would be looking for something like WHERE every_node and 
>> every_relationship NOT labeled “_META_DATA”.
>>
>> Is there any way to solve this problem?
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to