square-arel 2.0.9.20110222133018

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/.autotest +26 -0
  2. data/History.txt +105 -0
  3. data/MIT-LICENSE.txt +20 -0
  4. data/Manifest.txt +124 -0
  5. data/README.markdown +94 -0
  6. data/Rakefile +20 -0
  7. data/lib/arel.rb +39 -0
  8. data/lib/arel/attributes.rb +20 -0
  9. data/lib/arel/attributes/attribute.rb +18 -0
  10. data/lib/arel/compatibility/wheres.rb +33 -0
  11. data/lib/arel/crud.rb +37 -0
  12. data/lib/arel/delete_manager.rb +18 -0
  13. data/lib/arel/deprecated.rb +4 -0
  14. data/lib/arel/expression.rb +4 -0
  15. data/lib/arel/expressions.rb +23 -0
  16. data/lib/arel/insert_manager.rb +34 -0
  17. data/lib/arel/nodes.rb +53 -0
  18. data/lib/arel/nodes/and.rb +6 -0
  19. data/lib/arel/nodes/as.rb +6 -0
  20. data/lib/arel/nodes/assignment.rb +6 -0
  21. data/lib/arel/nodes/avg.rb +6 -0
  22. data/lib/arel/nodes/between.rb +6 -0
  23. data/lib/arel/nodes/binary.rb +12 -0
  24. data/lib/arel/nodes/count.rb +13 -0
  25. data/lib/arel/nodes/delete_statement.rb +19 -0
  26. data/lib/arel/nodes/does_not_match.rb +6 -0
  27. data/lib/arel/nodes/equality.rb +9 -0
  28. data/lib/arel/nodes/except.rb +7 -0
  29. data/lib/arel/nodes/exists.rb +7 -0
  30. data/lib/arel/nodes/function.rb +18 -0
  31. data/lib/arel/nodes/greater_than.rb +6 -0
  32. data/lib/arel/nodes/greater_than_or_equal.rb +6 -0
  33. data/lib/arel/nodes/group.rb +6 -0
  34. data/lib/arel/nodes/grouping.rb +6 -0
  35. data/lib/arel/nodes/having.rb +6 -0
  36. data/lib/arel/nodes/in.rb +6 -0
  37. data/lib/arel/nodes/inner_join.rb +6 -0
  38. data/lib/arel/nodes/insert_statement.rb +19 -0
  39. data/lib/arel/nodes/intersect.rb +7 -0
  40. data/lib/arel/nodes/join.rb +13 -0
  41. data/lib/arel/nodes/less_than.rb +6 -0
  42. data/lib/arel/nodes/less_than_or_equal.rb +6 -0
  43. data/lib/arel/nodes/limit.rb +7 -0
  44. data/lib/arel/nodes/lock.rb +6 -0
  45. data/lib/arel/nodes/matches.rb +6 -0
  46. data/lib/arel/nodes/max.rb +6 -0
  47. data/lib/arel/nodes/min.rb +6 -0
  48. data/lib/arel/nodes/node.rb +44 -0
  49. data/lib/arel/nodes/not.rb +6 -0
  50. data/lib/arel/nodes/not_equal.rb +6 -0
  51. data/lib/arel/nodes/not_in.rb +6 -0
  52. data/lib/arel/nodes/offset.rb +7 -0
  53. data/lib/arel/nodes/on.rb +6 -0
  54. data/lib/arel/nodes/or.rb +6 -0
  55. data/lib/arel/nodes/ordering.rb +20 -0
  56. data/lib/arel/nodes/outer_join.rb +6 -0
  57. data/lib/arel/nodes/select_core.rb +26 -0
  58. data/lib/arel/nodes/select_statement.rb +22 -0
  59. data/lib/arel/nodes/sql_literal.rb +8 -0
  60. data/lib/arel/nodes/string_join.rb +11 -0
  61. data/lib/arel/nodes/sum.rb +6 -0
  62. data/lib/arel/nodes/table_alias.rb +13 -0
  63. data/lib/arel/nodes/top.rb +6 -0
  64. data/lib/arel/nodes/unary.rb +11 -0
  65. data/lib/arel/nodes/union.rb +7 -0
  66. data/lib/arel/nodes/union_all.rb +7 -0
  67. data/lib/arel/nodes/unqualified_column.rb +16 -0
  68. data/lib/arel/nodes/update_statement.rb +21 -0
  69. data/lib/arel/nodes/values.rb +14 -0
  70. data/lib/arel/predications.rb +183 -0
  71. data/lib/arel/relation.rb +6 -0
  72. data/lib/arel/select_manager.rb +237 -0
  73. data/lib/arel/sql/engine.rb +10 -0
  74. data/lib/arel/sql_literal.rb +4 -0
  75. data/lib/arel/table.rb +134 -0
  76. data/lib/arel/tree_manager.rb +36 -0
  77. data/lib/arel/update_manager.rb +49 -0
  78. data/lib/arel/visitors.rb +38 -0
  79. data/lib/arel/visitors/depth_first.rb +154 -0
  80. data/lib/arel/visitors/dot.rb +230 -0
  81. data/lib/arel/visitors/join_sql.rb +40 -0
  82. data/lib/arel/visitors/mssql.rb +16 -0
  83. data/lib/arel/visitors/mysql.rb +34 -0
  84. data/lib/arel/visitors/oracle.rb +116 -0
  85. data/lib/arel/visitors/order_clauses.rb +11 -0
  86. data/lib/arel/visitors/postgresql.rb +58 -0
  87. data/lib/arel/visitors/sqlite.rb +11 -0
  88. data/lib/arel/visitors/to_sql.rb +331 -0
  89. data/lib/arel/visitors/visitor.rb +27 -0
  90. data/lib/arel/visitors/where_sql.rb +9 -0
  91. data/square-arel.gemspec +36 -0
  92. data/test/attributes/test_attribute.rb +664 -0
  93. data/test/helper.rb +13 -0
  94. data/test/nodes/test_as.rb +16 -0
  95. data/test/nodes/test_count.rb +18 -0
  96. data/test/nodes/test_delete_statement.rb +14 -0
  97. data/test/nodes/test_equality.rb +74 -0
  98. data/test/nodes/test_insert_statement.rb +18 -0
  99. data/test/nodes/test_node.rb +33 -0
  100. data/test/nodes/test_not.rb +20 -0
  101. data/test/nodes/test_or.rb +22 -0
  102. data/test/nodes/test_select_core.rb +22 -0
  103. data/test/nodes/test_select_statement.rb +13 -0
  104. data/test/nodes/test_sql_literal.rb +52 -0
  105. data/test/nodes/test_sum.rb +12 -0
  106. data/test/nodes/test_update_statement.rb +18 -0
  107. data/test/support/fake_record.rb +91 -0
  108. data/test/test_activerecord_compat.rb +18 -0
  109. data/test/test_attributes.rb +46 -0
  110. data/test/test_crud.rb +69 -0
  111. data/test/test_delete_manager.rb +42 -0
  112. data/test/test_insert_manager.rb +125 -0
  113. data/test/test_select_manager.rb +659 -0
  114. data/test/test_table.rb +193 -0
  115. data/test/test_update_manager.rb +86 -0
  116. data/test/visitors/test_depth_first.rb +212 -0
  117. data/test/visitors/test_dot.rb +29 -0
  118. data/test/visitors/test_join_sql.rb +35 -0
  119. data/test/visitors/test_mssql.rb +18 -0
  120. data/test/visitors/test_mysql.rb +45 -0
  121. data/test/visitors/test_oracle.rb +147 -0
  122. data/test/visitors/test_postgres.rb +36 -0
  123. data/test/visitors/test_sqlite.rb +18 -0
  124. data/test/visitors/test_to_sql.rb +255 -0
  125. metadata +261 -0
metadata ADDED
@@ -0,0 +1,261 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: square-arel
3
+ version: !ruby/object:Gem::Version
4
+ hash: 40220444266111
5
+ prerelease:
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 9
10
+ - 20110222133018
11
+ version: 2.0.9.20110222133018
12
+ platform: ruby
13
+ authors:
14
+ - Aaron Patterson
15
+ - Bryan Halmkamp
16
+ - Emilio Tagua
17
+ - Nick Kallen
18
+ autorequire:
19
+ bindir: bin
20
+ cert_chain: []
21
+
22
+ date: 2011-02-22 00:00:00 Z
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
25
+ name: minitest
26
+ prerelease: false
27
+ requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 15
33
+ segments:
34
+ - 2
35
+ - 0
36
+ - 0
37
+ version: 2.0.0
38
+ type: :development
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
41
+ name: hoe
42
+ prerelease: false
43
+ requirement: &id002 !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ hash: 47
49
+ segments:
50
+ - 2
51
+ - 8
52
+ - 0
53
+ version: 2.8.0
54
+ type: :development
55
+ version_requirements: *id002
56
+ description: Arel is a Relational Algebra for Ruby. It 1) simplifies the generation complex of SQL queries and it 2) adapts to various RDBMS systems. It is intended to be a framework framework; that is, you can build your own ORM with it, focusing on innovative object and collection modeling as opposed to database compatibility and query generation.
57
+ email:
58
+ - aaron@tenderlovemaking.com
59
+ - bryan@brynary.com
60
+ - miloops@gmail.com
61
+ - nick@example.org
62
+ executables: []
63
+
64
+ extensions: []
65
+
66
+ extra_rdoc_files:
67
+ - History.txt
68
+ - MIT-LICENSE.txt
69
+ - Manifest.txt
70
+ - README.markdown
71
+ files:
72
+ - .autotest
73
+ - History.txt
74
+ - MIT-LICENSE.txt
75
+ - Manifest.txt
76
+ - README.markdown
77
+ - Rakefile
78
+ - square-arel.gemspec
79
+ - lib/arel.rb
80
+ - lib/arel/attributes.rb
81
+ - lib/arel/attributes/attribute.rb
82
+ - lib/arel/compatibility/wheres.rb
83
+ - lib/arel/crud.rb
84
+ - lib/arel/delete_manager.rb
85
+ - lib/arel/deprecated.rb
86
+ - lib/arel/expression.rb
87
+ - lib/arel/expressions.rb
88
+ - lib/arel/insert_manager.rb
89
+ - lib/arel/nodes.rb
90
+ - lib/arel/nodes/and.rb
91
+ - lib/arel/nodes/as.rb
92
+ - lib/arel/nodes/assignment.rb
93
+ - lib/arel/nodes/avg.rb
94
+ - lib/arel/nodes/between.rb
95
+ - lib/arel/nodes/binary.rb
96
+ - lib/arel/nodes/count.rb
97
+ - lib/arel/nodes/delete_statement.rb
98
+ - lib/arel/nodes/does_not_match.rb
99
+ - lib/arel/nodes/equality.rb
100
+ - lib/arel/nodes/except.rb
101
+ - lib/arel/nodes/exists.rb
102
+ - lib/arel/nodes/function.rb
103
+ - lib/arel/nodes/greater_than.rb
104
+ - lib/arel/nodes/greater_than_or_equal.rb
105
+ - lib/arel/nodes/group.rb
106
+ - lib/arel/nodes/grouping.rb
107
+ - lib/arel/nodes/having.rb
108
+ - lib/arel/nodes/in.rb
109
+ - lib/arel/nodes/inner_join.rb
110
+ - lib/arel/nodes/insert_statement.rb
111
+ - lib/arel/nodes/intersect.rb
112
+ - lib/arel/nodes/join.rb
113
+ - lib/arel/nodes/less_than.rb
114
+ - lib/arel/nodes/less_than_or_equal.rb
115
+ - lib/arel/nodes/limit.rb
116
+ - lib/arel/nodes/lock.rb
117
+ - lib/arel/nodes/matches.rb
118
+ - lib/arel/nodes/max.rb
119
+ - lib/arel/nodes/min.rb
120
+ - lib/arel/nodes/node.rb
121
+ - lib/arel/nodes/not.rb
122
+ - lib/arel/nodes/not_equal.rb
123
+ - lib/arel/nodes/not_in.rb
124
+ - lib/arel/nodes/offset.rb
125
+ - lib/arel/nodes/on.rb
126
+ - lib/arel/nodes/or.rb
127
+ - lib/arel/nodes/ordering.rb
128
+ - lib/arel/nodes/outer_join.rb
129
+ - lib/arel/nodes/select_core.rb
130
+ - lib/arel/nodes/select_statement.rb
131
+ - lib/arel/nodes/sql_literal.rb
132
+ - lib/arel/nodes/string_join.rb
133
+ - lib/arel/nodes/sum.rb
134
+ - lib/arel/nodes/table_alias.rb
135
+ - lib/arel/nodes/top.rb
136
+ - lib/arel/nodes/unary.rb
137
+ - lib/arel/nodes/union.rb
138
+ - lib/arel/nodes/union_all.rb
139
+ - lib/arel/nodes/unqualified_column.rb
140
+ - lib/arel/nodes/update_statement.rb
141
+ - lib/arel/nodes/values.rb
142
+ - lib/arel/predications.rb
143
+ - lib/arel/relation.rb
144
+ - lib/arel/select_manager.rb
145
+ - lib/arel/sql/engine.rb
146
+ - lib/arel/sql_literal.rb
147
+ - lib/arel/table.rb
148
+ - lib/arel/tree_manager.rb
149
+ - lib/arel/update_manager.rb
150
+ - lib/arel/visitors.rb
151
+ - lib/arel/visitors/depth_first.rb
152
+ - lib/arel/visitors/dot.rb
153
+ - lib/arel/visitors/join_sql.rb
154
+ - lib/arel/visitors/mssql.rb
155
+ - lib/arel/visitors/mysql.rb
156
+ - lib/arel/visitors/oracle.rb
157
+ - lib/arel/visitors/order_clauses.rb
158
+ - lib/arel/visitors/postgresql.rb
159
+ - lib/arel/visitors/sqlite.rb
160
+ - lib/arel/visitors/to_sql.rb
161
+ - lib/arel/visitors/visitor.rb
162
+ - lib/arel/visitors/where_sql.rb
163
+ - test/attributes/test_attribute.rb
164
+ - test/helper.rb
165
+ - test/nodes/test_as.rb
166
+ - test/nodes/test_count.rb
167
+ - test/nodes/test_delete_statement.rb
168
+ - test/nodes/test_equality.rb
169
+ - test/nodes/test_insert_statement.rb
170
+ - test/nodes/test_node.rb
171
+ - test/nodes/test_not.rb
172
+ - test/nodes/test_or.rb
173
+ - test/nodes/test_select_core.rb
174
+ - test/nodes/test_select_statement.rb
175
+ - test/nodes/test_sql_literal.rb
176
+ - test/nodes/test_sum.rb
177
+ - test/nodes/test_update_statement.rb
178
+ - test/support/fake_record.rb
179
+ - test/test_activerecord_compat.rb
180
+ - test/test_attributes.rb
181
+ - test/test_crud.rb
182
+ - test/test_delete_manager.rb
183
+ - test/test_insert_manager.rb
184
+ - test/test_select_manager.rb
185
+ - test/test_table.rb
186
+ - test/test_update_manager.rb
187
+ - test/visitors/test_depth_first.rb
188
+ - test/visitors/test_dot.rb
189
+ - test/visitors/test_join_sql.rb
190
+ - test/visitors/test_mssql.rb
191
+ - test/visitors/test_mysql.rb
192
+ - test/visitors/test_oracle.rb
193
+ - test/visitors/test_postgres.rb
194
+ - test/visitors/test_sqlite.rb
195
+ - test/visitors/test_to_sql.rb
196
+ homepage: http://github.com/rails/arel
197
+ licenses: []
198
+
199
+ post_install_message:
200
+ rdoc_options:
201
+ - --main
202
+ - README.markdown
203
+ require_paths:
204
+ - lib
205
+ required_ruby_version: !ruby/object:Gem::Requirement
206
+ none: false
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ hash: 3
211
+ segments:
212
+ - 0
213
+ version: "0"
214
+ required_rubygems_version: !ruby/object:Gem::Requirement
215
+ none: false
216
+ requirements:
217
+ - - ">="
218
+ - !ruby/object:Gem::Version
219
+ hash: 3
220
+ segments:
221
+ - 0
222
+ version: "0"
223
+ requirements: []
224
+
225
+ rubyforge_project: arel
226
+ rubygems_version: 1.8.2
227
+ signing_key:
228
+ specification_version: 3
229
+ summary: Arel is a Relational Algebra for Ruby
230
+ test_files:
231
+ - test/attributes/test_attribute.rb
232
+ - test/nodes/test_as.rb
233
+ - test/nodes/test_count.rb
234
+ - test/nodes/test_delete_statement.rb
235
+ - test/nodes/test_equality.rb
236
+ - test/nodes/test_insert_statement.rb
237
+ - test/nodes/test_node.rb
238
+ - test/nodes/test_not.rb
239
+ - test/nodes/test_or.rb
240
+ - test/nodes/test_select_core.rb
241
+ - test/nodes/test_select_statement.rb
242
+ - test/nodes/test_sql_literal.rb
243
+ - test/nodes/test_sum.rb
244
+ - test/nodes/test_update_statement.rb
245
+ - test/test_activerecord_compat.rb
246
+ - test/test_attributes.rb
247
+ - test/test_crud.rb
248
+ - test/test_delete_manager.rb
249
+ - test/test_insert_manager.rb
250
+ - test/test_select_manager.rb
251
+ - test/test_table.rb
252
+ - test/test_update_manager.rb
253
+ - test/visitors/test_depth_first.rb
254
+ - test/visitors/test_dot.rb
255
+ - test/visitors/test_join_sql.rb
256
+ - test/visitors/test_mssql.rb
257
+ - test/visitors/test_mysql.rb
258
+ - test/visitors/test_oracle.rb
259
+ - test/visitors/test_postgres.rb
260
+ - test/visitors/test_sqlite.rb
261
+ - test/visitors/test_to_sql.rb