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

Add support for .stream of a query (QueryReference) #122

Open
penguisnt opened this issue Aug 10, 2023 · 6 comments
Open

Add support for .stream of a query (QueryReference) #122

penguisnt opened this issue Aug 10, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@penguisnt
Copy link

Currently, there is only .stream support for CollectionReference.stream and DocumentReference.stream, but if you put a query clause and get a QueryReference, it does not contain a .stream method to observe the query.

@cachapa cachapa added the enhancement New feature or request label Aug 11, 2023
@cachapa
Copy link
Owner

cachapa commented Aug 11, 2023

If I remember correctly this is because at the time it wasn't possible to watch queries.

Is it possible now with the official SDK? If so, then it might make sense to regenerate the RPC code with the latest protobuffs and see if the methods are available.

Unfortunately I'm not able to do that myself, but would be happy to accept contributions.

@ogtechdevs
Copy link

Ouvir -- rpc Listen(ListenRequest) returns (ListenResponse)Ouve as mudanças. Este método está disponível apenas via gRPC ou WebChannel (não REST).Escopos de autorizaçãoRequer um dos seguintes escopos de OAuth:https://www.googleapis.com/auth/datastorehttps://www.googleapis.com/auth/cloud-platformPara saber mais, consulte a Visão geral da autenticação. Ouvir rpc Listen([ListenRequest](https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1?hl=pt-br#google.firestore.v1.ListenRequest)) returns ([ListenResponse](https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1?hl=pt-br#google.firestore.v1.ListenResponse))

Ouve as mudanças. Este método está disponível apenas via gRPC ou WebChannel (não REST).

Escopos de autorização
Requer um dos seguintes escopos de OAuth:

https://www.googleapis.com/auth/datastore
https://www.googleapis.com/auth/cloud-platform
Para saber mais, consulte a Visão geral da autenticação.

@ogtechdevs
Copy link

@cachapa
Copy link
Owner

cachapa commented Apr 8, 2024

The RPC stubs have been recently regenerated from the latest versions, so they may already be available in the project.

If that's the case, then it would be a simple plumbing issue. Contributions are, as always, welcome :-)

@ogtechdevs
Copy link

Whats the problem to build the stream document().snapshot(); ?

I want know how current step to help with some contribuitions.

How we can do some contribuition?

@cachapa
Copy link
Owner

cachapa commented Apr 8, 2024

You might start by copying the query method and try to get the new one to return a Stream: https://github.com/cachapa/firedart/blob/master/lib/firestore/firestore_gateway.dart#L141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants