odbc-rails 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/AUTHORS +16 -0
  2. data/COPYING +21 -0
  3. data/ChangeLog +89 -0
  4. data/LICENSE +5 -0
  5. data/NEWS +12 -0
  6. data/README +282 -0
  7. data/lib/active_record/connection_adapters/odbc_adapter.rb +1792 -0
  8. data/lib/active_record/vendor/odbcext_db2.rb +87 -0
  9. data/lib/active_record/vendor/odbcext_informix.rb +132 -0
  10. data/lib/active_record/vendor/odbcext_informix_col.rb +45 -0
  11. data/lib/active_record/vendor/odbcext_ingres.rb +156 -0
  12. data/lib/active_record/vendor/odbcext_microsoftsqlserver.rb +185 -0
  13. data/lib/active_record/vendor/odbcext_microsoftsqlserver_col.rb +40 -0
  14. data/lib/active_record/vendor/odbcext_mysql.rb +136 -0
  15. data/lib/active_record/vendor/odbcext_oracle.rb +220 -0
  16. data/lib/active_record/vendor/odbcext_postgresql.rb +179 -0
  17. data/lib/active_record/vendor/odbcext_progress.rb +139 -0
  18. data/lib/active_record/vendor/odbcext_progress89.rb +259 -0
  19. data/lib/active_record/vendor/odbcext_sybase.rb +212 -0
  20. data/lib/active_record/vendor/odbcext_sybase_col.rb +49 -0
  21. data/lib/active_record/vendor/odbcext_virtuoso.rb +146 -0
  22. data/lib/odbc_adapter.rb +28 -0
  23. data/support/lib/active_record/connection_adapters/abstract/schema_definitions.rb +259 -0
  24. data/support/odbc_rails.diff +707 -0
  25. data/support/pack_odbc.rb +119 -0
  26. data/support/rake/rails_plugin_package_task.rb +212 -0
  27. data/support/test/base_test.rb +1349 -0
  28. data/support/test/migration_test.rb +566 -0
  29. data/test/connections/native_odbc/connection.rb +95 -0
  30. data/test/fixtures/db_definitions/db2.drop.sql +30 -0
  31. data/test/fixtures/db_definitions/db2.sql +217 -0
  32. data/test/fixtures/db_definitions/db22.drop.sql +2 -0
  33. data/test/fixtures/db_definitions/db22.sql +5 -0
  34. data/test/fixtures/db_definitions/informix.drop.sql +30 -0
  35. data/test/fixtures/db_definitions/informix.sql +205 -0
  36. data/test/fixtures/db_definitions/informix2.drop.sql +2 -0
  37. data/test/fixtures/db_definitions/informix2.sql +5 -0
  38. data/test/fixtures/db_definitions/ingres.drop.sql +62 -0
  39. data/test/fixtures/db_definitions/ingres.sql +232 -0
  40. data/test/fixtures/db_definitions/ingres2.drop.sql +2 -0
  41. data/test/fixtures/db_definitions/ingres2.sql +5 -0
  42. data/test/fixtures/db_definitions/mysql.drop.sql +30 -0
  43. data/test/fixtures/db_definitions/mysql.sql +219 -0
  44. data/test/fixtures/db_definitions/mysql2.drop.sql +2 -0
  45. data/test/fixtures/db_definitions/mysql2.sql +5 -0
  46. data/test/fixtures/db_definitions/oracle_odbc.drop.sql +64 -0
  47. data/test/fixtures/db_definitions/oracle_odbc.sql +257 -0
  48. data/test/fixtures/db_definitions/oracle_odbc2.drop.sql +2 -0
  49. data/test/fixtures/db_definitions/oracle_odbc2.sql +6 -0
  50. data/test/fixtures/db_definitions/progress.drop.sql +61 -0
  51. data/test/fixtures/db_definitions/progress.sql +234 -0
  52. data/test/fixtures/db_definitions/progress2.drop.sql +2 -0
  53. data/test/fixtures/db_definitions/progress2.sql +6 -0
  54. data/test/fixtures/db_definitions/sqlserver.drop.sql +30 -0
  55. data/test/fixtures/db_definitions/sqlserver.sql +203 -0
  56. data/test/fixtures/db_definitions/sqlserver2.drop.sql +2 -0
  57. data/test/fixtures/db_definitions/sqlserver2.sql +5 -0
  58. data/test/fixtures/db_definitions/sybase.drop.sql +31 -0
  59. data/test/fixtures/db_definitions/sybase.sql +204 -0
  60. data/test/fixtures/db_definitions/sybase2.drop.sql +4 -0
  61. data/test/fixtures/db_definitions/sybase2.sql +5 -0
  62. data/test/fixtures/db_definitions/virtuoso.drop.sql +30 -0
  63. data/test/fixtures/db_definitions/virtuoso.sql +200 -0
  64. data/test/fixtures/db_definitions/virtuoso2.drop.sql +2 -0
  65. data/test/fixtures/db_definitions/virtuoso2.sql +5 -0
  66. metadata +149 -0
