clickhouse-go icon indicating copy to clipboard operation
clickhouse-go copied to clipboard

#733 driver implemets the sql/driver/ConnBeginTx interface

Open albertlockett opened this issue 2 years ago • 4 comments

https://github.com/ClickHouse/clickhouse-go/issues/733

albertlockett avatar Oct 07 '22 00:10 albertlockett

Hi @albertlockett

Thanks for submitting this PR. Did you check if otelsql is able to support SQL drivers that do not implement ConnBeginTx interface? From our point of view, it makes more sense to keep our API away from fake doors.

jkaflik avatar Dec 12 '22 16:12 jkaflik

@jkaflik I will check w/ otelsql maintainers and follow up. Do you think it makes sense though to implement ConnBeginTx as driver.Conn's Begin method is deprecated? https://pkg.go.dev/database/sql/driver#Conn

albertlockett avatar Mar 08 '23 20:03 albertlockett

@albertlockett thanks for giving me a reference. Indeed, it seems we should deprecate ConnBeginTx interface. I think we can proceed with your PR. Can we experiment by removing Begin function?

jkaflik avatar Mar 09 '23 06:03 jkaflik

We could experiment by removing the Begin function. I'm not sure if there are other reasons to keep it around for backwards compatibility?

Also, it looks like otelsql will begin supporting the driver.Conn interface if/when this PR merges: https://github.com/XSAM/otelsql/pull/153

albertlockett avatar Mar 09 '23 14:03 albertlockett