Next, we can combine multiple types of start bits more easily:
foo = nodeRef,
bar = otherNodeRef,
books = Node.ByIndexQuery("books", "author:Mike"),
all = All.Nodes
Equivalent code in the old format is much less readable:
new CypherStartBit("foo", nodeRef),
new CypherStartBit("bar", otherNodeRef),
new CypherStartBitWithNodeIndexLookupWithSingleParameter("books", "books", "author:mike"),
new RawCypherStartBit("all", "node(*)")
This update also exposes Relationship.ByIndexLookup and Relationship.ByIndexQuery, for which there were no previous equivalents.
Custom Start Bits
In the case where we still don't support a specific bit for some reason, you can now just supply a string:
The basic Start("foo", nodeRef) and Start("foo", relRef) overloads have not been marked as obsolete due to the amount of unnecessary migration work such a change would create. They should be avoided for new code though, so you can avoid the magic strings and make it easier to add new start bits to your query in the future.
Specific methods like StartWithNodeIndexLookup and Start(string identity, string startText) have been marked as obsolete. You should migrate off these immediately.
CypherStartBit, CypherStartBitWithNodeIndexLookup, CypherStartBitWithNodeIndexLookupWithSingleParameter and RawCypherStartBit have been marked as obsolete. You should migrate off these immediately.
ICypherStartBit has been marked as obsolete. It is unlikely that you would have touched this interface directly. If you have, then you probably need to migrate your code to use StartBit instead. See the implementation of Node.ByIndexLookup for an example of how.