i am writing a new database/sql/driver for a database which does not support transactions. the online documentation is unclear about what the expected behaviour of the interfaces would be. For instance does ConnBeginTx.BeginTx return an error or just behave as if a transaction is created even though such a transaction’s Rollback and Commit would be meaningless? I suspect it is the former, but is there an idiomatic error to return like driver.ErrSkip (which is not appropriate based on the statement"ErrSkip is only supported where explicitly documented").
Would it be idiomatic/just good sense to, by default, return an error that transactions are not supported, but also provide a parameter in the connect string that allows the driver to suppress that error? This would allow users to switch to this driver and use code that may already have BeginTx calls in it. The user would have to explicitly acknowledge the lack of transaction behaviour by setting the connect string parameter to true.