Skip to content

Add bundle.proto d.ts and introduce IDB object stores for bundles. #3073

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

Merged
merged 6 commits into from
May 21, 2020

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented May 15, 2020

No description provided.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 15, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (94ee69a) Head (c0e8e84) Diff
    browser 250 kB 250 kB +435 B (+0.2%)
    esm2017 194 kB 195 kB +422 B (+0.2%)
    main 491 kB 492 kB +860 B (+0.2%)
    module 248 kB 248 kB +420 B (+0.2%)
  • firebase

    Type Base (94ee69a) Head (c0e8e84) Diff
    firebase-firestore.js 288 kB 289 kB +385 B (+0.1%)
    firebase.js 822 kB 822 kB +386 B (+0.0%)

Test Logs

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

LGTM. Can you add serialization logic to LocalSerializer and write tests to verify your schema? This can be done in follow up

option objc_class_prefix = "FSTPB";
option php_namespace = "Firestore\\Proto";

// Encodes a query saved in the bundle.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: s/Encodes/Describes

Optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

// `BundleElement`.
// Only one `BundleMetadata` is expected, and it should be the first element.
// The named queries follow after `metadata`. Every `document_metadata` is
// immediately followed by a `document`.
Copy link
Contributor

Choose a reason for hiding this comment

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

The last part is not true anymore, is it? We skip document data for non-existing documents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Contributor Author

@wu-hui wu-hui left a comment

Choose a reason for hiding this comment

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

Thank you! Will add more tests when we have serialization logic.

option objc_class_prefix = "FSTPB";
option php_namespace = "Firestore\\Proto";

// Encodes a query saved in the bundle.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

// `BundleElement`.
// Only one `BundleMetadata` is expected, and it should be the first element.
// The named queries follow after `metadata`. Every `document_metadata` is
// immediately followed by a `document`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@wu-hui wu-hui merged commit af7e8eb into wuandy/Bundles May 21, 2020
wu-hui added a commit that referenced this pull request May 21, 2020
…3073)

* Manual copy proto and create bundle_proto.d.ts

* IndexedDb schema change to introduce bundle object stores.

* Renaming interfaces without leading I

* Reordering imports

* Address comments

* Add totalBytes and totalDocuments
@firebase firebase locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants