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

feat(filtering): Bump FirestoreStorage dependency and enable Firestore Filter capabilities #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WianSnyman
Copy link

Changes

  • @google/firebase-storage needed a bump to at least 7.8.0 to fix this issue
  • Firestore now allows Filter queries, such as Filter.or and Filter.and capabilities. The Abstract classes were updated to accommodate these updates

abstract execute(): R;

where(prop: WhereProp<T>, op: Op, value: any) {
return this.applyWhere(this.getWhereProp(prop), op, value);
where(propOrFilter: WhereProp<T> | Filter, op?: Op, value?: any) {
Copy link
Member

Choose a reason for hiding this comment

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

The firestore-storage-core package is also used in frontend applications. Is it possible to move that implementation to the storage package?

Copy link
Author

Choose a reason for hiding this comment

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

Just copying it as is into the storage package?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it works, if you override the where method into the storage package

@@ -41,7 +41,8 @@
"dependencies": {
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
"ts-object-path": "^0.1.2"
"ts-object-path": "^0.1.2",
"@google-cloud/firestore": "^7.11.0"
Copy link
Member

Choose a reason for hiding this comment

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

That dependency would not work in the browser

Copy link
Author

Choose a reason for hiding this comment

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

Damn - Forgot about web. A generic "Filter" class or type can be made instead of relying on the type from this import.

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.

Bump "@google-cloud/firestore": "^6.5.0" to "^7.8.0"
2 participants