Skip to content

Commit

Permalink
TinyTDS v3+ is now required (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso authored Dec 18, 2024
1 parent a06eeb4 commit 6e75574
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Unreleased

#### Changed

- [#1273](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1273) TinyTDS v3+ is now required.


Please check [8-0-stable](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/8-0-stable/CHANGELOG.md) for previous changes.
2 changes: 1 addition & 1 deletion activerecord-sqlserver-adapter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "activerecord", "~> 8.1.0.alpha"
spec.add_dependency "tiny_tds"
spec.add_dependency "tiny_tds", "~> 3"
end
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,8 @@ def finish_statement_handle(handle)
handle
end

# TinyTDS returns false instead of raising an exception if connection fails.
# Getting around this by raising an exception ourselves while PR
# https://github.com/rails-sqlserver/tiny_tds/pull/469 is not released.
def internal_raw_execute(sql, raw_connection, perform_do: false)
result = raw_connection.execute(sql)
raise TinyTds::Error, "failed to execute statement" if result.is_a?(FalseClass)

perform_do ? result.do : result
end
end
Expand Down

0 comments on commit 6e75574

Please sign in to comment.