activerecord-sqlserver-adapter 2.2.22 → 2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +17 -0
- data/MIT-LICENSE +1 -1
- data/Rakefile +37 -14
- data/autotest/discover.rb +4 -0
- data/autotest/railssqlserver.rb +16 -0
- data/autotest/sqlserver.rb +54 -0
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +19 -25
- data/test/cases/adapter_test_sqlserver.rb +5 -1
- data/test/cases/eager_association_test_sqlserver.rb +1 -1
- data/test/cases/migration_test_sqlserver.rb +19 -1
- data/test/cases/named_scope_test_sqlserver.rb +21 -0
- data/test/cases/specific_schema_test_sqlserver.rb +5 -0
- data/test/cases/validations_test_sqlserver.rb +24 -0
- data/test/schema/sqlserver_specific_schema.rb +1 -0
- metadata +46 -68
- data/Manifest +0 -36
- data/lib/activerecord-sqlserver-adapter.rb +0 -1
- data/tasks/sqlserver.rake +0 -39
data/CHANGELOG
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
MASTER
|
3
3
|
|
4
4
|
|
5
|
+
* 2.3 * (December 1st, 2009)
|
6
|
+
|
7
|
+
* Table and column aliases can handle many. Resolves ticket #19 [stonegao]
|
8
|
+
|
9
|
+
* Coerce a few tests that were failing in 2.3.x [Ken Collins]
|
10
|
+
|
11
|
+
* Change column/view cache to happen at class level. Allows connection pool to share same
|
12
|
+
caches as well as the ability to expire the caches when needed. Also fix change_column so
|
13
|
+
that exceptions are not raised when the column contains an existing default. [Ken Collins]
|
14
|
+
|
15
|
+
* Allow query_requires_identity_insert? method to return quoted table name in situations where the
|
16
|
+
INSERT parts are not quoted themselves. [Gary/iawgens, Richard Penwell, Ken Collins]
|
17
|
+
|
18
|
+
* Fixed namespace in calling test_sqlserver_odbc within test_unicode_types. [Gary/iawgens]
|
19
|
+
|
20
|
+
* Columns with multi-line defaults work correctly. [bfabry]
|
21
|
+
|
5
22
|
|
6
23
|
* 2.2.22 * (October 15th, 2009)
|
7
24
|
|
data/MIT-LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -1,18 +1,41 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'rake'
|
3
2
|
require 'rake/testtask'
|
4
|
-
require '
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
require 'rake/rdoctask'
|
4
|
+
|
5
|
+
|
6
|
+
namespace :sqlserver do
|
7
|
+
|
8
|
+
['sqlserver','sqlserver_odbc'].each do |adapter|
|
9
|
+
|
10
|
+
Rake::TestTask.new("test_#{adapter}") do |t|
|
11
|
+
t.libs << "test"
|
12
|
+
t.libs << "test/connections/native_#{adapter}"
|
13
|
+
t.libs << "../../../rails/activerecord/test/"
|
14
|
+
t.test_files = (
|
15
|
+
Dir.glob("test/cases/**/*_test_sqlserver.rb").sort +
|
16
|
+
Dir.glob("../../../rails/activerecord/test/**/*_test.rb").sort )
|
17
|
+
t.verbose = true
|
18
|
+
end
|
19
|
+
|
20
|
+
namespace adapter do
|
21
|
+
task :test => "test_#{adapter}"
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
desc 'Test with unicode types enabled.'
|
27
|
+
task :test_unicode_types do
|
28
|
+
ENV['ENABLE_DEFAULT_UNICODE_TYPES'] = 'true'
|
29
|
+
test = Rake::Task['sqlserver:test_sqlserver_odbc']
|
30
|
+
test.invoke
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
desc 'Test the default ODBC mode, taks sqlserver:test_sqlserver_odbc.'
|
37
|
+
task :test do
|
38
|
+
test = Rake::Task['sqlserver:test_sqlserver_odbc']
|
39
|
+
test.invoke
|
16
40
|
end
|
17
41
|
|
18
|
-
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load(ext) }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'autotest/sqlserver'
|
2
|
+
|
3
|
+
class Autotest::Railssqlserver < Autotest::Sqlserver
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
super
|
7
|
+
self.libs << "#{File::PATH_SEPARATOR}../../../rails/activerecord/test/"
|
8
|
+
self.extra_files = ['../../../rails/activerecord/test/']
|
9
|
+
self.add_mapping %r%../../../rails/activerecord/test/.*/.*_test.rb$% do |filename, _|
|
10
|
+
filename
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'autotest'
|
2
|
+
require 'active_support'
|
3
|
+
|
4
|
+
class Autotest::Sqlserver < Autotest
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
super
|
8
|
+
|
9
|
+
odbc_mode = true
|
10
|
+
|
11
|
+
clear_mappings
|
12
|
+
|
13
|
+
self.libs = [
|
14
|
+
"lib",
|
15
|
+
"test",
|
16
|
+
"test/connections/native_sqlserver#{odbc_mode ? '_odbc' : ''}",
|
17
|
+
"../../../rails/activerecord/test/"
|
18
|
+
].join(File::PATH_SEPARATOR)
|
19
|
+
|
20
|
+
@test_sqlserver_file_match = %r%^test/cases/.*_test_sqlserver\.rb$%
|
21
|
+
|
22
|
+
add_exception %r%^\./(?:autotest)%
|
23
|
+
add_exception %r%^\./(.*LICENSE|debug.log|README.*|CHANGELOG.*)$%i
|
24
|
+
|
25
|
+
# Any *_test_sqlserver file saved runs that file
|
26
|
+
self.add_mapping @test_sqlserver_file_match do |filename, matchs|
|
27
|
+
filename
|
28
|
+
end
|
29
|
+
|
30
|
+
# If any the adapter changes
|
31
|
+
# the test directory, ofcourse having _test.rb at the end, will run that test.
|
32
|
+
self.add_mapping(%r%^lib/(.*)\.rb$%) do |filename, matchs|
|
33
|
+
files_matching @test_sqlserver_file_match
|
34
|
+
end
|
35
|
+
|
36
|
+
# If any core file like the test helper, connections, fixtures, migratinos,
|
37
|
+
# and other support files, then run all matching *_test_sqlserver files.
|
38
|
+
add_mapping %r%^test/(cases/(sqlserver_helper)\.rb|connections|fixtures|migrations|schema/.*)% do
|
39
|
+
files_matching @test_sqlserver_file_match
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
# Have to use a custom reorder method since the normal :alpha for Autotest would put the
|
45
|
+
# files with ../ in the path before others.
|
46
|
+
def reorder(files_to_test)
|
47
|
+
ar_tests, sqlsvr_tests = files_to_test.partition { |k,v| k.starts_with?('../../../') }
|
48
|
+
ar_tests.sort! { |a,b| a[0] <=> b[0] }
|
49
|
+
sqlsvr_tests.sort! { |a,b| a[0] <=> b[0] }
|
50
|
+
sqlsvr_tests + ar_tests
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
@@ -183,7 +183,7 @@ module ActiveRecord
|
|
183
183
|
class SQLServerAdapter < AbstractAdapter
|
184
184
|
|
185
185
|
ADAPTER_NAME = 'SQLServer'.freeze
|
186
|
-
VERSION = '2.
|
186
|
+
VERSION = '2.3'.freeze
|
187
187
|
DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+(\d{4})/
|
188
188
|
SUPPORTED_VERSIONS = [2000,2005,2008].freeze
|
189
189
|
LIMITABLE_TYPES = ['string','integer','float','char','nchar','varchar','nvarchar'].freeze
|
@@ -481,7 +481,7 @@ module ActiveRecord
|
|
481
481
|
order_by_column, order_direction = field.split(" ")
|
482
482
|
order_by_column = quote_column_name(order_by_column)
|
483
483
|
# Investigate the SQL query to figure out if the order_by_column has been renamed.
|
484
|
-
if sql =~ /#{Regexp.escape(order_by_column)} AS (t\
|
484
|
+
if sql =~ /#{Regexp.escape(order_by_column)} AS (t\d+_r\d+)/
|
485
485
|
# Fx "[foo].[bar] AS t4_r2" was found in the SQL. Use the column alias (ie 't4_r2') for the subsequent orderings
|
486
486
|
order_by_column = $1
|
487
487
|
elsif order_by_column =~ /\w+\.\[?(\w+)\]?/
|
@@ -568,13 +568,13 @@ module ActiveRecord
|
|
568
568
|
end
|
569
569
|
|
570
570
|
def views(name = nil)
|
571
|
-
|
571
|
+
@@sqlserver_views_cache ||=
|
572
572
|
info_schema_query { select_values("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME NOT IN ('sysconstraints','syssegments')") }
|
573
573
|
end
|
574
574
|
|
575
575
|
def view_information(table_name)
|
576
576
|
table_name = unqualify_table_name(table_name)
|
577
|
-
|
577
|
+
@@sqlserver_view_information_cache[table_name] ||= begin
|
578
578
|
view_info = info_schema_query { select_one("SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = '#{table_name}'") }
|
579
579
|
if view_info
|
580
580
|
if view_info['VIEW_DEFINITION'].blank? || view_info['VIEW_DEFINITION'].length == 4000
|
@@ -615,7 +615,7 @@ module ActiveRecord
|
|
615
615
|
def columns(table_name, name = nil)
|
616
616
|
return [] if table_name.blank?
|
617
617
|
cache_key = unqualify_table_name(table_name)
|
618
|
-
|
618
|
+
@@sqlserver_columns_cache[cache_key] ||= column_definitions(table_name).collect do |ci|
|
619
619
|
sqlserver_options = ci.except(:name,:default_value,:type,:null)
|
620
620
|
SQLServerColumn.new ci[:name], ci[:default_value], ci[:type], ci[:null], sqlserver_options
|
621
621
|
end
|
@@ -623,7 +623,7 @@ module ActiveRecord
|
|
623
623
|
|
624
624
|
def create_table(table_name, options = {})
|
625
625
|
super
|
626
|
-
|
626
|
+
initialize_sqlserver_caches
|
627
627
|
end
|
628
628
|
|
629
629
|
def rename_table(table_name, new_name)
|
@@ -632,12 +632,12 @@ module ActiveRecord
|
|
632
632
|
|
633
633
|
def drop_table(table_name, options = {})
|
634
634
|
super
|
635
|
-
|
635
|
+
initialize_sqlserver_caches
|
636
636
|
end
|
637
637
|
|
638
638
|
def add_column(table_name, column_name, type, options = {})
|
639
639
|
super
|
640
|
-
|
640
|
+
initialize_sqlserver_caches
|
641
641
|
end
|
642
642
|
|
643
643
|
def remove_column(table_name, *column_names)
|
@@ -647,32 +647,32 @@ module ActiveRecord
|
|
647
647
|
remove_indexes(table_name, column_name)
|
648
648
|
do_execute "ALTER TABLE #{quote_table_name(table_name)} DROP COLUMN #{quote_column_name(column_name)}"
|
649
649
|
end
|
650
|
-
|
650
|
+
initialize_sqlserver_caches
|
651
651
|
end
|
652
652
|
|
653
653
|
def change_column(table_name, column_name, type, options = {})
|
654
654
|
sql_commands = []
|
655
|
+
remove_default_constraint(table_name, column_name)
|
655
656
|
change_column_sql = "ALTER TABLE #{quote_table_name(table_name)} ALTER COLUMN #{quote_column_name(column_name)} #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}"
|
656
657
|
change_column_sql << " NOT NULL" if options[:null] == false
|
657
658
|
sql_commands << change_column_sql
|
658
659
|
if options_include_default?(options)
|
659
|
-
remove_default_constraint(table_name, column_name)
|
660
660
|
sql_commands << "ALTER TABLE #{quote_table_name(table_name)} ADD CONSTRAINT #{default_name(table_name,column_name)} DEFAULT #{quote(options[:default])} FOR #{quote_column_name(column_name)}"
|
661
661
|
end
|
662
662
|
sql_commands.each { |c| do_execute(c) }
|
663
|
-
|
663
|
+
initialize_sqlserver_caches
|
664
664
|
end
|
665
665
|
|
666
666
|
def change_column_default(table_name, column_name, default)
|
667
667
|
remove_default_constraint(table_name, column_name)
|
668
668
|
do_execute "ALTER TABLE #{quote_table_name(table_name)} ADD CONSTRAINT #{default_name(table_name, column_name)} DEFAULT #{quote(default)} FOR #{quote_column_name(column_name)}"
|
669
|
-
|
669
|
+
initialize_sqlserver_caches
|
670
670
|
end
|
671
671
|
|
672
672
|
def rename_column(table_name, column_name, new_column_name)
|
673
673
|
column_for(table_name,column_name)
|
674
674
|
do_execute "EXEC sp_rename '#{table_name}.#{column_name}', '#{new_column_name}', 'COLUMN'"
|
675
|
-
|
675
|
+
initialize_sqlserver_caches
|
676
676
|
end
|
677
677
|
|
678
678
|
def remove_index(table_name, options = {})
|
@@ -946,7 +946,7 @@ module ActiveRecord
|
|
946
946
|
if insert_sql?(sql)
|
947
947
|
table_name = get_table_name(sql)
|
948
948
|
id_column = identity_column(table_name)
|
949
|
-
id_column && sql =~ /INSERT[^(]+\([^)]*\
|
949
|
+
id_column && sql =~ /INSERT[^(]+\([^)]*\b(#{id_column.name})\b,?[^)]*\)/i ? quote_table_name(table_name) : false
|
950
950
|
else
|
951
951
|
false
|
952
952
|
end
|
@@ -1020,16 +1020,10 @@ module ActiveRecord
|
|
1020
1020
|
end
|
1021
1021
|
end
|
1022
1022
|
|
1023
|
-
def
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
end
|
1028
|
-
|
1029
|
-
def initialize_sqlserver_caches(reset_columns=true)
|
1030
|
-
@sqlserver_columns_cache = {} if reset_columns
|
1031
|
-
@sqlserver_views_cache = nil
|
1032
|
-
@sqlserver_view_information_cache = {}
|
1023
|
+
def initialize_sqlserver_caches
|
1024
|
+
@@sqlserver_columns_cache = {}
|
1025
|
+
@@sqlserver_views_cache = nil
|
1026
|
+
@@sqlserver_view_information_cache = {}
|
1033
1027
|
end
|
1034
1028
|
|
1035
1029
|
def column_definitions(table_name)
|
@@ -1082,7 +1076,7 @@ module ActiveRecord
|
|
1082
1076
|
when nil, '(null)', '(NULL)'
|
1083
1077
|
nil
|
1084
1078
|
else
|
1085
|
-
match_data = ci[:default_value].match(/\A\(+N?'?(.*?)'?\)+\Z/)
|
1079
|
+
match_data = ci[:default_value].match(/\A\(+N?'?(.*?)'?\)+\Z/m)
|
1086
1080
|
match_data ? match_data[1] : nil
|
1087
1081
|
end
|
1088
1082
|
ci[:null] = ci[:is_nullable].to_i == 1 ; ci.delete(:is_nullable)
|
@@ -328,10 +328,14 @@ class AdapterTestSqlserver < ActiveRecord::TestCase
|
|
328
328
|
|
329
329
|
setup do
|
330
330
|
@identity_insert_sql = "INSERT INTO [funny_jokes] ([id],[name]) VALUES(420,'Knock knock')"
|
331
|
+
@identity_insert_sql_unquoted = "INSERT INTO funny_jokes (id, name) VALUES(420, 'Knock knock')"
|
332
|
+
@identity_insert_sql_unordered = "INSERT INTO [funny_jokes] ([name],[id]) VALUES('Knock knock',420)"
|
331
333
|
end
|
332
334
|
|
333
|
-
should 'return quoted table_name to #query_requires_identity_insert? when INSERT sql contains
|
335
|
+
should 'return quoted table_name to #query_requires_identity_insert? when INSERT sql contains id column' do
|
334
336
|
assert_equal '[funny_jokes]', @connection.send(:query_requires_identity_insert?,@identity_insert_sql)
|
337
|
+
assert_equal '[funny_jokes]', @connection.send(:query_requires_identity_insert?,@identity_insert_sql_unquoted)
|
338
|
+
assert_equal '[funny_jokes]', @connection.send(:query_requires_identity_insert?,@identity_insert_sql_unordered)
|
335
339
|
end
|
336
340
|
|
337
341
|
should 'return false to #query_requires_identity_insert? for normal SQL' do
|
@@ -3,10 +3,13 @@ require 'models/person'
|
|
3
3
|
|
4
4
|
class MigrationTestSqlserver < ActiveRecord::TestCase
|
5
5
|
|
6
|
+
def setup
|
7
|
+
@connection = ActiveRecord::Base.connection
|
8
|
+
end
|
9
|
+
|
6
10
|
context 'For transactions' do
|
7
11
|
|
8
12
|
setup do
|
9
|
-
@connection = ActiveRecord::Base.connection
|
10
13
|
@trans_test_table1 = 'sqlserver_trans_table1'
|
11
14
|
@trans_test_table2 = 'sqlserver_trans_table2'
|
12
15
|
@trans_tables = [@trans_test_table1,@trans_test_table2]
|
@@ -30,6 +33,21 @@ class MigrationTestSqlserver < ActiveRecord::TestCase
|
|
30
33
|
|
31
34
|
end
|
32
35
|
|
36
|
+
context 'For changing column' do
|
37
|
+
|
38
|
+
should 'not raise exception when column contains default constraint' do
|
39
|
+
lock_version_column = Person.columns_hash['lock_version']
|
40
|
+
assert_equal :integer, lock_version_column.type
|
41
|
+
assert lock_version_column.default.present?
|
42
|
+
assert_nothing_raised { @connection.change_column 'people', 'lock_version', :string }
|
43
|
+
Person.reset_column_information
|
44
|
+
lock_version_column = Person.columns_hash['lock_version']
|
45
|
+
assert_equal :string, lock_version_column.type
|
46
|
+
assert lock_version_column.default.nil?
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
33
51
|
|
34
52
|
end
|
35
53
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'cases/sqlserver_helper'
|
2
|
+
|
3
|
+
class NamedScopeTestSqlserver < ActiveRecord::TestCase
|
4
|
+
end
|
5
|
+
|
6
|
+
class NamedScopeTest < ActiveRecord::TestCase
|
7
|
+
|
8
|
+
COERCED_TESTS = [:test_named_scopes_honor_current_scopes_from_when_defined]
|
9
|
+
|
10
|
+
include SqlserverCoercedTest
|
11
|
+
|
12
|
+
# See: http://github.com/rails/rails/commit/0dd2f96f5c90f8abacb0fe0757ef7e5db4a4d501#comment_37025
|
13
|
+
# The orig test is a little brittle and fails on other adapters that do not explicitly fall back to a secondary
|
14
|
+
# sort of id ASC. Since there are duplicate records with comments_count equal to one another. I have found that
|
15
|
+
# named_scope :ranked_by_comments, :order => "comments_count DESC, id ASC" fixes the ambiguity.
|
16
|
+
def test_coerced_test_named_scopes_honor_current_scopes_from_when_defined
|
17
|
+
assert true
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
end
|
@@ -5,6 +5,11 @@ class SqlServerEdgeSchema < ActiveRecord::Base; end;
|
|
5
5
|
|
6
6
|
class SpecificSchemaTestSqlserver < ActiveRecord::TestCase
|
7
7
|
|
8
|
+
should 'cope with multi line defaults' do
|
9
|
+
default = StringDefault.new
|
10
|
+
assert_equal "Some long default with a\nnew line.", default.string_with_multiline_default
|
11
|
+
end
|
12
|
+
|
8
13
|
should 'default strings before save' do
|
9
14
|
default = StringDefault.new
|
10
15
|
assert_equal nil, default.string_with_null_default
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'cases/sqlserver_helper'
|
2
|
+
|
3
|
+
class ValidationsTestSqlserver < ActiveRecord::TestCase
|
4
|
+
end
|
5
|
+
|
6
|
+
class ValidationsTest < ActiveRecord::TestCase
|
7
|
+
|
8
|
+
COERCED_TESTS = [:test_validate_uniqueness_with_limit_and_utf8]
|
9
|
+
|
10
|
+
include SqlserverCoercedTest
|
11
|
+
|
12
|
+
# Because SQL Server converts UTF8 data to some other data type, there is no such thing as a
|
13
|
+
# one to byte length check. See this article for details:
|
14
|
+
# http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=362867
|
15
|
+
#
|
16
|
+
# Had the idea of doing this, but could not since the above was true.
|
17
|
+
# Event.connection.change_column :events, :title, :nvarchar, :limit => 5
|
18
|
+
# Event.reset_column_information
|
19
|
+
def test_coerced_test_validate_uniqueness_with_limit_and_utf8
|
20
|
+
assert true
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
@@ -17,6 +17,7 @@ ActiveRecord::Schema.define do
|
|
17
17
|
t.column :string_with_pretend_null_three, :string, :default => 'NULL'
|
18
18
|
t.column :string_with_pretend_null_four, :string, :default => '(NULL)'
|
19
19
|
t.column :string_with_pretend_paren_three, :string, :default => '(3)'
|
20
|
+
t.column :string_with_multiline_default, :string, :default => "Some long default with a\nnew line."
|
20
21
|
end
|
21
22
|
|
22
23
|
create_table :sql_server_chronics, :force => true do |t|
|
metadata
CHANGED
@@ -1,37 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-sqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: "2.3"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ken Collins
|
7
|
+
- Ken Collins
|
8
|
+
- Murray Steele
|
9
|
+
- Shawn Balestracci
|
10
|
+
- Joe Rafaniello
|
11
|
+
- Tom Ward
|
8
12
|
autorequire:
|
9
13
|
bindir: bin
|
10
14
|
cert_chain: []
|
11
15
|
|
12
|
-
date: 2009-10
|
16
|
+
date: 2009-09-10 00:00:00 -04:00
|
13
17
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
name: dbi
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.4.1
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: dbd-odbc
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.4
|
34
|
-
version:
|
18
|
+
dependencies: []
|
19
|
+
|
35
20
|
description: SQL Server 2000, 2005 and 2008 Adapter For Rails.
|
36
21
|
email: ken@metaskills.net
|
37
22
|
executables: []
|
@@ -39,50 +24,19 @@ executables: []
|
|
39
24
|
extensions: []
|
40
25
|
|
41
26
|
extra_rdoc_files:
|
42
|
-
- CHANGELOG
|
43
|
-
- lib/activerecord-sqlserver-adapter.rb
|
44
|
-
- lib/active_record/connection_adapters/sqlserver_adapter.rb
|
45
|
-
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb
|
46
|
-
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/dbi.rb
|
47
27
|
- README.rdoc
|
48
|
-
- tasks/sqlserver.rake
|
49
28
|
files:
|
50
29
|
- CHANGELOG
|
51
|
-
- lib/activerecord-sqlserver-adapter.rb
|
52
|
-
- lib/active_record/connection_adapters/sqlserver_adapter.rb
|
53
|
-
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb
|
54
|
-
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/dbi.rb
|
55
|
-
- Manifest
|
56
30
|
- MIT-LICENSE
|
57
31
|
- Rakefile
|
58
32
|
- README.rdoc
|
59
33
|
- RUNNING_UNIT_TESTS
|
60
|
-
-
|
61
|
-
-
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
- test/cases/column_test_sqlserver.rb
|
67
|
-
- test/cases/connection_test_sqlserver.rb
|
68
|
-
- test/cases/eager_association_test_sqlserver.rb
|
69
|
-
- test/cases/execute_procedure_test_sqlserver.rb
|
70
|
-
- test/cases/inheritance_test_sqlserver.rb
|
71
|
-
- test/cases/method_scoping_test_sqlserver.rb
|
72
|
-
- test/cases/migration_test_sqlserver.rb
|
73
|
-
- test/cases/offset_and_limit_test_sqlserver.rb
|
74
|
-
- test/cases/pessimistic_locking_test_sqlserver.rb
|
75
|
-
- test/cases/query_cache_test_sqlserver.rb
|
76
|
-
- test/cases/schema_dumper_test_sqlserver.rb
|
77
|
-
- test/cases/specific_schema_test_sqlserver.rb
|
78
|
-
- test/cases/sqlserver_helper.rb
|
79
|
-
- test/cases/table_name_test_sqlserver.rb
|
80
|
-
- test/cases/transaction_test_sqlserver.rb
|
81
|
-
- test/cases/unicode_test_sqlserver.rb
|
82
|
-
- test/connections/native_sqlserver/connection.rb
|
83
|
-
- test/connections/native_sqlserver_odbc/connection.rb
|
84
|
-
- test/migrations/transaction_table/1_table_will_never_be_created.rb
|
85
|
-
- test/schema/sqlserver_specific_schema.rb
|
34
|
+
- autotest/discover.rb
|
35
|
+
- autotest/railssqlserver.rb
|
36
|
+
- autotest/sqlserver.rb
|
37
|
+
- lib/active_record/connection_adapters/sqlserver_adapter.rb
|
38
|
+
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb
|
39
|
+
- lib/active_record/connection_adapters/sqlserver_adapter/core_ext/dbi.rb
|
86
40
|
has_rdoc: true
|
87
41
|
homepage: http://github.com/rails-sqlserver
|
88
42
|
licenses: []
|
@@ -91,8 +45,6 @@ post_install_message:
|
|
91
45
|
rdoc_options:
|
92
46
|
- --line-numbers
|
93
47
|
- --inline-source
|
94
|
-
- --title
|
95
|
-
- Activerecord-sqlserver-adapter
|
96
48
|
- --main
|
97
49
|
- README.rdoc
|
98
50
|
require_paths:
|
@@ -107,14 +59,40 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
59
|
requirements:
|
108
60
|
- - ">="
|
109
61
|
- !ruby/object:Gem::Version
|
110
|
-
version: "
|
62
|
+
version: "0"
|
111
63
|
version:
|
112
64
|
requirements: []
|
113
65
|
|
114
|
-
rubyforge_project:
|
115
|
-
rubygems_version: 1.3.
|
66
|
+
rubyforge_project:
|
67
|
+
rubygems_version: 1.3.5
|
116
68
|
signing_key:
|
117
69
|
specification_version: 3
|
118
70
|
summary: SQL Server 2000, 2005 and 2008 Adapter For Rails.
|
119
|
-
test_files:
|
120
|
-
|
71
|
+
test_files:
|
72
|
+
- test/cases/aaaa_create_tables_test_sqlserver.rb
|
73
|
+
- test/cases/adapter_test_sqlserver.rb
|
74
|
+
- test/cases/attribute_methods_test_sqlserver.rb
|
75
|
+
- test/cases/basics_test_sqlserver.rb
|
76
|
+
- test/cases/calculations_test_sqlserver.rb
|
77
|
+
- test/cases/column_test_sqlserver.rb
|
78
|
+
- test/cases/connection_test_sqlserver.rb
|
79
|
+
- test/cases/eager_association_test_sqlserver.rb
|
80
|
+
- test/cases/execute_procedure_test_sqlserver.rb
|
81
|
+
- test/cases/inheritance_test_sqlserver.rb
|
82
|
+
- test/cases/method_scoping_test_sqlserver.rb
|
83
|
+
- test/cases/migration_test_sqlserver.rb
|
84
|
+
- test/cases/named_scope_test_sqlserver.rb
|
85
|
+
- test/cases/offset_and_limit_test_sqlserver.rb
|
86
|
+
- test/cases/pessimistic_locking_test_sqlserver.rb
|
87
|
+
- test/cases/query_cache_test_sqlserver.rb
|
88
|
+
- test/cases/schema_dumper_test_sqlserver.rb
|
89
|
+
- test/cases/specific_schema_test_sqlserver.rb
|
90
|
+
- test/cases/sqlserver_helper.rb
|
91
|
+
- test/cases/table_name_test_sqlserver.rb
|
92
|
+
- test/cases/transaction_test_sqlserver.rb
|
93
|
+
- test/cases/unicode_test_sqlserver.rb
|
94
|
+
- test/cases/validations_test_sqlserver.rb
|
95
|
+
- test/connections/native_sqlserver/connection.rb
|
96
|
+
- test/connections/native_sqlserver_odbc/connection.rb
|
97
|
+
- test/migrations/transaction_table/1_table_will_never_be_created.rb
|
98
|
+
- test/schema/sqlserver_specific_schema.rb
|
data/Manifest
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
lib/activerecord-sqlserver-adapter.rb
|
3
|
-
lib/active_record/connection_adapters/sqlserver_adapter.rb
|
4
|
-
lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb
|
5
|
-
lib/active_record/connection_adapters/sqlserver_adapter/core_ext/dbi.rb
|
6
|
-
Manifest
|
7
|
-
MIT-LICENSE
|
8
|
-
Rakefile
|
9
|
-
README.rdoc
|
10
|
-
RUNNING_UNIT_TESTS
|
11
|
-
tasks/sqlserver.rake
|
12
|
-
test/cases/aaaa_create_tables_test_sqlserver.rb
|
13
|
-
test/cases/adapter_test_sqlserver.rb
|
14
|
-
test/cases/attribute_methods_test_sqlserver.rb
|
15
|
-
test/cases/basics_test_sqlserver.rb
|
16
|
-
test/cases/calculations_test_sqlserver.rb
|
17
|
-
test/cases/column_test_sqlserver.rb
|
18
|
-
test/cases/connection_test_sqlserver.rb
|
19
|
-
test/cases/eager_association_test_sqlserver.rb
|
20
|
-
test/cases/execute_procedure_test_sqlserver.rb
|
21
|
-
test/cases/inheritance_test_sqlserver.rb
|
22
|
-
test/cases/method_scoping_test_sqlserver.rb
|
23
|
-
test/cases/migration_test_sqlserver.rb
|
24
|
-
test/cases/offset_and_limit_test_sqlserver.rb
|
25
|
-
test/cases/pessimistic_locking_test_sqlserver.rb
|
26
|
-
test/cases/query_cache_test_sqlserver.rb
|
27
|
-
test/cases/schema_dumper_test_sqlserver.rb
|
28
|
-
test/cases/specific_schema_test_sqlserver.rb
|
29
|
-
test/cases/sqlserver_helper.rb
|
30
|
-
test/cases/table_name_test_sqlserver.rb
|
31
|
-
test/cases/transaction_test_sqlserver.rb
|
32
|
-
test/cases/unicode_test_sqlserver.rb
|
33
|
-
test/connections/native_sqlserver/connection.rb
|
34
|
-
test/connections/native_sqlserver_odbc/connection.rb
|
35
|
-
test/migrations/transaction_table/1_table_will_never_be_created.rb
|
36
|
-
test/schema/sqlserver_specific_schema.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'active_record/connection_adapters/sqlserver_adapter'
|
data/tasks/sqlserver.rake
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
namespace :sqlserver do
|
4
|
-
|
5
|
-
['sqlserver','sqlserver_odbc'].each do |adapter|
|
6
|
-
|
7
|
-
Rake::TestTask.new("test_#{adapter}") do |t|
|
8
|
-
t.libs << "test"
|
9
|
-
t.libs << "test/connections/native_#{adapter}"
|
10
|
-
t.libs << "../../../rails/activerecord/test/"
|
11
|
-
t.test_files = (
|
12
|
-
Dir.glob("test/cases/**/*_test_sqlserver.rb").sort +
|
13
|
-
Dir.glob("../../../rails/activerecord/test/**/*_test.rb").sort )
|
14
|
-
t.verbose = true
|
15
|
-
end
|
16
|
-
|
17
|
-
namespace adapter do
|
18
|
-
task :test => "test_#{adapter}"
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
desc 'Test with unicode types enabled.'
|
24
|
-
task :test_unicode_types do
|
25
|
-
ENV['ENABLE_DEFAULT_UNICODE_TYPES'] = 'true'
|
26
|
-
test = Rake::Task['test_sqlserver_odbc']
|
27
|
-
test.invoke
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
desc 'Test the default ODBC mode, taks sqlserver:test_sqlserver_odbc.'
|
35
|
-
task :test do
|
36
|
-
test = Rake::Task['sqlserver:test_sqlserver_odbc']
|
37
|
-
test.invoke
|
38
|
-
end
|
39
|
-
|