[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-rdf
Subject:    Request for nsIRDFDataSource-->AssertUnique API
From:       "Dan Lange" <dlange02 () harris ! com>
Date:       2001-06-26 22:27:01
[Download RAW message or body]

Most of the time when I use nsIRDFDataSource-->Assert(A,B,C), what I
actually want to do is:
    Unassert all arcs in the datasource with source=A and property=B.
    Then assert (A,B,C)

It seems to me that a lot of people would have code that performs this kind
of task.  It's not that difficult to code this up, but I think that it would
be helpful to have a convenience function
nsIRDFDataSource-->AssertUnique(A,B,C)
to do this.
Asserting two arcs with the same property has different results in different
places.  For container arcs, XUL displays the old value.  For literals, it
displays the new one.  For this reason, I think that it is especially
important that it is easy to make sure that there is just one arc for each
(source, property) pair.

The function nsIRDFDataSource-->Change(A,B,D,C) almost does what I want, but
not quite, since it only deletes one arc and you need to look it up first.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic