ibm_db 1.1.1-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/CHANGES +155 -0
  2. data/LICENSE +18 -0
  3. data/MANIFEST +14 -0
  4. data/README +274 -0
  5. data/ext/Makefile.nt32 +181 -0
  6. data/ext/extconf.rb +58 -0
  7. data/ext/ibm_db.c +6553 -0
  8. data/ext/ruby_ibm_db.h +214 -0
  9. data/init.rb +42 -0
  10. data/lib/IBM_DB.rb +2 -0
  11. data/lib/active_record/connection_adapters/ibm_db_adapter.rb +2218 -0
  12. data/lib/active_record/vendor/db2-i5-zOS.yaml +328 -0
  13. data/lib/mswin32/ibm_db.so +0 -0
  14. data/test/cases/adapter_test.rb +180 -0
  15. data/test/cases/associations/cascaded_eager_loading_test.rb +133 -0
  16. data/test/cases/associations/eager_test.rb +842 -0
  17. data/test/cases/associations/has_and_belongs_to_many_associations_test.rb +874 -0
  18. data/test/cases/associations/has_many_through_associations_test.rb +281 -0
  19. data/test/cases/associations/join_model_test.rb +801 -0
  20. data/test/cases/attribute_methods_test.rb +312 -0
  21. data/test/cases/base_test.rb +2114 -0
  22. data/test/cases/calculations_test.rb +346 -0
  23. data/test/cases/finder_test.rb +1092 -0
  24. data/test/cases/fixtures_test.rb +660 -0
  25. data/test/cases/migration_test.rb +1618 -0
  26. data/test/cases/schema_dumper_test.rb +197 -0
  27. data/test/cases/validations_test.rb +1604 -0
  28. data/test/connections/native_ibm_db/connection.rb +40 -0
  29. data/test/ibm_db_test.rb +25 -0
  30. data/test/models/warehouse_thing.rb +5 -0
  31. data/test/schema/i5/ibm_db_specific_schema.rb +134 -0
  32. data/test/schema/ids/ibm_db_specific_schema.rb +137 -0
  33. data/test/schema/luw/ibm_db_specific_schema.rb +134 -0
  34. data/test/schema/schema.rb +499 -0
  35. data/test/schema/zOS/ibm_db_specific_schema.rb +205 -0
  36. metadata +115 -0
@@ -0,0 +1,205 @@
1
+ ActiveRecord::Schema.define do
2
+
3
+ execute "DROP TABLE COMMENTS" rescue nil
4
+ execute "DROP TABLE POSTS" rescue nil
5
+ execute "DROP TABLE ITEMS" rescue nil
6
+ execute "DROP TABLE TOPICS" rescue nil
7
+ execute "DROP TABLE fk_test_has_fk" rescue nil
8
+ execute "DROP TABLE fk_test_has_pk" rescue nil
9
+ execute "DROP TABLE CIRCLES" rescue nil
10
+ execute "DROP TABLE SQUARES" rescue nil
11
+ execute "DROP TABLE TRIANGLES" rescue nil
12
+ execute "DROP TABLE NON_POLY_ONES" rescue nil
13
+ execute "DROP TABLE NON_POLY_TWOS" rescue nil
14
+ execute "DROP TABLE PAINT_COLORS" rescue nil
15
+ execute "DROP TABLE PAINT_TEXTURES" rescue nil
16
+
17
+ execute <<_SQL
18
+ CREATE TABLE comments (
19
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
20
+ post_id INT NOT NULL,
21
+ type VARCHAR(255) DEFAULT NULL,
22
+ body VARCHAR(3000)NOT NULL,
23
+ PRIMARY KEY (id)
24
+ );
25
+ _SQL
26
+
27
+ execute <<_SQL
28
+ CREATE UNIQUE INDEX comments_id_idx ON comments(id);
29
+ _SQL
30
+
31
+ execute <<_SQL
32
+ CREATE TABLE posts (
33
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
34
+ author_id INT DEFAULT NULL,
35
+ title VARCHAR(255) NOT NULL,
36
+ type VARCHAR(255) DEFAULT NULL,
37
+ body VARCHAR(3000) NOT NULL,
38
+ comments_count integer DEFAULT 0,
39
+ taggings_count integer DEFAULT 0,
40
+ PRIMARY KEY (id)
41
+ );
42
+
43
+ _SQL
44
+
45
+ execute <<_SQL
46
+ CREATE UNIQUE INDEX posts_id_idx ON posts(id);
47
+ _SQL
48
+
49
+ execute <<_SQL
50
+ CREATE TABLE fk_test_has_pk (
51
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
52
+ PRIMARY KEY (id)
53
+ );
54
+ _SQL
55
+
56
+ execute <<_SQL
57
+ CREATE UNIQUE INDEX fk_has_pk_id_idx ON fk_test_has_pk(id);
58
+ _SQL
59
+
60
+ execute <<_SQL
61
+ CREATE TABLE fk_test_has_fk (
62
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
63
+ fk_id integer NOT NULL,
64
+ PRIMARY KEY (id),
65
+ FOREIGN KEY (fk_id) REFERENCES fk_test_has_pk(id)
66
+ );
67
+ _SQL
68
+
69
+ execute <<_SQL
70
+ CREATE UNIQUE INDEX fk_has_fk_id_idx ON fk_test_has_fk(id);
71
+ _SQL
72
+
73
+ execute <<_SQL
74
+ CREATE TABLE items (
75
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
76
+ name VARCHAR(255) DEFAULT NULL,
77
+ PRIMARY KEY (id)
78
+ );
79
+
80
+ _SQL
81
+
82
+ execute <<_SQL
83
+ CREATE UNIQUE INDEX items_id_idx ON items(id);
84
+ _SQL
85
+
86
+ execute <<_SQL
87
+ CREATE TABLE circles (
88
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
89
+ PRIMARY KEY (id)
90
+ );
91
+ _SQL
92
+
93
+ execute <<_SQL
94
+ CREATE UNIQUE INDEX circles_id_idx ON circles(id);
95
+ _SQL
96
+
97
+ execute <<_SQL
98
+ CREATE TABLE squares(
99
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
100
+ PRIMARY KEY (id)
101
+ );
102
+ _SQL
103
+
104
+ execute <<_SQL
105
+ CREATE UNIQUE INDEX squares_id_idx ON squares(id);
106
+ _SQL
107
+
108
+ execute <<_SQL
109
+ CREATE TABLE triangles(
110
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
111
+ PRIMARY KEY (id)
112
+ );
113
+ _SQL
114
+
115
+ execute <<_SQL
116
+ CREATE UNIQUE INDEX triangles_id_idx ON triangles(id);
117
+ _SQL
118
+
119
+ execute <<_SQL
120
+ CREATE TABLE non_poly_ones(
121
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
122
+ PRIMARY KEY (id)
123
+ );
124
+ _SQL
125
+
126
+ execute <<_SQL
127
+ CREATE UNIQUE INDEX non_poly_ones_id_idx ON non_poly_ones(id);
128
+ _SQL
129
+
130
+ execute <<_SQL
131
+ CREATE TABLE non_poly_twos(
132
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
133
+ PRIMARY KEY (id)
134
+ );
135
+ _SQL
136
+
137
+ execute <<_SQL
138
+ CREATE UNIQUE INDEX non_poly_twos_id_idx ON non_poly_twos(id);
139
+ _SQL
140
+
141
+ execute <<_SQL
142
+ CREATE TABLE paint_colors(
143
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
144
+ non_poly_one_id INT,
145
+ PRIMARY KEY (id)
146
+ );
147
+ _SQL
148
+
149
+ execute <<_SQL
150
+ CREATE UNIQUE INDEX paint_colors_id_idx ON paint_colors(id);
151
+ _SQL
152
+
153
+ execute <<_SQL
154
+ CREATE TABLE paint_textures(
155
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 1),
156
+ non_poly_two_id INT,
157
+ PRIMARY KEY (id)
158
+ );
159
+ _SQL
160
+
161
+ execute <<_SQL
162
+ CREATE UNIQUE INDEX paint_textures_id_idx ON paint_textures(id);
163
+ _SQL
164
+
165
+ execute <<_SQL
166
+ CREATE TABLE topics (
167
+ id INT GENERATED BY DEFAULT AS IDENTITY (START WITH 100),
168
+ title VARCHAR(255) DEFAULT NULL,
169
+ author_name VARCHAR(255) DEFAULT NULL,
170
+ author_email_address VARCHAR(255) DEFAULT NULL,
171
+ written_on TIMESTAMP DEFAULT NULL,
172
+ bonus_time TIME DEFAULT NULL,
173
+ last_read DATE DEFAULT NULL,
174
+ content VARCHAR(3000),
175
+ approved SMALLINT DEFAULT 1,
176
+ replies_count INT DEFAULT 0,
177
+ parent_id INT DEFAULT NULL,
178
+ parent_title VARCHAR(255) DEFAULT NULL,
179
+ type VARCHAR(50) DEFAULT NULL,
180
+ PRIMARY KEY (id)
181
+ );
182
+
183
+ _SQL
184
+
185
+ execute <<_SQL
186
+ CREATE UNIQUE INDEX topics_id_idx ON topics(id);
187
+ _SQL
188
+
189
+ execute <<_SQL
190
+ CREATE UNIQUE INDEX movies_id_idx ON movies(movieid);
191
+ _SQL
192
+
193
+ execute <<_SQL
194
+ CREATE UNIQUE INDEX auto_id_tests_id_idx ON auto_id_tests(auto_id);
195
+ _SQL
196
+
197
+ execute <<_SQL
198
+ CREATE UNIQUE INDEX mixed_case_monkeys_id_idx ON mixed_case_monkeys(monkeyID);
199
+ _SQL
200
+
201
+ execute <<_SQL
202
+ CREATE UNIQUE INDEX keyboards_id_idx ON keyboards(key_number);
203
+ _SQL
204
+
205
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ibm_db
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.1
5
+ platform: mswin32
6
+ authors:
7
+ - IBM
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-30 00:00:00 +05:30
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.15.1
24
+ version:
25
+ description:
26
+ email: rubyibm-developers@rubyforge.org
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - CHANGES
33
+ - README
34
+ - MANIFEST
35
+ files:
36
+ - CHANGES
37
+ - ext
38
+ - ext/extconf.rb
39
+ - ext/ibm_db.c
40
+ - ext/Makefile.nt32
41
+ - ext/ruby_ibm_db.h
42
+ - init.rb
43
+ - lib
44
+ - lib/active_record
45
+ - lib/active_record/connection_adapters
46
+ - lib/active_record/connection_adapters/ibm_db_adapter.rb
47
+ - lib/active_record/vendor
48
+ - lib/active_record/vendor/db2-i5-zOS.yaml
49
+ - lib/IBM_DB.rb
50
+ - lib/mswin32
51
+ - lib/mswin32/ibm_db.so
52
+ - LICENSE
53
+ - MANIFEST
54
+ - README
55
+ - test
56
+ - test/cases
57
+ - test/cases/adapter_test.rb
58
+ - test/cases/associations
59
+ - test/cases/associations/cascaded_eager_loading_test.rb
60
+ - test/cases/associations/eager_test.rb
61
+ - test/cases/associations/has_and_belongs_to_many_associations_test.rb
62
+ - test/cases/associations/has_many_through_associations_test.rb
63
+ - test/cases/associations/join_model_test.rb
64
+ - test/cases/attribute_methods_test.rb
65
+ - test/cases/base_test.rb
66
+ - test/cases/calculations_test.rb
67
+ - test/cases/finder_test.rb
68
+ - test/cases/fixtures_test.rb
69
+ - test/cases/migration_test.rb
70
+ - test/cases/schema_dumper_test.rb
71
+ - test/cases/validations_test.rb
72
+ - test/connections
73
+ - test/connections/native_ibm_db
74
+ - test/connections/native_ibm_db/connection.rb
75
+ - test/ibm_db_test.rb
76
+ - test/models
77
+ - test/models/warehouse_thing.rb
78
+ - test/schema
79
+ - test/schema/i5
80
+ - test/schema/i5/ibm_db_specific_schema.rb
81
+ - test/schema/ids
82
+ - test/schema/ids/ibm_db_specific_schema.rb
83
+ - test/schema/luw
84
+ - test/schema/luw/ibm_db_specific_schema.rb
85
+ - test/schema/schema.rb
86
+ - test/schema/zOS
87
+ - test/schema/zOS/ibm_db_specific_schema.rb
88
+ has_rdoc: true
89
+ homepage: http://rubyforge.org/projects/rubyibm/
90
+ post_install_message:
91
+ rdoc_options: []
92
+
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 1.8.5
100
+ version:
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: "0"
106
+ version:
107
+ requirements:
108
+ - ActiveRecord, at least 1.15.1
109
+ rubyforge_project: rubyibm
110
+ rubygems_version: 1.3.1
111
+ signing_key:
112
+ specification_version: 2
113
+ summary: "Rails Driver and Adapter for IBM Data Servers: {DB2 on Linux/Unix/Windows, DB2 on zOS, DB2 on i5/OS, Informix (IDS)}"
114
+ test_files:
115
+ - test/ibm_db_test.rb