@@ -0,0 +1,4 @@
1
+ DROP TABLE courses
2
+ go
3
+
4
+
@@ -0,0 +1,5 @@
1
+ CREATE TABLE courses (
2
+ id int NOT NULL PRIMARY KEY,
3
+ name varchar(255) NOT NULL
4
+ )
5
+ go
@@ -0,0 +1,30 @@
1
+ DROP TABLE accounts;
2
+ DROP TABLE funny_jokes;
3
+ DROP TABLE companies;
4
+ DROP TABLE topics;
5
+ DROP TABLE developers;
6
+ DROP TABLE projects;
7
+ DROP TABLE developers_projects;
8
+ DROP TABLE customers;
9
+ DROP TABLE orders;
10
+ DROP TABLE movies;
11
+ DROP TABLE subscribers;
12
+ DROP TABLE booleantests;
13
+ DROP TABLE auto_id_tests;
14
+ DROP TABLE entrants;
15
+ DROP TABLE colnametests;
16
+ DROP TABLE mixins;
17
+ DROP TABLE people;
18
+ DROP TABLE readers;
19
+ DROP TABLE binaries;
20
+ DROP TABLE computers;
21
+ DROP TABLE posts;
22
+ DROP TABLE comments;
23
+ DROP TABLE authors;
24
+ DROP TABLE tasks;
25
+ DROP TABLE categories;
26
+ DROP TABLE categories_posts;
27
+ DROP TABLE fk_test_has_fk;
28
+ DROP TABLE fk_test_has_pk;
29
+ DROP TABLE keyboards;
30
+ DROP TABLE legacy_things;
@@ -0,0 +1,200 @@
1
+ CREATE TABLE accounts (
2
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
3
+ firm_id int default NULL,
4
+ credit_limit int default NULL
5
+ );
6
+
7
+ CREATE TABLE funny_jokes (
8
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
9
+ name varchar(50) default NULL
10
+ );
11
+
12
+ CREATE TABLE companies (
13
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
14
+ type varchar(50) default NULL,
15
+ ruby_type varchar(50) default NULL,
16
+ firm_id int default NULL,
17
+ name varchar(50) default NULL,
18
+ client_of int default NULL,
19
+ rating int default 1
20
+ );
21
+
22
+ CREATE TABLE topics (
23
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
24
+ title varchar(255) default NULL,
25
+ author_name varchar(255) default NULL,
26
+ author_email_address varchar(255) default NULL,
27
+ written_on datetime default NULL,
28
+ bonus_time datetime default NULL,
29
+ last_read date default NULL,
30
+ content varchar(255) default NULL,
31
+ approved smallint default 1,
32
+ replies_count int default 0,
33
+ parent_id int default NULL,
34
+ type varchar(50) default NULL
35
+ );
36
+
37
+ CREATE TABLE developers (
38
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
39
+ name varchar(100) default NULL,
40
+ salary int default 70000,
41
+ created_at datetime default NULL,
42
+ updated_at datetime default NULL
43
+ );
44
+
45
+ CREATE TABLE projects (
46
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
47
+ name varchar(100) default NULL,
48
+ type varchar(255) default NULL
49
+ );
50
+
51
+ CREATE TABLE developers_projects (
52
+ developer_id int NOT NULL,
53
+ project_id int NOT NULL,
54
+ joined_on date default NULL,
55
+ access_level int default 1
56
+ );
57
+
58
+ CREATE TABLE orders (
59
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
60
+ name varchar(100) default NULL,
61
+ billing_customer_id int default NULL,
62
+ shipping_customer_id int default NULL
63
+ );
64
+
65
+
66
+ CREATE TABLE customers (
67
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
68
+ name varchar(100) default NULL,
69
+ balance int default 0,
70
+ address_street varchar(100) default NULL,
71
+ address_city varchar(100) default NULL,
72
+ address_country varchar(100) default NULL,
73
+ gps_location varchar(100) default NULL
74
+ );
75
+
76
+ CREATE TABLE movies (
77
+ movieid int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
78
+ name varchar(100) default NULL
79
+ );
80
+
81
+ CREATE TABLE subscribers (
82
+ nick varchar(100) NOT NULL PRIMARY KEY,
83
+ name varchar(100) default NULL
84
+ );
85
+
86
+ CREATE TABLE booleantests (
87
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
88
+ value smallint default NULL
89
+ );
90
+
91
+ CREATE TABLE auto_id_tests (
92
+ auto_id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
93
+ value int default NULL
94
+ );
95
+
96
+ CREATE TABLE entrants (
97
+ id int NOT NULL PRIMARY KEY,
98
+ name varchar(255) NOT NULL,
99
+ course_id int NOT NULL
100
+ );
101
+
102
+ CREATE TABLE colnametests (
103
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
104
+ "references" int NOT NULL
105
+ );
106
+
107
+ CREATE TABLE mixins (
108
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
109
+ parent_id int default NULL,
110
+ pos int default NULL,
111
+ created_at datetime default NULL,
112
+ updated_at datetime default NULL,
113
+ lft int default NULL,
114
+ rgt int default NULL,
115
+ root_id int default NULL,
116
+ type varchar(40) default NULL
117
+ );
118
+
119
+ CREATE TABLE people (
120
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1),
121
+ first_name varchar(40) NULL,
122
+ lock_version int default 0,
123
+ PRIMARY KEY (id)
124
+ );
125
+
126
+ CREATE TABLE readers (
127
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
128
+ post_id int NOT NULL,
129
+ person_id int NOT NULL
130
+ );
131
+
132
+ CREATE TABLE binaries (
133
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
134
+ data long varbinary default NULL
135
+ );
136
+
137
+ CREATE TABLE computers (
138
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
139
+ developer int NOT NULL,
140
+ extendedWarranty int NOT NULL
141
+ );
142
+
143
+ CREATE TABLE posts (
144
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
145
+ author_id int default NULL,
146
+ title varchar(255) default NULL,
147
+ type varchar(255) default NULL,
148
+ body long varchar default NULL
149
+ );
150
+
151
+ CREATE TABLE comments (
152
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
153
+ post_id int default NULL,
154
+ type varchar(255) default NULL,
155
+ body long varchar default NULL
156
+ );
157
+
158
+ CREATE TABLE authors (
159
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
160
+ name varchar(255) default NULL
161
+ );
162
+
163
+ CREATE TABLE tasks (
164
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
165
+ starting datetime default NULL,
166
+ ending datetime default NULL
167
+ );
168
+
169
+ CREATE TABLE categories (
170
+ id int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
171
+ name varchar(255),
172
+ type varchar(255) default NULL
173
+ );
174
+
175
+ CREATE TABLE categories_posts (
176
+ category_id int NOT NULL,
177
+ post_id int NOT NULL
178
+ );
179
+
180
+ CREATE TABLE keyboards (
181
+ key_number int NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
182
+ name varchar(50) default NULL
183
+ );
184
+
185
+ CREATE TABLE fk_test_has_pk (
186
+ id INTEGER NOT NULL PRIMARY KEY
187
+ );
188
+
189
+ CREATE TABLE fk_test_has_fk (
190
+ id INTEGER NOT NULL PRIMARY KEY,
191
+ fk_id INTEGER NOT NULL,
192
+
193
+ FOREIGN KEY (fk_id) REFERENCES fk_test_has_pk(id)
194
+ );
195
+
196
+ CREATE TABLE legacy_things (
197
+ id INTEGER NOT NULL IDENTITY (START WITH 1, INCREMENT BY 1) PRIMARY KEY,
198
+ tps_report_number int default NULL,
199
+ version int default 0
200
+ );
@@ -0,0 +1,2 @@
1
+ DROP TABLE courses;
2
+
@@ -0,0 +1,5 @@
1
+ CREATE TABLE courses (
2
+ id int NOT NULL PRIMARY KEY,
3
+ name varchar(255) NOT NULL
4
+ );
5
+
metadata ADDED
@@ -0,0 +1,149 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: odbc-rails
5
+ version: !ruby/object:Gem::Version
6
+ version: "1.2"
7
+ date: 2006-12-11 00:00:00 +01:00
8
+ summary: ODBC Data Adapter for ActiveRecord.
9
+ require_paths:
10
+ - lib
11
+ email: cblakeley@openlinksw.co.uk
12
+ homepage: http://odbc-rails.rubyforge.org
13
+ rubyforge_project:
14
+ description:
15
+ autorequire: odbc_adapter
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Carl Blakeley
31
+ files:
32
+ - lib/active_record
33
+ - lib/odbc_adapter.rb
34
+ - lib/active_record/connection_adapters
35
+ - lib/active_record/vendor
36
+ - lib/active_record/connection_adapters/odbc_adapter.rb
37
+ - lib/active_record/vendor/odbcext_db2.rb
38
+ - lib/active_record/vendor/odbcext_informix.rb
39
+ - lib/active_record/vendor/odbcext_informix_col.rb
40
+ - lib/active_record/vendor/odbcext_ingres.rb
41
+ - lib/active_record/vendor/odbcext_microsoftsqlserver.rb
42
+ - lib/active_record/vendor/odbcext_microsoftsqlserver_col.rb
43
+ - lib/active_record/vendor/odbcext_mysql.rb
44
+ - lib/active_record/vendor/odbcext_oracle.rb
45
+ - lib/active_record/vendor/odbcext_postgresql.rb
46
+ - lib/active_record/vendor/odbcext_progress.rb
47
+ - lib/active_record/vendor/odbcext_progress89.rb
48
+ - lib/active_record/vendor/odbcext_sybase.rb
49
+ - lib/active_record/vendor/odbcext_sybase_col.rb
50
+ - lib/active_record/vendor/odbcext_virtuoso.rb
51
+ - test/connections
52
+ - test/fixtures
53
+ - test/connections/native_odbc
54
+ - test/connections/native_odbc/connection.rb
55
+ - test/fixtures/db_definitions
56
+ - test/fixtures/db_definitions/db2.drop.sql
57
+ - test/fixtures/db_definitions/db2.sql
58
+ - test/fixtures/db_definitions/db22.drop.sql
59
+ - test/fixtures/db_definitions/db22.sql
60
+ - test/fixtures/db_definitions/informix.drop.sql
61
+ - test/fixtures/db_definitions/informix.sql
62
+ - test/fixtures/db_definitions/informix2.drop.sql
63
+ - test/fixtures/db_definitions/informix2.sql
64
+ - test/fixtures/db_definitions/ingres.drop.sql
65
+ - test/fixtures/db_definitions/ingres.sql
66
+ - test/fixtures/db_definitions/ingres2.drop.sql
67
+ - test/fixtures/db_definitions/ingres2.sql
68
+ - test/fixtures/db_definitions/mysql.drop.sql
69
+ - test/fixtures/db_definitions/mysql.sql
70
+ - test/fixtures/db_definitions/mysql2.drop.sql
71
+ - test/fixtures/db_definitions/mysql2.sql
72
+ - test/fixtures/db_definitions/oracle_odbc.drop.sql
73
+ - test/fixtures/db_definitions/oracle_odbc.sql
74
+ - test/fixtures/db_definitions/oracle_odbc2.drop.sql
75
+ - test/fixtures/db_definitions/oracle_odbc2.sql
76
+ - test/fixtures/db_definitions/progress.drop.sql
77
+ - test/fixtures/db_definitions/progress.sql
78
+ - test/fixtures/db_definitions/progress2.drop.sql
79
+ - test/fixtures/db_definitions/progress2.sql
80
+ - test/fixtures/db_definitions/sqlserver.drop.sql
81
+ - test/fixtures/db_definitions/sqlserver.sql
82
+ - test/fixtures/db_definitions/sqlserver2.drop.sql
83
+ - test/fixtures/db_definitions/sqlserver2.sql
84
+ - test/fixtures/db_definitions/sybase.drop.sql
85
+ - test/fixtures/db_definitions/sybase.sql
86
+ - test/fixtures/db_definitions/sybase2.drop.sql
87
+ - test/fixtures/db_definitions/sybase2.sql
88
+ - test/fixtures/db_definitions/virtuoso.drop.sql
89
+ - test/fixtures/db_definitions/virtuoso.sql
90
+ - test/fixtures/db_definitions/virtuoso2.drop.sql
91
+ - test/fixtures/db_definitions/virtuoso2.sql
92
+ - support/lib
93
+ - support/odbc_rails.diff
94
+ - support/pack_odbc.rb
95
+ - support/rake
96
+ - support/test
97
+ - support/lib/active_record
98
+ - support/lib/active_record/connection_adapters
99
+ - support/lib/active_record/connection_adapters/abstract
100
+ - support/lib/active_record/connection_adapters/abstract/schema_definitions.rb
101
+ - support/rake/rails_plugin_package_task.rb
102
+ - support/test/base_test.rb
103
+ - support/test/migration_test.rb
104
+ - AUTHORS
105
+ - ChangeLog
106
+ - COPYING
107
+ - LICENSE
108
+ - NEWS
109
+ - README
110
+ test_files: []
111
+
112
+ rdoc_options:
113
+ - --title
114
+ - OpenLink ODBC Adapter for Ruby on Rails
115
+ - --line-numbers
116
+ - --inline-source
117
+ - --main
118
+ - README
119
+ - --exclude
120
+ - lib/odbc_adapter.rb
121
+ - --exclude
122
+ - pack_odbc.rb
123
+ - --exclude
124
+ - vendor
125
+ - --exclude
126
+ - support
127
+ - --exclude
128
+ - test
129
+ - --include
130
+ - active_record/connection_adapters/*.rb
131
+ extra_rdoc_files:
132
+ - README
133
+ - COPYING
134
+ executables: []
135
+
136
+ extensions: []
137
+
138
+ requirements: []
139
+
140
+ dependencies:
141
+ - !ruby/object:Gem::Dependency
142
+ name: activerecord
143
+ version_requirement:
144
+ version_requirements: !ruby/object:Gem::Version::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: "1.11"
149
+ version: