i think i prefer catching the missing index. we do that somewhere else i
believe


On 25 April 2013 15:12, Jan-Klaas Kollhof <notifications@github.com> wrote:

> In kaiso/persistence.py:
>
> > -        if issubclass(cls, Relationship):
> > -            node_or_rel = self._conn.get_indexed_relationship(
> > -                index_name, key, value)
> > +
> > +        query_args = {}
> > +
> > +        indexes = index_filter.items()
> > +        if len(indexes) == 0:
> > +            return None
> > +
> > +        if issubclass(cls, (Relationship, PersistableMeta)):
> > +            idx_name = get_index_name(cls)
> > +            idx_key, idx_value = indexes[0]
> > +
> > +            if issubclass(cls, Relationship):
> > +                self._conn.get_or_create_index(neo4j.Relationship, idx_name)
>
> index creation is unfortunately something we have to do lazily, it is just
> the index that gets created no nodes/rels are added, another option would
> be to catch the missing index exception
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/onefinestay/kaiso/pull/31/files#r3957834>
> .
>



-- 

David Szotten

onefinestay


david.szotten@onefinestay.com


5, St John's Lane
London EC1M 4BH