activerecord-sqlserver-adapter 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ * 3.2.1 *
3
+
4
+ * Add explicit order-by clause for windowed results. Fixes #161.
5
+
6
+
2
7
  * 3.2.0 *
3
8
 
4
9
  * ActiveRecord explain (SHOWPLAN) support.
@@ -3,7 +3,7 @@ module ActiveRecord
3
3
  module Sqlserver
4
4
  module Version
5
5
 
6
- VERSION = '3.2.0'
6
+ VERSION = '3.2.1'
7
7
 
8
8
  end
9
9
  end
@@ -102,7 +102,7 @@ module Arel
102
102
 
103
103
  def visit_Arel_Nodes_UpdateStatement(o)
104
104
  if o.orders.any? && o.limit.nil?
105
- o.limit = Nodes::Limit.new(2147483647)
105
+ o.limit = Nodes::Limit.new(9223372036854775807)
106
106
  end
107
107
  super
108
108
  end
@@ -166,6 +166,7 @@ module Arel
166
166
  end
167
167
 
168
168
  def visit_Arel_Nodes_SelectStatementWithOffset(o)
169
+ o.limit ||= Arel::Nodes::Limit.new(9223372036854775807)
169
170
  orders = rowtable_orders(o)
170
171
  [ "SELECT",
171
172
  (visit(o.limit) if o.limit && !windowed_single_distinct_select_statement?(o)),
@@ -175,6 +176,7 @@ module Arel
175
176
  visit_Arel_Nodes_SelectStatementWithOutOffset(o,true),
176
177
  ") AS [__rnt]",
177
178
  (visit(o.offset) if o.offset),
179
+ "ORDER BY [__rnt].[__rn] ASC"
178
180
  ].compact.join ' '
179
181
  end
180
182
 
metadata CHANGED
@@ -1,10 +1,15 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: activerecord-sqlserver-adapter
3
- version: !ruby/object:Gem::Version
4
- version: 3.2.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 13
5
5
  prerelease:
6
+ segments:
7
+ - 3
8
+ - 2
9
+ - 1
10
+ version: 3.2.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Ken Collins
9
14
  - Murray Steele
10
15
  - Shawn Balestracci
@@ -13,25 +18,34 @@ authors:
13
18
  autorequire:
14
19
  bindir: bin
15
20
  cert_chain: []
16
- date: 2012-01-21 00:00:00.000000000 Z
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
21
+
22
+ date: 2012-02-08 00:00:00 Z
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
19
25
  name: activerecord
20
- requirement: &70334259773900 !ruby/object:Gem::Requirement
26
+ prerelease: false
27
+ requirement: &id001 !ruby/object:Gem::Requirement
21
28
  none: false
22
- requirements:
29
+ requirements:
23
30
  - - ~>
24
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
32
+ hash: 15
33
+ segments:
34
+ - 3
35
+ - 2
36
+ - 0
25
37
  version: 3.2.0
26
38
  type: :runtime
27
- prerelease: false
28
- version_requirements: *70334259773900
39
+ version_requirements: *id001
29
40
  description: SQL Server 2005 and 2008 Adapter For ActiveRecord
30
41
  email: ken@metaskills.net
31
42
  executables: []
43
+
32
44
  extensions: []
45
+
33
46
  extra_rdoc_files: []
34
- files:
47
+
48
+ files:
35
49
  - CHANGELOG
36
50
  - MIT-LICENSE
37
51
  - lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
@@ -54,26 +68,36 @@ files:
54
68
  - lib/arel/visitors/sqlserver.rb
55
69
  homepage: http://github.com/rails-sqlserver/activerecord-sqlserver-adapter
56
70
  licenses: []
71
+
57
72
  post_install_message:
58
73
  rdoc_options: []
59
- require_paths:
74
+
75
+ require_paths:
60
76
  - lib
61
- required_ruby_version: !ruby/object:Gem::Requirement
77
+ required_ruby_version: !ruby/object:Gem::Requirement
62
78
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
- required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
87
  none: false
69
- requirements:
70
- - - ! '>='
71
- - !ruby/object:Gem::Version
72
- version: '0'
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
73
95
  requirements: []
96
+
74
97
  rubyforge_project: activerecord-sqlserver-adapter
75
98
  rubygems_version: 1.8.15
76
99
  signing_key:
77
100
  specification_version: 3
78
101
  summary: SQL Server 2005 and 2008 Adapter For ActiveRecord.
79
102
  test_files: []
103
+