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

Rails7 v2 #56

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion lib/active_record/connection_adapters/odbc_adapter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'active_record'
require 'arel/visitors/bind_visitor'
require 'odbc'

require 'odbc_adapter/database_limits'
Expand Down Expand Up @@ -81,6 +80,8 @@ def initialize(connection, logger, config, database_metadata)
configure_time_options(connection)
super(connection, logger, config)
@database_metadata = database_metadata
@connection = connection
@raw_connection = connection
end

# Returns the human-readable name of the adapter.
Expand Down
1 change: 0 additions & 1 deletion lib/odbc_adapter/adapters/mysql_odbc_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class MySQLODBCAdapter < ActiveRecord::ConnectionAdapters::ODBCAdapter
PRIMARY_KEY = 'INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY'.freeze

class BindSubstitution < Arel::Visitors::MySQL
include Arel::Visitors::BindVisitor
end

def arel_visitor
Expand Down
1 change: 0 additions & 1 deletion lib/odbc_adapter/adapters/null_odbc_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module Adapters
# have an explicit adapter.
class NullODBCAdapter < ActiveRecord::ConnectionAdapters::ODBCAdapter
class BindSubstitution < Arel::Visitors::ToSql
include Arel::Visitors::BindVisitor
end

# Using a BindVisitor so that the SQL string gets substituted before it is
Expand Down
4 changes: 4 additions & 0 deletions lib/odbc_adapter/database_statements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def execute(sql, name = nil, binds = [])
end
end

def internal_exec_query(sql, name = "SQL", binds = [], prepare: false, async: false) # :nodoc:
exec_query(sql, name, binds, prepare: prepare)
end

# Executes +sql+ statement in the context of this connection using
# +binds+ as the bind substitutes. +name+ is logged along with
# the executed +sql+ statement.
Expand Down