rails-sqlserver-2000-2005-adapter 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG
CHANGED
@@ -4,6 +4,11 @@ MASTER
|
|
4
4
|
*
|
5
5
|
|
6
6
|
|
7
|
+
* 2.2.8 (January 9th, 2009)
|
8
|
+
|
9
|
+
* Update execute_procedure method a bit to remove excess code. [Ken Collins]
|
10
|
+
|
11
|
+
|
7
12
|
* 2.2.7 (January 9th, 2009)
|
8
13
|
|
9
14
|
* Created a connection#execute_procedure method that takes can take any number of ruby objects as variables
|
@@ -150,7 +150,7 @@ module ActiveRecord
|
|
150
150
|
class SQLServerAdapter < AbstractAdapter
|
151
151
|
|
152
152
|
ADAPTER_NAME = 'SQLServer'.freeze
|
153
|
-
VERSION = '2.2.
|
153
|
+
VERSION = '2.2.8'.freeze
|
154
154
|
DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+(\d{4})/
|
155
155
|
SUPPORTED_VERSIONS = [2000,2005].freeze
|
156
156
|
LIMITABLE_TYPES = ['string','integer','float','char','nchar','varchar','nvarchar'].freeze
|
@@ -335,10 +335,9 @@ module ActiveRecord
|
|
335
335
|
end
|
336
336
|
|
337
337
|
def execute_procedure(proc_name, *variables)
|
338
|
-
|
339
|
-
|
340
|
-
sql
|
341
|
-
select(sql,'PROCEDURE',true).inject([]) do |results,row|
|
338
|
+
vars = variables.map{ |v| quote(v) }.join(', ')
|
339
|
+
sql = "EXEC #{proc_name} #{vars}".strip
|
340
|
+
select(sql,'Execute Procedure',true).inject([]) do |results,row|
|
342
341
|
results << row.with_indifferent_access
|
343
342
|
end
|
344
343
|
end
|