[−][src]Constant places::storage::bookmarks::RAW_BOOKMARK_SQL
const RAW_BOOKMARK_SQL: &str = "
SELECT
b.guid,
p.guid AS parentGuid,
b.position,
b.dateAdded,
b.lastModified,
b.type,
-- Note we return null for titles with an empty string.
NULLIF(b.title, '') AS title,
h.url AS url,
b.id AS _id,
b.parent AS _parentId,
(SELECT count(*) FROM moz_bookmarks WHERE parent = b.id) AS _childCount,
p.parent AS _grandParentId,
b.syncStatus AS _syncStatus,
-- the columns below don't appear in the desktop query
b.fk,
b.syncChangeCounter
FROM moz_bookmarks b
LEFT JOIN moz_bookmarks p ON p.id = b.parent
LEFT JOIN moz_places h ON h.id = b.fk
";sql is based on fetchBookmark() in Desktop's Bookmarks.jsm, with 'fk' added and title's NULLIF handling.