activerecord-jdbc-adapter 1.2.9.1 → 1.3.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/.travis.yml +3 -0
  2. data/Appraisals +12 -4
  3. data/Gemfile +3 -3
  4. data/Gemfile.lock +19 -19
  5. data/History.txt +90 -16
  6. data/LICENSE.txt +2 -1
  7. data/README.md +14 -1
  8. data/activerecord-jdbc-adapter.gemspec +2 -2
  9. data/gemfiles/rails23.gemfile +5 -5
  10. data/gemfiles/rails23.gemfile.lock +27 -27
  11. data/gemfiles/rails30.gemfile +3 -3
  12. data/gemfiles/rails30.gemfile.lock +8 -8
  13. data/gemfiles/rails31.gemfile +4 -4
  14. data/gemfiles/rails31.gemfile.lock +18 -18
  15. data/gemfiles/rails32.gemfile +4 -4
  16. data/gemfiles/rails32.gemfile.lock +17 -17
  17. data/gemfiles/rails40.gemfile +17 -0
  18. data/gemfiles/rails40.gemfile.lock +126 -0
  19. data/lib/activerecord-jdbc-adapter.rb +0 -7
  20. data/lib/arjdbc.rb +6 -5
  21. data/lib/arjdbc/db2.rb +1 -1
  22. data/lib/arjdbc/db2/adapter.rb +52 -29
  23. data/lib/arjdbc/db2/connection_methods.rb +13 -14
  24. data/lib/arjdbc/derby.rb +1 -1
  25. data/lib/arjdbc/derby/adapter.rb +29 -9
  26. data/lib/arjdbc/derby/connection_methods.rb +17 -20
  27. data/lib/arjdbc/firebird.rb +1 -1
  28. data/lib/arjdbc/h2.rb +2 -2
  29. data/lib/arjdbc/h2/adapter.rb +1 -1
  30. data/lib/arjdbc/h2/connection_methods.rb +12 -16
  31. data/lib/arjdbc/hsqldb.rb +1 -1
  32. data/lib/arjdbc/hsqldb/connection_methods.rb +13 -16
  33. data/lib/arjdbc/informix.rb +1 -1
  34. data/lib/arjdbc/informix/connection_methods.rb +8 -10
  35. data/lib/arjdbc/jdbc.rb +1 -1
  36. data/lib/arjdbc/jdbc/adapter.rb +125 -53
  37. data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
  38. data/lib/arjdbc/jdbc/base_ext.rb +34 -9
  39. data/lib/arjdbc/jdbc/column.rb +15 -2
  40. data/lib/arjdbc/jdbc/connection.rb +0 -2
  41. data/lib/arjdbc/jdbc/connection_methods.rb +10 -3
  42. data/lib/arjdbc/jdbc/driver.rb +2 -2
  43. data/lib/arjdbc/jdbc/extension.rb +35 -21
  44. data/lib/arjdbc/jdbc/java.rb +0 -2
  45. data/lib/arjdbc/jdbc/missing_functionality_helper.rb +35 -25
  46. data/lib/arjdbc/jdbc/railtie.rb +2 -9
  47. data/lib/arjdbc/mimer.rb +1 -1
  48. data/lib/arjdbc/mssql.rb +2 -2
  49. data/lib/arjdbc/mssql/adapter.rb +271 -92
  50. data/lib/arjdbc/mssql/connection_methods.rb +30 -32
  51. data/lib/arjdbc/mssql/explain_support.rb +107 -0
  52. data/lib/arjdbc/mssql/limit_helpers.rb +48 -18
  53. data/lib/arjdbc/mysql.rb +1 -1
  54. data/lib/arjdbc/mysql/adapter.rb +63 -14
  55. data/lib/arjdbc/mysql/connection_methods.rb +22 -24
  56. data/lib/arjdbc/mysql/explain_support.rb +2 -5
  57. data/lib/arjdbc/oracle.rb +1 -1
  58. data/lib/arjdbc/oracle/adapter.rb +78 -38
  59. data/lib/arjdbc/oracle/connection_methods.rb +9 -10
  60. data/lib/arjdbc/postgresql.rb +1 -1
  61. data/lib/arjdbc/postgresql/adapter.rb +964 -380
  62. data/lib/arjdbc/postgresql/column_cast.rb +136 -0
  63. data/lib/arjdbc/postgresql/connection_methods.rb +19 -21
  64. data/lib/arjdbc/postgresql/explain_support.rb +3 -6
  65. data/lib/arjdbc/railtie.rb +9 -0
  66. data/lib/arjdbc/sqlite3.rb +1 -1
  67. data/lib/arjdbc/sqlite3/adapter.rb +73 -26
  68. data/lib/arjdbc/sqlite3/connection_methods.rb +27 -28
  69. data/lib/arjdbc/sqlite3/explain_support.rb +2 -5
  70. data/lib/arjdbc/sybase.rb +1 -1
  71. data/lib/arjdbc/version.rb +5 -4
  72. data/pom.xml +8 -0
  73. data/rakelib/02-test.rake +57 -51
  74. data/rakelib/compile.rake +17 -5
  75. data/rakelib/rails.rake +42 -31
  76. data/src/java/arjdbc/db2/DB2RubyJdbcConnection.java +4 -3
  77. data/src/java/arjdbc/derby/DerbyModule.java +98 -85
  78. data/src/java/arjdbc/derby/DerbyRubyJdbcConnection.java +70 -0
  79. data/src/java/arjdbc/h2/H2RubyJdbcConnection.java +0 -4
  80. data/src/java/arjdbc/jdbc/AdapterJavaService.java +26 -15
  81. data/src/java/arjdbc/jdbc/Callable.java +44 -0
  82. data/src/java/arjdbc/jdbc/JdbcConnectionFactory.java +10 -2
  83. data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +1675 -834
  84. data/src/java/arjdbc/jdbc/SQLBlock.java +9 -3
  85. data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +73 -36
  86. data/src/java/arjdbc/mysql/MySQLModule.java +11 -10
  87. data/src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java +86 -80
  88. data/src/java/arjdbc/oracle/OracleRubyJdbcConnection.java +27 -7
  89. data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +214 -0
  90. data/src/java/arjdbc/postgresql/PostgresqlRubyJdbcConnection.java +25 -67
  91. data/src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java +52 -49
  92. data/src/java/arjdbc/util/QuotingUtils.java +6 -6
  93. data/test/abstract_db_create.rb +11 -11
  94. data/test/activerecord/connection_adapters/type_conversion_test.rb +18 -12
  95. data/test/db/db2.rb +1 -1
  96. data/test/{db2_binary_test.rb → db/db2/binary_test.rb} +0 -0
  97. data/test/db/db2/has_many_through_test.rb +6 -0
  98. data/test/{db2_reset_column_information_test.rb → db/db2/reset_column_information_test.rb} +1 -2
  99. data/test/{db2_serialize_test.rb → db/db2/serialize_test.rb} +0 -0
  100. data/test/{db2_simple_test.rb → db/db2/simple_test.rb} +1 -8
  101. data/test/db/db2/test_helper.rb +6 -0
  102. data/test/{db2_test.rb → db/db2/unit_test.rb} +1 -1
  103. data/test/db/derby.rb +1 -1
  104. data/test/{derby_binary_test.rb → db/derby/binary_test.rb} +0 -0
  105. data/test/{derby_migration_test.rb → db/derby/migration_test.rb} +0 -0
  106. data/test/{derby_reset_column_information_test.rb → db/derby/reset_column_information_test.rb} +0 -0
  107. data/test/{derby_row_locking_test.rb → db/derby/row_locking_test.rb} +1 -4
  108. data/test/db/derby/schema_dump_test.rb +5 -0
  109. data/test/{derby_serialize_test.rb → db/derby/serialize_test.rb} +0 -0
  110. data/test/{derby_simple_test.rb → db/derby/simple_test.rb} +23 -38
  111. data/test/db/derby/test_helper.rb +6 -0
  112. data/test/db/derby/unit_test.rb +32 -0
  113. data/test/db/derby/xml_column_test.rb +17 -0
  114. data/test/db/h2.rb +1 -1
  115. data/test/{h2_binary_test.rb → db/h2/binary_test.rb} +0 -0
  116. data/test/{h2_change_column_test.rb → db/h2/change_column_test.rb} +1 -0
  117. data/test/{h2_schema_dump_test.rb → db/h2/schema_dump_test.rb} +0 -0
  118. data/test/{h2_serialize_test.rb → db/h2/serialize_test.rb} +0 -0
  119. data/test/{h2_simple_test.rb → db/h2/simple_test.rb} +3 -1
  120. data/test/db/hsqldb.rb +1 -1
  121. data/test/{hsqldb_binary_test.rb → db/hsqldb/binary_test.rb} +0 -0
  122. data/test/{hsqldb_schema_dump_test.rb → db/hsqldb/schema_dump_test.rb} +0 -0
  123. data/test/{hsqldb_serialize_test.rb → db/hsqldb/serialize_test.rb} +0 -0
  124. data/test/{hsqldb_simple_test.rb → db/hsqldb/simple_test.rb} +3 -1
  125. data/test/db/informix.rb +1 -1
  126. data/test/db/jdbc.rb +3 -2
  127. data/test/db/jdbc_derby.rb +1 -1
  128. data/test/db/jdbc_h2.rb +1 -1
  129. data/test/db/jdbc_mysql.rb +1 -1
  130. data/test/db/jdbc_postgres.rb +1 -1
  131. data/test/db/jndi_config.rb +1 -2
  132. data/test/db/jndi_pooled_config.rb +2 -3
  133. data/test/db/mssql.rb +2 -2
  134. data/test/{mssql_binary_test.rb → db/mssql/binary_test.rb} +0 -0
  135. data/test/{mssql_db_create_test.rb → db/mssql/db_create_test.rb} +1 -1
  136. data/test/db/mssql/exec_proc_test.rb +46 -0
  137. data/test/{mssql_identity_insert_test.rb → db/mssql/identity_insert_test.rb} +0 -0
  138. data/test/db/mssql/ignore_system_views_test.rb +40 -0
  139. data/test/{mssql_limit_offset_test.rb → db/mssql/limit_offset_test.rb} +10 -1
  140. data/test/{mssql_multibyte_test.rb → db/mssql/multibyte_test.rb} +0 -0
  141. data/test/db/mssql/multiple_connections_test.rb +71 -0
  142. data/test/{mssql_reset_column_information_test.rb → db/mssql/reset_column_information_test.rb} +0 -0
  143. data/test/{mssql_row_locking_test.rb → db/mssql/row_locking_test.rb} +0 -0
  144. data/test/{mssql_serialize_test.rb → db/mssql/serialize_test.rb} +1 -1
  145. data/test/db/mssql/simple_test.rb +140 -0
  146. data/test/db/mssql/transaction_test.rb +6 -0
  147. data/test/db/mssql/types_test.rb +205 -0
  148. data/test/{mssql_test.rb → db/mssql/unit_test.rb} +2 -2
  149. data/test/db/mysql.rb +1 -2
  150. data/test/db/mysql/_rails_test_mysql.32.out +6768 -0
  151. data/test/{mysql_binary_test.rb → db/mysql/binary_test.rb} +0 -0
  152. data/test/db/mysql/connection_test.rb +51 -0
  153. data/test/{mysql_db_create_test.rb → db/mysql/db_create_test.rb} +0 -0
  154. data/test/{mysql_index_length_test.rb → db/mysql/index_length_test.rb} +0 -0
  155. data/test/{mysql_multibyte_test.rb → db/mysql/multibyte_test.rb} +0 -0
  156. data/test/{mysql_nonstandard_primary_key_test.rb → db/mysql/nonstandard_primary_key_test.rb} +0 -0
  157. data/test/{mysql_reset_column_information_test.rb → db/mysql/reset_column_information_test.rb} +0 -0
  158. data/test/{mysql_schema_dump_test.rb → db/mysql/schema_dump_test.rb} +9 -1
  159. data/test/{mysql_serialize_test.rb → db/mysql/serialize_test.rb} +0 -0
  160. data/test/{mysql_simple_test.rb → db/mysql/simple_test.rb} +16 -8
  161. data/test/db/mysql/transaction_test.rb +6 -0
  162. data/test/db/mysql/types_test.rb +30 -0
  163. data/test/{mysql_test.rb → db/mysql/unit_test.rb} +1 -1
  164. data/test/db/mysql_config.rb +1 -1
  165. data/test/db/oracle.rb +1 -1
  166. data/test/{oracle_binary_test.rb → db/oracle/binary_test.rb} +0 -0
  167. data/test/{oracle_limit_test.rb → db/oracle/limit_test.rb} +0 -0
  168. data/test/db/oracle/multibyte_test.rb +22 -0
  169. data/test/{oracle_reset_column_information_test.rb → db/oracle/reset_column_information_test.rb} +0 -0
  170. data/test/{oracle_serialize_test.rb → db/oracle/serialize_test.rb} +0 -0
  171. data/test/{oracle_simple_test.rb → db/oracle/simple_test.rb} +14 -19
  172. data/test/{oracle_specific_test.rb → db/oracle/specific_test.rb} +62 -16
  173. data/test/db/oracle/transaction_test.rb +31 -0
  174. data/test/db/oracle/unit_test.rb +31 -0
  175. data/test/db/postgres.rb +1 -1
  176. data/test/db/postgres/_rails_test_postgres.32.out +6777 -0
  177. data/test/db/postgres/a_custom_primary_key_test.rb +50 -0
  178. data/test/db/postgres/array_type_test.rb +101 -0
  179. data/test/{postgres_binary_test.rb → db/postgres/binary_test.rb} +0 -0
  180. data/test/db/postgres/connection_test.rb +55 -0
  181. data/test/db/postgres/data_types_test.rb +703 -0
  182. data/test/{postgres_db_create_test.rb → db/postgres/db_create_test.rb} +1 -1
  183. data/test/{postgres_drop_db_test.rb → db/postgres/db_drop_test.rb} +2 -0
  184. data/test/db/postgres/hstore_test.rb +200 -0
  185. data/test/db/postgres/information_schema_leak_test.rb +30 -0
  186. data/test/db/postgres/json_test.rb +86 -0
  187. data/test/db/postgres/ltree_test.rb +50 -0
  188. data/test/{postgres_mixed_case_test.rb → db/postgres/mixed_case_test.rb} +0 -0
  189. data/test/db/postgres/native_types_test.rb +128 -0
  190. data/test/{postgres_reserved_test.rb → db/postgres/reserved_test.rb} +0 -0
  191. data/test/{postgres_reset_column_information_test.rb → db/postgres/reset_column_information_test.rb} +0 -0
  192. data/test/{postgres_row_locking_test.rb → db/postgres/row_locking_test.rb} +0 -0
  193. data/test/{postgres_schema_dump_test.rb → db/postgres/schema_dump_test.rb} +4 -4
  194. data/test/db/postgres/schema_test.rb +113 -0
  195. data/test/{postgres_simple_test.rb → db/postgres/simple_test.rb} +48 -8
  196. data/test/{postgres_table_alias_length_test.rb → db/postgres/table_alias_length_test.rb} +2 -1
  197. data/test/db/postgres/transaction_test.rb +6 -0
  198. data/test/{postgres_test.rb → db/postgres/unit_test.rb} +3 -3
  199. data/test/db/sqlite3.rb +1 -1
  200. data/test/db/sqlite3/_rails_test_sqlite3.32.out +6502 -0
  201. data/test/db/sqlite3/has_many_though_test.rb +6 -0
  202. data/test/{sqlite3_reset_column_information_test.rb → db/sqlite3/reset_column_information_test.rb} +0 -0
  203. data/test/{sqlite3_schema_dump_test.rb → db/sqlite3/schema_dump_test.rb} +0 -0
  204. data/test/{sqlite3_serialize_test.rb → db/sqlite3/serialize_test.rb} +0 -0
  205. data/test/{sqlite3_simple_test.rb → db/sqlite3/simple_test.rb} +63 -63
  206. data/test/db/sqlite3/transaction_test.rb +32 -0
  207. data/test/{sqlite3_type_conversion_test.rb → db/sqlite3/type_conversion_test.rb} +0 -0
  208. data/test/has_many_through.rb +29 -64
  209. data/test/jdbc/oracle.rb +11 -0
  210. data/test/jndi_test.rb +16 -4
  211. data/test/models/auto_id.rb +1 -1
  212. data/test/models/rights_and_roles.rb +57 -0
  213. data/test/row_locking.rb +3 -0
  214. data/test/schema_dump.rb +24 -10
  215. data/test/simple.rb +359 -104
  216. data/test/test_helper.rb +4 -2
  217. data/test/transaction.rb +109 -0
  218. metadata +119 -86
  219. data/lib/arjdbc/jdbc/compatibility.rb +0 -51
  220. data/lib/arjdbc/jdbc/core_ext.rb +0 -24
  221. data/lib/arjdbc/jdbc/discover.rb +0 -18
  222. data/test/derby_schema_dump_test.rb +0 -9
  223. data/test/mssql_ignore_system_views_test.rb +0 -30
  224. data/test/mssql_legacy_types_test.rb +0 -58
  225. data/test/mssql_null_test.rb +0 -14
  226. data/test/mssql_simple_test.rb +0 -51
  227. data/test/postgres_information_schema_leak_test.rb +0 -28
  228. data/test/postgres_native_type_mapping_test.rb +0 -93
  229. data/test/postgres_nonseq_pkey_test.rb +0 -38
  230. data/test/postgres_schema_search_path_test.rb +0 -48
  231. data/test/postgres_type_conversion_test.rb +0 -33
