Repository navigation
SDK should provide a native query builder #12154
Replies: 4 comments
|
Moving to features since this is a cross SDK feature ask, nothing specific to the Go SDK |
|
While it can be implemented in every SDK, it's not particularly a cross-SDK ask because we just need methods to build strings. But to be fair, I use the Golang so I only care that it's present there. If other SDKs want it, separate discussion. I have open-sourced my implementation of this here - https://github.com/OpeOnikute/temporal-go-querybuilder. It was trivial to write. If it makes sense, I can try to make a PR to the Golang SDK. |
|
I understand you only require it on the Go, but Temporal tries to maintain parity and consistency across all the SDKs we own. Unless the feature request is inherently language specific, If we are to add this to one SDK we would need add it to all SDKs and any design would need to consider across all SDKs. That being said I don't think there is any reason this query builder would need to live in the SDK so you may consider just packaging your query builder as its own Go module and share it the community. |
|
While I'm happy to share it as a Go module in my repository (I have done so already), I believe it should live on one of the official Temporal repositories for ease of discovery, support, and documentation going forward. But none of that matters if no one needs it. I'll leave you to decide what to do with this issue. If other members of the community start to want this as the Visibility API becomes more mature, it can be revisited. For now, https://github.com/OpeOnikute/temporal-go-querybuilder remains available for anyone who needs it. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
The visibility API provides powerful query functionality, but in the Golang SDK to create a query, the only option is to build your query by concatenating strings. This is brittle and is an opportunity to provide a nice query builder, like we have with SQL builders: https://github.com/huandu/go-sqlbuilder.
Describe the solution you'd like
A simple to use query builder that supports all the defined logical operators and list filters. I currently have a custom one that looks like this:
Describe alternatives you've considered
Previously built queries using custom formatting
Additional context
All reactions