Re: [Neo4j] Cypher syntax feedback wanted

2011-11-28 Thread Andres Taylor
On Fri, Oct 28, 2011 at 12:57 PM, Andres Taylor <
andres.tay...@neotechnology.com> wrote:

> Hi all!
>
> I'm looking to make Cypher more consistent, and so less surprising. Cypher
> today has two places where predicates are used, the WHERE clause, and for
> the ALL/ANY/NONE/SINGLE functions.
>
> It looks like:
>
> WHERE 
> ALL( in  : )
>

If anyone is curious - I've
changedthe
syntax now, so it's WHERE and not a colon.

ALL( in  WHERE )

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher syntax feedback wanted

2011-11-04 Thread Andres Taylor
On Fri, Nov 4, 2011 at 7:11 AM, KanTube  wrote:

> i am just a little confused on this.  are you going to still keep the
> syntax
> with a ":" for relationship ie.
>
> START n=node(3)
> MATCH (n)-[:BLOCKS]->(x)
> RETURN x
>
> and then if you wanted to have a more complex match you would do something
> like
>
> START n=node(3)
> MATCH (n)-[r : WHERE BLOCKS && r.someprop = 'somevalue']->(x)
> RETURN x
>

No, this is in addition to the relationship type specification. You query
would look like:

START n=node(3)
MATCH (n)-[r:BLOCKS WHERE r.someprop = 'somevalue']->(x)
RETURN x

But this is semantically equivalent to checking someprop in the WHERE
clause. Having a WHERE inside of the relationship brackets is
only necessary for optional relationships - in all other cases it is
preferable to put the predicate in the WHERE clause.

Does that make sense?

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher syntax feedback wanted

2011-11-03 Thread KanTube
i am just a little confused on this.  are you going to still keep the syntax
with a ":" for relationship ie.

START n=node(3)
MATCH (n)-[:BLOCKS]->(x)
RETURN x

and then if you wanted to have a more complex match you would do something
like

START n=node(3)
MATCH (n)-[r : WHERE BLOCKS && r.someprop = 'somevalue']->(x)
RETURN x

if this is the case i like the WHERE because it will help me know how to
parse the code for my C# wrapper.  

if you are planning on removing the ":" in all cases how would the first
query look?



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-syntax-feedback-wanted-tp3460651p3479337.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher syntax feedback wanted

2011-10-31 Thread Mattias Persson
2011/10/28 Andres Taylor 

> Hi all!
>
> I'm looking to make Cypher more consistent, and so less surprising. Cypher
> today has two places where predicates are used, the WHERE clause, and for
> the ALL/ANY/NONE/SINGLE functions.
>
> It looks like:
>
> WHERE 
> ALL( in  : )
> etc
>
> Any progress on this? My first feel is that it's too program-language:y
but don't really know how to make it great.


> Now I'm thinking about adding preciates to the MATCH clause, e.g: MATCH
> a-[r? : ]->b
> This is only interesting for optional relationships - if the predicate is
> false, r will be null. If this predicate was in the WHERE clause, it would
> filter out the whole subgraph instead, which is very different.
>
> Looking at this example, the colon bothers me. It's too close to the
> relationship type. So, I'm thinking of changing it to:
> WHERE 
> ALL( in  WHERE )
> MATCH a-[r? WHERE ]->b
>
> What do you think?
>
> Andrés
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Cypher syntax feedback wanted

2011-10-28 Thread Andres Taylor
Hi all!

I'm looking to make Cypher more consistent, and so less surprising. Cypher
today has two places where predicates are used, the WHERE clause, and for
the ALL/ANY/NONE/SINGLE functions.

It looks like:

WHERE 
ALL( in  : )
etc

Now I'm thinking about adding preciates to the MATCH clause, e.g: MATCH
a-[r? : ]->b
This is only interesting for optional relationships - if the predicate is
false, r will be null. If this predicate was in the WHERE clause, it would
filter out the whole subgraph instead, which is very different.

Looking at this example, the colon bothers me. It's too close to the
relationship type. So, I'm thinking of changing it to:
WHERE 
ALL( in  WHERE )
MATCH a-[r? WHERE ]->b

What do you think?

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user