Add a way to query only a specific class - and NOT sub classes

Bug #884193 reported by Mikkel Kamstrup Erlandsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Low
Siegfried Gevatter
libzeitgeist
Invalid
Undecided
Unassigned

Bug Description

The problem is that nfo:FileDataObject (which we use as manifestation for all files) has subclasses nfo:RemoteDataObject and nfo:EmbeddedFileDataObject which we may not be interested in querying for (at least, we're not in Unity). In Unity we qualify our queries by restricting them to also have subject prefix "file:*".

Not only does this feel slightly hackish, but it is also slower since the indexes are used less effectively. I propose adding a new modifier "+" to the manifestation and interpretation (for both event and subject) that signifies that the field must be matched exactly, without subtype expansion.

ie:

  Event.new_for_values (manifestation=FILE_DATA_OBJECT)

matches also remote- and embedded objects, while prepending a "+" forces the matching to be strict:

  Event.new_for_values (manifestation="+"+FILE_DATA_OBJECT)

Related branches

Changed in zeitgeist:
assignee: nobody → Siegfried Gevatter (rainct)
status: New → In Progress
Revision history for this message
Siegfried Gevatter (rainct) wrote :
Changed in zeitgeist:
assignee: Siegfried Gevatter (rainct) → nobody
status: In Progress → Triaged
milestone: none → 0.9.1
Changed in zeitgeist:
milestone: 0.9.1 → 0.9.0
Changed in zeitgeist:
status: Triaged → Fix Committed
Seif Lotfy (seif)
Changed in zeitgeist:
assignee: nobody → Siegfried Gevatter (rainct)
importance: Undecided → Low
Seif Lotfy (seif)
Changed in zeitgeist:
status: Fix Committed → Fix Released
Revision history for this message
Siegfried Gevatter (rainct) wrote :

This doesn't need any changes in libzeitgeist, does it?

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote : Re: [Bug 884193] Re: Add a way to query only a specific class - and NOT sub classes

On 2 February 2012 12:49, Siegfried Gevatter <email address hidden> wrote:
> This doesn't need any changes in libzeitgeist, does it?

Not that I am aware of. It'll just be callers changing the strings
they pass for event/subject attributes. So no API changes.

Revision history for this message
Siegfried Gevatter (rainct) wrote :

I'm closing the libzeitgeist task then.

Changed in libzeitgeist:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.