pepsico-ecommerce / snowflex

elixir snowflake client
Apache License 2.0
52 stars 10 forks source link

Update to use DBConnection behavior #10

Open fcarlislehg opened 3 years ago

fcarlislehg commented 3 years ago

Has there been any consideration on updating this to implement the DBConnection behavior that official adapters like Postregx do?

https://github.com/elixir-ecto/db_connection

Is there a reason NOT to implement the DBConnection behavior? Would you be open to a pull request with this major refactor?

mphfish commented 3 years ago

Hey @fcarlislehg, thanks for opening an issue!

I don't think there is a reason not to implement this as a DBConnection. I've done a little bit of research into this, and there is some prior art for using the Erlang :odbc module in a module conforming to the DBConnection behaviour.

I'd definitely be interested in seeing any attempts you make towards implementing this behaviour!

Ch4s3 commented 2 years ago

@fcarlislehg this is partially done, but there may be some issues. If you could give it a try and report back, that would be great!

forest commented 2 years ago

I'm wondering if we should combine efforts. It seems that both our teams are moving in the same direction. https://github.com/HGInsights/snowpack

We borrowed from snowflex and a MSSQL driver to get started on snowpack. Parsing params and results from/to Elixir types is where we have spent a decent effort.

We are working on the tests now to get them to an acceptable level before publishing to hex.

We also have OpenTelemetry support here: https://github.com/HGInsights/opentelemetry_snowpack

Ch4s3 commented 2 years ago

@forest I just say your reply. We're working on a proper DBConnection implementation right now. Perhaps we can catch up and compare notes soon.