Comment 42 for bug 1672139

Revision history for this message
In , Fluks-github (fluks-github) wrote :

I would like this feature too, it would be useful when you search bookmarks and you wonder in what folder a bookmark is.

In a bug related to this, someone was thinking about efficiency. Does it matter if you add a button or a context menu item, then finding the path needs to be done only for that one bookmark when the user requests it. SQLite has had `WITH RECURSIVE` since 3.8.3, so you don't have to do recursion in code anymore.

```
$ time sqlite3 places.sqlite <<<"with recursive tmp(id, parent, title) as (values(0, 19006, '') union all select moz_bookmarks.id, moz_bookmarks.parent, moz_bookmarks.title from moz_bookmarks, tmp where moz_bookmarks.id=tmp.parent) select * from tmp;"
id parent title
---------- ---------- ----------
0 19006
19006 9625 Bugs
9625 250 Firefox De
250 168 Firefox
168 12 Koodaus
12 2 ATK
2 1 menu
1 0

real 0m0.004s
user 0m0.000s
sys 0m0.004s
```
I have 10568 bookmarks in this file.