cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cypher Style Guide: SET

jsmccrumb
Graph Buddy

I was looking over the style guide to see if there were recommendations about spacing.

I noticed in https://neo4j.com/developer/cypher-style-guide/#indent-line-break that ON CREATE SET and ON MATCH SET are indented, but no mention of just plain SET

Down below at https://neo4j.com/developer/cypher-style-guide/#cypher-null-boolean there is a case of an indented SET - does this mean it is recommended to indent SET or is it indented for another reason? Just curious.

3 REPLIES 3

I recommend indenting SET as it goes with the previous clause.

For your development, the important point is that you are consistent with your indentation and it sounds like you are aiming for that which is great!

Elaine

ON MATCH SET and ON CREATE SET can only be associated with a preceding MERGE, so the indentation was likely made because of that.

jsmccrumb
Graph Buddy

The ON CREATE SET and ON MATCH SET make sense to me, I am inclined to think SET by itself should not be indented and the link further down the page either did not intend to indent the SET or was indenting it as a sort of "subclause" of the WHERE clause (though this doesn't quite make sense to me). I was just curious what sort of thoughts would come trickling in, thanks for your responses!