Skip to content
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

Support PostgreSQL Binding #24

Closed
Mershab99 opened this issue May 29, 2024 · 4 comments
Closed

Support PostgreSQL Binding #24

Mershab99 opened this issue May 29, 2024 · 4 comments

Comments

@Mershab99
Copy link

The postgres binding uses the exec and query operations, and invokes the binding with the SQL command embedded in the metadata field of the dapr.InvokeBindingRequest. However the current ctx.Send method only fills the data field. This is insufficient for the postgres binding.

https://docs.dapr.io/reference/components-reference/supported-bindings/postgresql/

Alternatively exposing the daprClient as part of the FunctionContext would allow users to access the underlying dapr client and invoke our own methods beyond the scope of the OF spec.

@tpiperatgod
Copy link
Member

It's a valid point regarding the PostgreSQL binding requirements. Currently, the ff-python framework already supports exposing the Dapr client to users. If you are interested in having the same functionality in ff-go, we would greatly appreciate your contributions to develop this feature.

@Mershab99
Copy link
Author

Hi @tpiperatgod, I've gone ahead and created a PR in the ff-go repo (mentioned above). However I am incurring some issues with the function builder. Namely that it does not respect the replace directive in the go.mod file to my own ff-go implementation, so the builder doesn't see the added method. I've sent you an email about this, but perhaps this is an opportunity for me to enhance the builder documentation if I can learn a bit more about how it works!

@tpiperatgod
Copy link
Member

Hi @Mershab99 , for information on how to make ff-go builder image, see this doc. Please feel free to give suggestions to enhance the documentation!

@Mershab99
Copy link
Author

Closing this issue as OpenFunction/functions-framework-go#78 has been merged which addresses this concern. Thanks all for your help!

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

No branches or pull requests

2 participants