Skip to content

Commit 67723a5

Browse files
committed
[refactor] Rails these are private + remove extra method
1 parent 5c9dcf2 commit 67723a5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/arjdbc/abstract/core.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def jdbc_connection(unwrap = nil)
3434
raw_connection.jdbc_connection(unwrap)
3535
end
3636

37-
protected
37+
private
3838

3939
def translate_exception_class(e, sql, binds)
4040
message = "#{e.class.name}: #{e.message}"
@@ -61,14 +61,10 @@ def translate_exception(exception, message:, sql:, binds:)
6161
end
6262
end
6363

64-
def extract_raw_bind_values(binds)
65-
binds.map(&:value_for_database)
66-
end
67-
6864
# this version of log() automatically fills type_casted_binds from binds if necessary
6965
def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil, async: false)
7066
if binds.any? && (type_casted_binds.nil? || type_casted_binds.empty?)
71-
type_casted_binds = ->{ extract_raw_bind_values(binds) }
67+
type_casted_binds = ->{ binds.map(&:value_for_database) } # extract_raw_bind_values
7268
end
7369
super
7470
end

0 commit comments

Comments
 (0)