activerecord-sqlserver-adapter 3.0.16 → 3.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,12 @@
1
1
 
2
- * 3-0-stable *
2
+ * 3.0.17 *
3
+
4
+ * Allow :limit/:offset to be used with fully qualified table and column in :select.
5
+
6
+ * Fix test_count_explicit_columns.
7
+
8
+
9
+ * 3.0.16 *
3
10
 
4
11
  * Allow complex order objects to not be molested by our visitor overrides. Fixes #99
5
12
 
@@ -164,7 +164,7 @@ module ActiveRecord
164
164
  include Sqlserver::Errors
165
165
 
166
166
  ADAPTER_NAME = 'SQLServer'.freeze
167
- VERSION = '3.0.16'.freeze
167
+ VERSION = '3.0.17'.freeze
168
168
  DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+"?(\d{4}|\w+)"?/
169
169
  SUPPORTED_VERSIONS = [2005,2008,2010,2011].freeze
170
170
 
@@ -249,7 +249,7 @@ module Arel
249
249
  core = o.cores.first
250
250
  core.projections.size == 1 &&
251
251
  Arel::Nodes::Count === core.projections.first &&
252
- (o.limit || !core.wheres.empty?) &&
252
+ o.limit &&
253
253
  !join_in_select_statement?(o)
254
254
  end
255
255
 
@@ -293,12 +293,9 @@ module Arel
293
293
  core.projections.map do |x|
294
294
  Arel.sql x.split(',').map{ |y| y.split(' AS ').last.strip }.join(', ')
295
295
  end
296
- elsif function_select_statement?(o)
297
- # TODO: [ARel 2.2] Use Arel.star
298
- [Arel.sql('*')]
299
296
  else
300
- tn = table_from_select_statement(o).name
301
- core.projections.map { |x| x.gsub /\[#{tn}\]\./, '[__rnt].' }
297
+ # TODO: [ARel 2.2] Use Arel.star
298
+ [Arel.sql('[__rnt].*')]
302
299
  end
303
300
  end
304
301
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-sqlserver-adapter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 16
10
- version: 3.0.16
9
+ - 17
10
+ version: 3.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Collins
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2011-09-19 00:00:00 -04:00
22
+ date: 2011-09-22 00:00:00 -04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency