Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fennec bookmarks import #1595

Merged
merged 1 commit into from Aug 22, 2019
Merged

Fennec bookmarks import #1595

merged 1 commit into from Aug 22, 2019

Conversation

eoger
Copy link
Contributor

@eoger eoger commented Aug 13, 2019

Fixes #1463.

Copy link
Contributor

@linabutler linabutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks, @eoger! Do you think we can drop the staging table?

scope.err_if_interrupted()?;

log::debug!("Creating staging table");
conn.execute_batch(&CREATE_STAGING_TABLE)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm curious why we need the staging table. Can we insert directly from fennec.bookmarks into moz_bookmarks_synced and moz_bookmarks_synced_structure? We'd need to do two passes, one to insert items into moz_bookmarks_synced and the other to insert structure into moz_bookmarks_synced_structure, but, IIUC, we already need to do two passes over the staging table, anyway?

We'd need to validate and insert fennec.bookmarks.url into moz_places first, then associate those URLs with bookmark items. (For invalid URLs, we can set the validity column in moz_bookmarks_synced to Replace, and Dogear will take care of deleting it).

components/places/src/import/fennec_bookmarks.rs Outdated Show resolved Hide resolved
components/places/src/import/fennec_bookmarks.rs Outdated Show resolved Hide resolved
components/places/src/import/fennec_bookmarks.rs Outdated Show resolved Hide resolved
@eoger eoger merged commit a2cc674 into master Aug 22, 2019
@eoger eoger deleted the fennec-bookmarks-import branch August 22, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Fennec bookmarks import code
2 participants