data/.travis.yml CHANGED
@@ -24,4 +24,7 @@ branches:
24
24
  - 1-2-stable
25
25
  matrix:
26
26
  allow_failures:
27
+ # probably fine to allow in 1.3.x :
28
+ #- gemfile: gemfiles/rails23.gemfile
29
+ # NOTE: not sure why it can't connect :
27
30
  - env: DB=jdbc
data/Appraisals CHANGED
@@ -1,6 +1,6 @@
1
1
  appraise "rails23" do
2
- gem "activerecord", "~> 2.3.16"
3
- gem "rails", "~> 2.3.16"
2
+ gem "activerecord", "~> 2.3.18"
3
+ gem "rails", "~> 2.3.18"
4
4
  end
5
5
 
6
6
  appraise "rails30" do
@@ -8,9 +8,17 @@ appraise "rails30" do
8
8
  end
9
9
 
10
10
  appraise "rails31" do
11
- gem "activerecord", "~> 3.1.10"
11
+ gem "activerecord", "~> 3.1.12"
12
12
  end
13
13
 
14
14
  appraise "rails32" do
15
- gem "activerecord", "~> 3.2.11"
15
+ gem "activerecord", "~> 3.2.13"
16
+ end
17
+
18
+ appraise "rails40" do # NOTE: make sure you're using --1.9 with AR-4.0
19
+ #gem "activerecord", "~> 4.0.0"
20
+ # until there's an actual 4.0 release :
21
+ gem 'rails', :github => 'rails/rails'
22
+ gem 'journey', :github => 'rails/journey'
23
+ gem 'activerecord-deprecated_finders', :github => 'rails/activerecord-deprecated_finders', :require => nil
16
24
  end
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem 'activerecord'
4
4
  gem 'jruby-openssl', :platform => :jruby
