Why does invokeBinding not return metadata to caller?
- Dominant language
- Java
- Stars
- 300
- Forks
- 230
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 5
Description
When using SQL binding (tested with Postgres), sidecar is sending metadata and it is available at java-sdk level as well. However sdk only sends data to the caller, it ignores metadata completely.
Use case where metadata is helpful - Insert/Update/Delete queries (exec operation in sidecar) provide number of rows affected and this information is part of metadata. This information is useful for the application hence it should be sent to the caller.
Do we have any helper to get the metadata after invoking invokeBInding? If not, would like to get inputs for the use case.
Refs:
https://docs.dapr.io/reference/components-reference/supported-bindings/postgres/
https://github.com/dapr/java-sdk/blob/866b166e110a1b335396712b74dffe6410d7a7a9/sdk/src/main/java/io/dapr/client/DaprClientGrpc.java#L256
Contributor guide
Research direction
Start with sdk/src/main/java/io/dapr/client/DaprClientGrpc.java around line 256 and compare the binding response handling with the Postgres binding metadata described in the linked documentation. Determine whether invokeBinding exposes any metadata helper and what caller-facing API is appropriate; done means affected-row metadata can be retrieved without losing the existing response data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100