for (Node node : db.getAllNodes()) for (Relationship rel : 
node.getRelationships(Direction.OUTGOING)) {
   // your code here
}

Michael

Am 22.07.2011 um 23:40 schrieb John cyuczieekc:

> How would I go about getting all relationships in the entire database ?
> (with neo4j embedded)
> I see there is an db.getAllNodes() for nodes
> is there something similar for relationships?
> 
> On Wed, Jul 20, 2011 at 7:13 PM, cyuczi eekc <cyuczie...@gmail.com> wrote:
> 
>> Is there a way to get the number of relationships without having to iterate
>> through (and count++) them?
>> ie. rels=firstNode.getRelationships();
>>    rels.size(); //doesn't actually exist
>> 
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to