-
Notifications
You must be signed in to change notification settings - Fork 124
Add qs serialization functionality, supporting encoding of filters and query parameters #204
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
Conversation
…d query parameters
|
Could you expand a little? It's not clear to me what the use-case is. When do you have a parsed query and want to reserialize it? It's missing because the server only ever parses user-provided queries. |
|
For example, to dynamically append some filtering conditions |
Who would do this? For example, are you thinking of some sort of axum middleware? Are you trying to implement your own APIs using rust WSAM and want to use the same filter syntax? |
|
Yes, I hope to implement a set of RBAC data permission filtering and retain the underlying filter support of Trailbase Or to put it another way, my RBAC is built upon the Trailbase filtering layer, but currently, I can only implement it through the filter method. If there is a better API format, I will abandon this option This is the advantage of Trailbase; otherwise, directly connecting to SQLite without any additional layers would be very troublesome However, I would not choose Axum middleware |
…tom request headers
ignatz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A non-issue, merely playing devil's advocate: all proposed trailbase-qs changes could be implemented externally, since all the relevant members/types are public.
Independently, the crate currently depends on rusqlite (simply to piggy-back onto its value types), which isn't great for a library that is supposed to be used in a WASM guest.
…uctures, and simplifying request processing logic
|
To be mindful of your time and minimize churn, I added the Query serialization in (974e8c5 - basically your change rebased minus the wasm guest changes - Thanks 🙏 ) and (af87a2f - cleaning up a little, reducing API surface and maybe most importantly for your use-case removing the rusqlite dependency.). We could add the the Would you consider the current state workable? I can release a trailbase-qs crate. |
|
I think this is great |
|
Sweet. Just released trailbase-qs v0.1.1 - Thanks 🙏 |
This change is a missed addition. Using serialization and deserialization when intercepting query strings can be very helpful.
If possible, please push the new version of
trailbase-qstocrates.ioafter merging