Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
SpannerAdapter
requires prepared statements to be enabled (#323)
* fix: `SpannerAdapter` requires prepared statements to be enabled The adapter relies on prepared statements to extract Spanner native request options from the binds in the query engine call stack. This is at odds with the query tags feature in Rails 7.1, as it disables prepared statements for all adapters when it is enabled. This in turn The spanner AR adapter relies on prepared statements to extract native database functionality on the binds. The query tags feature, [when enabled](https://github.com/rails/rails/blob/7-1-stable/activerecord/lib/active_record/railtie.rb#L419), [disables prepared statements](https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#L160-L162), breaking the Spanner adapters queries, like inserts and updates. * test: verify that prepared statement is used * fix: only disable prepared statements if supported --------- Co-authored-by: Knut Olav Løite <[email protected]>
- Loading branch information