-
Notifications
You must be signed in to change notification settings - Fork 157
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
Encoder is no longer accessible? #604
Comments
It was indeed removed from the public facing api. I guess we never considered adding encoding support for where clauses. My proposal would be to add support for it to the framework. Of course, that doesnt solve oyur issue yet. There's two things you can do right now to proceed.
query
.where { "time" greaterThan PrimitiveFirebaseEncoder.encodeToAny(time) } do query
.where { "time" greaterThan time.asPrimitive } where
|
Hmm, I really wanted to use the Also do I understand correctly, that the second approach does mean doing And btw, do you have any plans to support this use case in a more complete manner? |
I'm actually working on a feature to pass the serializer to the where clause. That should resolve it in a cleaner way. Just needs to write some tests and ids good to go. EDIT: And yes, the second solution means implementing that indeed. Again, I do not recommend it as that module is not intended for public use and may change at any time, but since this fix wont be there in a day, it does unblock you for now. |
Cool, that would be super nice.
Yeah, I will probably go for the first approach for those reasons, I was just curious about other options. |
Yes, it looks super promising. It is also much cleaner than my solution with the public encoder. Thank you, Im looking forward to it. |
I was using the firebase encoder to encode a single values to be used in where statements. It was not flawless because the encoder ignored my
@Serializable(with = ...)
for some reason, but it worked really well.But now the
encode
&firebaseSerializer
methods have been made internal, so I can't use them anymore. And I struggle to find any alternatives. Why is this functionality internal all of the sudden? Does this mean I am just screwed now?My use case:
Usage:
The text was updated successfully, but these errors were encountered: