Skip to content

Implement graph support through WITH clauses

Carlos Garnacho requested to merge wip/carlosg/graphs-through-with into master

With the refurbishing of graph support in master, Tracker started creating temporary views on every TrackerDBInterface, used on queries to the default union graph. This MR changes all that so that queries to the union graph are figured out in place, creating subqueries through the WITH clause that we can poke similarly.

This has some benefits:

  • This was made so we stop relying on FTS virtual table contents being accessible across joins (which simply happened to work on some cases). This effectively fixes #142 (closed)
  • We avoid a bunch of busy work on TrackerDBInitialization, presumably to little loss as temporary views are essentially precompiled subqueries.
  • We can drop some hacks that were only necessary because sqlite dropped indexes across queries to a view.

Closes: #142 (closed)

Merge request reports