@@ -10,9 +10,9 @@ end
10
10
  gem 'appraisal'
11
11
  gem 'rake', :require => nil
12
12
  # appraisal ignores group block declarations :
13
- gem 'test-unit', :group => :test
13
+ gem 'test-unit', '2.5.4', :group => :test
14
14
  gem 'test-unit-context', :group => :test
15
- gem 'mocha', '~> 0.12.1', :require => nil, :group => :test # '>= 0.13.0'
15
+ gem 'mocha', '>= 0.13.0', :require => nil, :group => :test
16
16
  gem 'simplecov', :require => nil, :group => :test
17
17
  gem 'bcrypt-ruby', '~> 3.0.0', :require => nil, :group => :test
18
18
 
data/Gemfile.lock CHANGED
@@ -1,26 +1,26 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- actionpack (3.2.11)
5
- activemodel (= 3.2.11)
6
- activesupport (= 3.2.11)
4
+ actionpack (3.2.13)
5
+ activemodel (= 3.2.13)
6
+ activesupport (= 3.2.13)
7
7
  builder (~> 3.0.0)
8
8
  erubis (~> 2.7.0)
9
9
  journey (~> 1.0.4)
10
- rack (~> 1.4.0)
10
+ rack (~> 1.4.5)
11
11
  rack-cache (~> 1.2)
