I guess I was hoping it(size/count) was cached in the database or the
underlaying database would provide this somehow, ie. in berkeleydb (java
edition) there's a cursor.count() I could use (though I don't know how they
did it implementation-wise)

Thanks! I needed to know that.

On Wed, Jul 20, 2011 at 8:37 PM, Jim Webber <[email protected]> wrote:

> Hi,
>
> Responses from calling the Neo4j APIs are typically lazy, for performance
> reasons. So there's no way of eagerly counting the number of relationships
> unless you force eager evaluation as you've suggested below.
>
> Jim
>
> On 20 Jul 2011, at 11:13, cyuczi eekc 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
> > [email protected]
> > https://lists.neo4j.org/mailman/listinfo/user
>
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to