Closed
Bug 388695
Opened 17 years ago
Closed 17 years ago
getBookmarkIdsForURI should sort by relevance
Categories
(Firefox :: Bookmarks & History, defect, P2)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha7
People
(Reporter: asaf, Assigned: asaf)
References
Details
Attachments
(1 file, 3 obsolete files)
13.98 KB,
patch
|
sayrer
:
review+
|
Details | Diff | Splinter Review |
getBookmarkIdsForURI should sort by relevance.
For the time being, this means sorting by last-modified or date-added (descending)
Attachment #272873 -
Flags: review?(dietrich)
Assignee | ||
Updated•17 years ago
|
Attachment #272873 -
Attachment is patch: true
Attachment #272873 -
Attachment mime type: application/octet-stream → text/plain
Updated•17 years ago
|
Attachment #272873 -
Flags: review?(dietrich) → review+
Comment 1•17 years ago
|
||
you could do something like this:
select id, max(recent) from (select id, lastModified as recent from moz_bookmarks UNION select id, dateAdded as recent from moz_bookmarks order by 2 DESC)
Assignee | ||
Comment 2•17 years ago
|
||
you'd think sql maps NULL to 0 when comparing, you'd.
Attachment #272873 -
Attachment is obsolete: true
Assignee | ||
Updated•17 years ago
|
Attachment #272891 -
Flags: review?(dietrich)
Updated•17 years ago
|
Attachment #272891 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 3•17 years ago
|
||
mozilla/toolkit/components/places/src/nsNavBookmarks.cpp 1.110
mozilla/toolkit/components/places/tests/bookmarks/test_bookmarks.js 1.31
mozilla/toolkit/components/places/tests/unit/test_tagging.js 1.2
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•17 years ago
|
||
Assignee | ||
Comment 5•17 years ago
|
||
backed-out, these tinderboxes still know nothing about date & time.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•17 years ago
|
||
imho if you need only to get ids you could put the max into order by clause:
SELECT b.id
FROM moz_bookmarks b
JOIN moz_places p ON b.fk = p.id
WHERE p.url = ?1
AND b.type = ?2
ORDER BY MAX(COALESCE(b.lastModified, 0), b.dateAdded) DESC
this should have less memory usage on results
Assignee | ||
Comment 7•17 years ago
|
||
* comment 6
* timeout-based tests for this method, so it passes on the VMs.
* use sort() otherwise in tests
* making getTagsForURI return a sorted list
Attachment #272891 -
Attachment is obsolete: true
Attachment #272902 -
Attachment is obsolete: true
Attachment #273340 -
Flags: review?(sayrer)
Assignee | ||
Updated•17 years ago
|
Status: REOPENED → ASSIGNED
Updated•17 years ago
|
Attachment #273340 -
Flags: review?(sayrer) → review+
Assignee | ||
Comment 8•17 years ago
|
||
mozilla/browser/components/places/tests/unit/test_placesTxn.js 1.4
mozilla/toolkit/components/places/public/nsITaggingService.idl 1.2
mozilla/toolkit/components/places/src/nsNavBookmarks.cpp 1.112
mozilla/toolkit/components/places/src/nsTaggingService.js 1.2
mozilla/toolkit/components/places/tests/bookmarks/test_388695.js
initial revision: 1.1
mozilla/toolkit/components/places/tests/bookmarks/test_bookmarks.js 1.34
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 17 years ago
Flags: in-testsuite+
Flags: blocking1.8.1.6?
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.8.1.6?
Comment 9•15 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•