12
12
  rack-test (~> 0.6.1)
13
13
  sprockets (~> 2.2.1)
14
- activemodel (3.2.11)
15
- activesupport (= 3.2.11)
14
+ activemodel (3.2.13)
15
+ activesupport (= 3.2.13)
16
16
  builder (~> 3.0.0)
17
- activerecord (3.2.11)
18
- activemodel (= 3.2.11)
19
- activesupport (= 3.2.11)
17
+ activerecord (3.2.13)
18
+ activemodel (= 3.2.13)
19
+ activesupport (= 3.2.13)
20
20
  arel (~> 3.0.2)
21
21
  tzinfo (~> 0.3.29)
22
- activesupport (3.2.11)
23
- i18n (~> 0.6)
22
+ activesupport (3.2.13)
23
+ i18n (= 0.6.1)
24
24
  multi_json (~> 1.0)
25
25
  appraisal (0.5.1)
26
26
  bundler
@@ -37,10 +37,10 @@ GEM
37
37
  jruby-openssl (0.8.2)
38
38
  bouncy-castle-java (>= 1.5.0146.1)
39
39
  metaclass (0.0.1)
40
- mocha (0.12.10)
40
+ mocha (0.13.3)
41
41
  metaclass (~> 0.0.1)
42
- multi_json (1.5.0)
43
- rack (1.4.4)
42
+ multi_json (1.7.2)
43
+ rack (1.4.5)
44
44
  rack-cache (1.2)
