Skip to content

Conversation

@a876691666
Copy link
Contributor

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-qs to crates.io after merging

@ignatz
Copy link
Contributor

ignatz commented Dec 30, 2025

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.

@a876691666
Copy link
Contributor Author

For example, to dynamically append some filtering conditions

@ignatz
Copy link
Contributor

ignatz commented Dec 30, 2025

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?

@a876691666
Copy link
Contributor Author

a876691666 commented Dec 30, 2025

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

Copy link
Contributor

@ignatz ignatz left a 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.

@ignatz
Copy link
Contributor

ignatz commented Jan 2, 2026

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 post function separately (arguably consistent with get), however none of this should be blocking.

Would you consider the current state workable? I can release a trailbase-qs crate.

@a876691666
Copy link
Contributor Author

I think this is great
Let's release a version😊

@ignatz
Copy link
Contributor

ignatz commented Jan 5, 2026

Sweet. Just released trailbase-qs v0.1.1 - Thanks 🙏

@ignatz ignatz closed this Jan 5, 2026
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.

2 participants