Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyTDS v3+ is now required #1273

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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