45
45
  rack (>= 0.4)
46
46
  rack-test (0.6.2)
@@ -62,8 +62,8 @@ GEM
62
62
  test-unit (2.5.4)
63
63
  test-unit-context (0.3.0)
64
64
  test-unit (>= 2.4.0)
65
- tilt (1.3.3)
66
- tzinfo (0.3.35)
65
+ tilt (1.3.6)
66
+ tzinfo (0.3.37)
67
67
 
68
68
  PLATFORMS
69
69
  java
@@ -75,9 +75,9 @@ DEPENDENCIES
75
75
  bcrypt-ruby (~> 3.0.0)
76
76
  erubis
77
77
  jruby-openssl
78
- mocha (~> 0.12.1)
78
+ mocha (>= 0.13.0)
79
79
  rake
80
80
  ruby-debug
81
81
  simplecov
82
- test-unit
82
+ test-unit (= 2.5.4)
83
83
  test-unit-context
data/History.txt CHANGED
@@ -1,11 +1,85 @@
1
- == 1.2.9.1 (07/19/13)
2
-
3
- - warn when used with ActiveRecord 4.x
1
+ == 1.3.0.beta1 (04/11/13)
2
+
3
+ - [db2] map datetime / timestamp / time types + correct time handling on AS400
4
+ - AREL values passed to #to_sql not handled correctly on AR-3.0 (#365)
5
+ - (Ruby) API cleanup - removed ArJdbc::Jdbc::Mutex and CompatibilityMethods
6
+ - new base implementations for all exec_xxx methods (introduced in AR 3.1)
7
+ - returning AR::Result from #exec_query + #exec_query_raw for old behavior
8
+ - [mssql] #table_exists? does not filter views (only #tables does)
9
+ - [postgres] introduced new types on AR 4.0 - same ones native adapter supports
10
+ (uuid values, arrays, json, hstore, ltree, PG ranges, interval, cidr etc.)
11
+ - Java API - now compiled with Java 1.6 since we're using JDBC 4 API anyways
12
+ - generic #exec_query returning AR::Result + #exec_raw_query for compatibility
13
+ - [postgres] improve #insert_sql (uses primary_key, supports all AR versions)
14
+ - [postgres] support config[:insert_returning]
15
+ - [postgres] always return correct primary key (failing if no sequence)
16
+ - Java API - xxxToRuby refactorings - to allow for more flexible overrides
17
+ - [postgres] support BIT(n) type where n > 1 as "bit strings"
18
+ - [postgres] #disable_referential_integrity on USER level (AR 4.0 compatible)
19
+ - Java API - allow objectToRuby and arrayToRuby overrides
20
+ - allow more-intuitive initialize arguments when sub-classing JdbcColumn
21
+ - do not translate native (Java) exceptions into StatementInvalid (from #log)
22
+ - Java API - replaced #tableLookupBlock with (a new) #matchTables
23
+ - [mssql] better message for jTDS driver bug (support disabling explain)
24
+ - Java API:- accept (and use) catalog as arg[1] in #columns which does leads to
25
+ a refactoring of #extractTableName to accept a catalog name
26
+ - [mssql] current_user and (change-able) default_schema support (#311)
27
+ - [sqlite3] correct empty insert statement value (on AR-4.0)
28
+ - Java API - do not wrap runtime exceptions when handling throwables
29
+ - [mysql] correct empty insert statement value (was not working on 4.0)
30
+ - Java API - handle :xml and :array AR column type to JDBC type conversion
31
+ - Java API - SQL Array and Object JDBC type (to Ruby) mappings
32
+ - Java API - reviewed (and updated) JDBC type handling for adapters :
33
+ * FLOAT/DOUBLE types should be handled (just like REAL) as Double-s
34
+ * NUMERIC/DECIMAL values should be handled as BigDecimal-s
35
+ * BIT/BOOLEAN should be converted to (Ruby) true/false by default
36
+ * NULL should always be returned as nil
37
+ * close binary/character stream & free SQLXML once converted
38
+ * JDBC 4.0 N(CHAR) types should be handled
39
+ - JdbcConnectionFactory.newConnection now throws SQLException - this is backwards
40
+ incompatible but most extension do not need to deal with this interface (#347)
41
+ - (AR 4.0 compatible) transaction isolation support
42
+ - Java API - deprecate SQLBlock class in favor of a parameterized Callable iface
43
+ - Java API - #retry makes no sense during #rollback (should use the same connection)
44
+ - [postgres] session variables support (from configuration)
45
+ - [mysql] session variables support (from configuration)
46
+ - [mysql] :strict config option, for STRICT_ALL_TABLES on AR-4.0
47
+ - AR 4.0 (master) compatible #rename_table_indexes and #renamed_column_indexes
48
+ - [postgres] no need to clear_query_cache after insert on AR-2.3's #insert_sql
49
+ - Java API - connection #execute_delete "alias" for #execute_update
50
+ - [derby] XMLPARSE when inserting into an XML column type ...
51
+ but still can not retrieve XML values using SELECT * FROM
52
+ - [sqlite3] IndexDefinition#unique should be a true/false
53
+ - [mssql] execute_procedure support, AR-SQLServer style (#266)
54
+ - [mssql] #charset, #current_database
55
+ - [mssql] config[:database] support + switching using #use_database (#311)
56
+ - [mssql] explain support
57
+ - [mssql] better query type detection - make sure WITHs work as SELECts
58
+ - [mssql] make sure there's a column class (#269) + better special column magic
59
+ - [mssql] better - working date/time quoting (with some ms precision support)
60
+ - Java API - re-arrange JDBC (to-ruby) type conversion methods
61
+ - [mssql] fix Model.first on SQL Server 2000 when called with only order
62
+ - [oracle] XMLTYPE column support - can't test due bug in driver
63
+ - [db2] working XML column type support
64
+ - [oracle] (MATRIALIZED) VIEWS/SYNONYMS should be usable on table_exists?
65
+ - a better (default) table_exists? (aligned with columns_internal) for all
66
+ - Java API - add #mapTables for OOP-ish mapping of results from #getTables
67
+ - [db2] [derby] some (working) connection alive sql (db gurus should help)
68
+ - [oracle] (a working) connection alive sql
69
+ - [db2] seems like DB2 on ZOS used a non-existing get_primary_key method
70
+ - do not call_discovered_column_callbacks for extending column impls
71
+ - [hsqldb] a 'valid' connection alive SQL for HSQLDB
72
+ - ActiveRecord::AbstractAdapter#exec_insert has 5 args in AR 4.0 (master)
73
+ - no need for a ArJdbc::Version module simply use ArJdbc::VERSION
74
+ - support auto-loading of adapter gems e.g. when specified in a Gemfile
75
+ - load out raltie from arjdbc instead of activerecord-jdbc-adapter thus it will
76
+ work consistently even if only a specific adapter gem is specified in Gemfile
77
+ - make sure we require arjdbc instead of just arjdbc/jdbc from adapters
4
78
 
5
79
  == 1.2.9 (03/20/13)
6
80
 
7
81
  - [oracle] native database types ala oracle-enhanced adapter
8
- - [oracle] fix #insert (broken since execute+to_sql refactoring) keeping binds
82
+ - [oracle] fix #insert (broken since execute+to_sql refactoring) keeping binds
9
83
  respect 30 max identifier length with default sequence names
10
84
  - [db2] add as400 primary key support and re-add explain method
11
85
  - [mssql] fix table/column name quoting - do not quote if quoted already
@@ -34,15 +108,15 @@
34
108
  avoid (deprecated) Java.java_to_ruby when wrapping java.sql.Connection
35
109
  - follow Column-naming convention in MySQL adapter ArJdbc module
36
110
  - make sure update_sql is public in mysql adapter (Rails compatibility)
37
- - fix 1.2.6 regression - incorrectly setup to_sql method based on Rails version
111
+ - fix 1.2.6 regression - incorrectly setup to_sql method based on Rails version
38
112
  this caused double '?' bind substitution issues (#322)
39
113
 
40
114
  == 1.2.6 (01/31/13)
41
115
 
42
116
  - [postgres] only set --schema (to search path) for pg_dump if configured (#315)
43
117
  - [oracle] id limits + quoting; current user/db/schema + savepoint support
44
- - execute "log" (sql) name correctly based on AR version
45
- - deprecate substitute_binds and extract_sql
118
+ - execute "log" (sql) name correctly based on AR version
119
+ - deprecate substitute_binds and extract_sql
46
120
  - [derby] make sure we never modify the passed sql param
47
121
  - [sqlite3] execute on insert_sql + savepoint support
48
122
  - [mssql] [firebird] [informix] (shared) serialized attribute support
@@ -51,17 +125,17 @@
51
125
  - renamed Sqlite3RubyJdbcConnection to SQLite3RubyJdbcConnection
52
126
  - [mysql] re-define remove_index! for "better" AR-2.3 compatibility
53
127
  - [derby] avoid failures with #quote when second arg nil + keep string encoding
54
- - [db2] binary support & improved quoting +
128
+ - [db2] binary support & improved quoting +
55
129
  use lob callback for all since it was failing on BLOB/CLOB inserts otherwise
56
130
  - [db2] better (simplified) type handling for DB2
57
131
  - JRuby 1.6.8 compatibility when rescue-ing Java exception
58
132
  - [mysql] avoid encoding issues with MySQL's quoting methods (#185)
59
133
  - [postgres] ignore binary precision / limit for bytea
60
134
  - [oracle] explain (query) support
61
- - [oracle] since Oracle supports TIMESTAMP for quite a while we should not
135
+ - [oracle] since Oracle supports TIMESTAMP for quite a while we should not
62
136
  create DATE columns for a :timestamp column type
63
137
  - [oracle] avoid CREATE DDL failure when BLOB has length specified
64
- - [jdbc-] review autoloading backwards-incompatible change in jdbc- gems
138
+ - [jdbc-] review autoloading backwards-incompatible change in jdbc- gems
65
139
  auto-load (backwards-compat) can be enabled back using jdbc.driver.autoload
66
140
  system property or using the driver specific autoload option as well
67
141
  - [jdbc-] Update version handling introduce DRIVER_VERSION constant
@@ -76,7 +150,7 @@
76
150
  - [sqlite3] SQLite3 explain support (Rails style)
77
151
  - [postgres] (re-usable) explain support for PostgreSQL (based on Rails)
78
152
  - [h2] update handling of time fields on H2/HSQLDB (#252)
79
- - rescue (and wrap) only SQLExceptions from driver.connect this caused
153
+ - rescue (and wrap) only SQLExceptions from driver.connect this caused
80
154
  swallowing of runtime exceptions from JDBC drivers
81
155
  - support for setting (custom) jdbc driver properties in config
82
156
  - when a new adapter (constant) gets loaded column types should pick it up
@@ -87,7 +161,7 @@
87
161
  == 1.2.5 (01/02/13)
88
162
 
89
163
  - backwards compat with older jdbc- (driver) gems (#279)
90
- - no need to set the :driver for jndi config (did not work anyways) when jdbc is being
164
+ - no need to set the :driver for jndi config (did not work anyways) when jdbc is being
91
165
  configured + do not raise if there's a :driver_instance setup instead of the :driver
92
166
  - support extra options with recreate_database (for postgres)
93
167
  - [jdbc-derby] update Derby to 10.8.2.2
@@ -96,13 +170,13 @@
96
170
  - [sqlite3] updated sqlite3 binary handling
97
171
  - [jdbc-jtds] upgrade to jtds (driver) 1.3.0
98
172
  - JDBC driver names should be on one (re-usable) place
99
- - make sure that (jdbc-xxx gem) .jars are only loaded (required) when first connection
173
+ - make sure that (jdbc-xxx gem) .jars are only loaded (required) when first connection
100
174
  is attempted (this avoids e.g. sqlite-jdbc.jar being always among loaded features)
101
175
  - jdbc-* gems should expose the driver_jar instead of (auto) loading it
102
176
  - [oracle] adding in_clause_limit override to properly handle Oracle's 1000 entry limit
103
177
  - [jdbc-mysql] upgrade to mysql connector 5.1.22
104
178
  - [jdbc-postgres] upgade to postgresql-9.2 jar version 9.2-1002
105
- - [postgres] fix standard_conforming_strings's default not being set and
179
+ - [postgres] fix standard_conforming_strings's default not being set and
106
180
  backslash escaping to account for standard_conforming_strings
107
181
  - [jdbc-postgres] upgrade to postgres.jar 9.1.903 driver
108
182
  - [jdbc-h2] update h2.jar to 1.3.168
@@ -116,7 +190,7 @@
116
190
  - [db2] add support for primary keys to structure_dump
117
191
  - [db2] detect identity columns in db2 structure_dump
118
192
  - [mysql] added support for Rails 3.2 explain feature (#159)
119
- - add support for DB_STRUCTURE in db:structure:dump
193
+ - add support for DB_STRUCTURE in db:structure:dump
120
194
  (and db:structure:load task) (#203)
121
195
  - [postgres] rename sequence during table rename
122
196
  - [db2] iseries returns date with two digit year - leave it as string
@@ -598,7 +672,7 @@
598
672
  == 0.3
599
673
 
600
674
  - Release coincides with JRuby 1.0.0RC1 release
601
- - Improvements for Derby, Postgres, and Oracle, all of which are running
675
+ - Improvements for Derby, Postgres, and Oracle, all of which are running
602
676
  > 95% of AR tests
603
677
 
604
678
  == 0.2.4
data/LICENSE.txt CHANGED
@@ -1,5 +1,7 @@
1
+ Copyright (c) 2012-2013 Karol Bucek <self@kares.org>
1
2
  Copyright (c) 2006-2012 Nick Sieger <nick@nicksieger.com>
2
3
  Copyright (c) 2006-2008 Ola Bini <ola.bini@gmail.com>
4
+
3
5
  All rights reserved.
4
6
 
5
7
  Redistribution and use in source and binary forms, with or without modification,
@@ -21,4 +23,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21
23
  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
24
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23
25
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
-
data/README.md CHANGED
@@ -8,6 +8,19 @@ AR-JDBC **1.2.x** officially supports ActiveRecord 3.x as well as 2.3, it's
8
8
  latest version is compatible with JRuby 1.6.8+ (but as always we recommend to
9
9
  use the latest and greatest of JRubies) thus requires Java 1.6 at minimum.
10
10
 
11
+ **NOTE:** version **1.3.0** of AR-JDBC adapter is currently in the making which
12
+ strives to provide ActiveRecord 2.3, 3.x as well as 4.0 (master) compatibility.
13
+ Our master already contains a lot of fixes but since we diverged significantly
14
+ from the 1.2 line (we no longer back-port fixes) and still require to perform a
15
+ few refactorings we advise users to point their *Gemfiles* to our master or use
16
+ pre-release versions of our gem(s) e.g. **1.3.0.beta1**.
17
+
18
+ **NOTE:** activerecord-jdbc-adapter gem **1.2.6** contains a SQL injection
19
+ [security vulnerability](http://cl.ly/code/0n381E353414) and has been yanked,
20
+ please update ASAP (to version >= 1.2.8) if you happen to still be using it !
21
+ Caused by a [regression](http://git.io/MDmiGQ) introduced in the 1.2.6 release,
22
+ which was still not completely been fixed in 1.2.7 and has been yanked as well.
23
+
11
24
  ## Databases
12
25
 
13
26
  ActiveRecord-JDBC-Adapter provides full or nearly full support for:
@@ -243,4 +256,4 @@ license the database's drivers are licensed. See each driver gem's LICENSE.txt.
243
256
  [2]: http://github.com/jruby/activerecord-jdbc-adapter/blob/master/activerecord-jdbcmssql-adapter
244
257
  [3]: https://github.com/jruby/activerecord-jdbc-adapter/issues
245
258
  [4]: http://github.com/nicksieger/activerecord-cachedb-adapter
246
- [9]: https://secure.travis-ci.org/jruby/activerecord-jdbc-adapter.png
259
+ [9]: https://secure.travis-ci.org/jruby/activerecord-jdbc-adapter.png
@@ -1,10 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  require 'arjdbc/version'
4
- version = ArJdbc::Version::VERSION
4
+
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "activerecord-jdbc-adapter"
7
- s.version = version
7
+ s.version = ArJdbc::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Nick Sieger, Ola Bini and JRuby contributors"]
10
10
  s.email = %q{nick@nicksieger.com, ola.bini@gmail.com}
@@ -1,15 +1,15 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "jruby-openssl", :platform=>:jruby
6
6
  gem "appraisal"
7
7
  gem "rake", :require=>nil
8
- gem "test-unit", :group=>:test
8
+ gem "test-unit", "2.5.4", :group=>:test
9
9
  gem "test-unit-context", :group=>:test
10
- gem "mocha", "~> 0.12.1", :require=>nil, :group=>:test
10
+ gem "mocha", ">= 0.13.0", :require=>nil, :group=>:test
11
11
  gem "simplecov", :require=>nil, :group=>:test
12
12
  gem "bcrypt-ruby", "~> 3.0.0", :require=>nil, :group=>:test
13
- gem "activerecord", "~> 2.3.16"
14
- gem "rails", "~> 2.3.16"
13
+ gem "activerecord", "~> 2.3.18"
14
+ gem "rails", "~> 2.3.18"
15
15
 
@@ -1,41 +1,41 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (2.3.16)
5
- actionpack (= 2.3.16)
6
- actionpack (2.3.16)
7
- activesupport (= 2.3.16)
4
+ actionmailer (2.3.18)
5
+ actionpack (= 2.3.18)
6
+ actionpack (2.3.18)
7
+ activesupport (= 2.3.18)
8
8
  rack (~> 1.1.0)
9
- activerecord (2.3.16)
10
- activesupport (= 2.3.16)
11
- activeresource (2.3.16)
12
- activesupport (= 2.3.16)
13
- activesupport (2.3.16)
9
+ activerecord (2.3.18)
10
+ activesupport (= 2.3.18)
11
+ activeresource (2.3.18)
12
+ activesupport (= 2.3.18)
13
+ activesupport (2.3.18)
14
14
  appraisal (0.5.1)
15
15
  bundler
16
16
  rake
17
17
  bcrypt-ruby (3.0.1-java)
18
- bouncy-castle-java (1.5.0146.1)
19
- jruby-openssl (0.7.7)
20
- bouncy-castle-java (>= 1.5.0146.1)
18
+ bouncy-castle-java (1.5.0147)
19
+ jruby-openssl (0.8.4)
20
+ bouncy-castle-java (>= 1.5.0147)
21
21
  metaclass (0.0.1)
22
- mocha (0.12.8)
22
+ mocha (0.13.3)
23
23
  metaclass (~> 0.0.1)
24
24
  multi_json (1.5.0)
25
- rack (1.1.5)
26
- rails (2.3.16)
27
- actionmailer (= 2.3.16)
28
- actionpack (= 2.3.16)
29
- activerecord (= 2.3.16)
30
- activeresource (= 2.3.16)
31
- activesupport (= 2.3.16)
25
+ rack (1.1.6)
26
+ rails (2.3.18)
27
+ actionmailer (= 2.3.18)
28
+ actionpack (= 2.3.18)
29
+ activerecord (= 2.3.18)
30
+ activeresource (= 2.3.18)
31
+ activesupport (= 2.3.18)
32
32
  rake (>= 0.8.3)
33
- rake (0.9.2.2)
33
+ rake (10.0.3)
34
34
  simplecov (0.7.1)
35
35
  multi_json (~> 1.0)
36
36
  simplecov-html (~> 0.7.1)
37
37
  simplecov-html (0.7.1)
38
- test-unit (2.5.3)
38
+ test-unit (2.5.4)
39
39
  test-unit-context (0.3.0)
40
40
  test-unit (>= 2.4.0)
41
41
 
@@ -43,13 +43,13 @@ PLATFORMS
43
43
  java
44
44
 
45
45
  DEPENDENCIES
46
- activerecord (~> 2.3.16)
46
+ activerecord (~> 2.3.18)
47
47
  appraisal
48
48
  bcrypt-ruby (~> 3.0.0)
49
49
  jruby-openssl
50
- mocha (~> 0.12.1)
51
- rails (~> 2.3.16)
50
+ mocha (>= 0.13.0)
51
+ rails (~> 2.3.18)
52
52
  rake
53
53
  simplecov
54
- test-unit
54
+ test-unit (= 2.5.4)
55
55
  test-unit-context