File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
lib/active_record/connection_adapters/sqlserver/core_ext Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 22* 3.2.7 *
33
44* Find VERSION in base file out of module namespace. Fixes #208
5+ * Better support for explain without sp_execute args. FIxes #207
56
67
78* 3.2.6 *
Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ def unprepare_sqlserver_statement(sql)
2121 if sql . starts_with? ( SQLSERVER_STATEMENT_PREFIX )
2222 executesql = sql . from ( SQLSERVER_STATEMENT_PREFIX . length )
2323 executesql_args = executesql . split ( ', ' )
24- executesql_args . reject! { |arg | arg =~ SQLSERVER_PARAM_MATCHER }
25- executesql_args . pop if executesql_args . many?
24+ found_args = executesql_args . reject! { |arg | arg =~ SQLSERVER_PARAM_MATCHER }
25+ executesql_args . pop if found_args && executesql_args . many?
2626 executesql = executesql_args . join ( ', ' ) . strip . match ( /N'(.*)'/ ) [ 1 ]
2727 Utils . unquote_string ( executesql )
2828 else
2929 sql
3030 end
3131 end
32-
32+
3333
3434 end
3535 end
You can’t perform that action at this time.
0 commit comments