activerecord-jdbc-adapter 1.3.0.beta2 → 1.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. data/.gitignore +14 -8
  2. data/.travis.yml +40 -31
  3. data/.yardopts +4 -0
  4. data/Appraisals +2 -5
  5. data/CONTRIBUTING.md +46 -0
  6. data/Gemfile +21 -4
  7. data/Gemfile.lock +42 -17
  8. data/{History.txt → History.md} +142 -75
  9. data/README.md +102 -104
  10. data/RUNNING_TESTS.md +76 -0
  11. data/Rakefile.jdbc +20 -0
  12. data/activerecord-jdbc-adapter.gemspec +35 -18
  13. data/gemfiles/rails23.gemfile +4 -3
  14. data/gemfiles/rails23.gemfile.lock +9 -6
  15. data/gemfiles/rails30.gemfile +4 -3
  16. data/gemfiles/rails30.gemfile.lock +9 -6
  17. data/gemfiles/rails31.gemfile +4 -3
  18. data/gemfiles/rails31.gemfile.lock +9 -6
  19. data/gemfiles/rails32.gemfile +4 -3
  20. data/gemfiles/rails32.gemfile.lock +17 -14
  21. data/gemfiles/rails40.gemfile +5 -5
  22. data/gemfiles/rails40.gemfile.lock +17 -69
  23. data/lib/active_record/connection_adapters/firebird_adapter.rb +1 -0
  24. data/lib/active_record/connection_adapters/sqlserver_adapter.rb +1 -0
  25. data/lib/arel/visitors/compat.rb +22 -3
  26. data/lib/arel/visitors/db2.rb +8 -4
  27. data/lib/arel/visitors/derby.rb +14 -13
  28. data/lib/arel/visitors/firebird.rb +5 -4
  29. data/lib/arel/visitors/hsqldb.rb +11 -9
  30. data/lib/arel/visitors/sql_server.rb +89 -61
  31. data/lib/arjdbc.rb +1 -1
  32. data/lib/arjdbc/db2/adapter.rb +181 -212
  33. data/lib/arjdbc/db2/as400.rb +31 -18
  34. data/lib/arjdbc/db2/column.rb +167 -0
  35. data/lib/arjdbc/db2/connection_methods.rb +2 -0
  36. data/lib/arjdbc/derby/adapter.rb +206 -107
  37. data/lib/arjdbc/derby/connection_methods.rb +4 -9
  38. data/lib/arjdbc/firebird.rb +1 -0
  39. data/lib/arjdbc/firebird/adapter.rb +202 -64
  40. data/lib/arjdbc/firebird/connection_methods.rb +20 -0
  41. data/lib/arjdbc/h2/adapter.rb +56 -36
  42. data/lib/arjdbc/hsqldb/adapter.rb +99 -68
  43. data/lib/arjdbc/jdbc/adapter.rb +474 -265
  44. data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
  45. data/lib/arjdbc/jdbc/adapter_require.rb +8 -7
  46. data/lib/arjdbc/jdbc/arel_support.rb +132 -0
  47. data/lib/arjdbc/jdbc/base_ext.rb +8 -7
  48. data/lib/arjdbc/jdbc/callbacks.rb +16 -10
  49. data/lib/arjdbc/jdbc/column.rb +25 -3
  50. data/lib/arjdbc/jdbc/connection.rb +28 -55
  51. data/lib/arjdbc/jdbc/extension.rb +14 -14
  52. data/lib/arjdbc/jdbc/java.rb +6 -3
  53. data/lib/arjdbc/jdbc/jdbc.rake +1 -1
  54. data/lib/arjdbc/jdbc/quoted_primary_key.rb +2 -2
  55. data/lib/arjdbc/jdbc/rake_tasks.rb +1 -1
  56. data/lib/arjdbc/jdbc/type_converter.rb +5 -2
  57. data/lib/arjdbc/mssql/adapter.rb +160 -280
  58. data/lib/arjdbc/mssql/column.rb +182 -0
  59. data/lib/arjdbc/mssql/connection_methods.rb +37 -4
  60. data/lib/arjdbc/mssql/explain_support.rb +13 -21
  61. data/lib/arjdbc/mssql/limit_helpers.rb +79 -42
  62. data/lib/arjdbc/mssql/lock_methods.rb +77 -0
  63. data/lib/arjdbc/mssql/utils.rb +11 -11
  64. data/lib/arjdbc/mysql/adapter.rb +165 -247
  65. data/lib/arjdbc/mysql/column.rb +123 -0
  66. data/lib/arjdbc/mysql/connection_methods.rb +3 -6
  67. data/lib/arjdbc/oracle/adapter.rb +282 -288
  68. data/lib/arjdbc/oracle/column.rb +122 -0
  69. data/lib/arjdbc/oracle/connection_methods.rb +3 -0
  70. data/lib/arjdbc/postgresql/adapter.rb +336 -574
  71. data/lib/arjdbc/postgresql/column.rb +458 -0
  72. data/lib/arjdbc/postgresql/connection_methods.rb +1 -2
  73. data/lib/arjdbc/postgresql/schema_creation.rb +38 -0
  74. data/lib/arjdbc/sqlite3/adapter.rb +189 -145
  75. data/lib/arjdbc/sqlite3/explain_support.rb +1 -1
  76. data/lib/arjdbc/tasks/oracle/enhanced_structure_dump.rb +8 -8
  77. data/lib/arjdbc/util/quoted_cache.rb +60 -0
  78. data/lib/arjdbc/util/table_copier.rb +110 -0
  79. data/lib/arjdbc/version.rb +6 -7
  80. data/pom.xml +56 -2
  81. data/rakelib/02-test.rake +72 -83
  82. data/rakelib/db.rake +29 -17
  83. data/src/java/arjdbc/ArJdbcModule.java +21 -18
  84. data/src/java/arjdbc/db2/DB2RubyJdbcConnection.java +84 -12
  85. data/src/java/arjdbc/derby/DerbyModule.java +140 -143
  86. data/src/java/arjdbc/derby/DerbyRubyJdbcConnection.java +58 -7
  87. data/src/java/arjdbc/h2/H2Module.java +43 -0
  88. data/src/java/arjdbc/informix/InformixRubyJdbcConnection.java +7 -6
  89. data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +1223 -648
  90. data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +24 -23
  91. data/src/java/arjdbc/mysql/MySQLModule.java +33 -32
  92. data/src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java +147 -30
  93. data/src/java/arjdbc/oracle/OracleModule.java +13 -13
  94. data/src/java/arjdbc/oracle/OracleRubyJdbcConnection.java +114 -6
  95. data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +166 -36
  96. data/src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java +101 -19
  97. data/src/java/arjdbc/util/QuotingUtils.java +19 -19
  98. metadata +240 -394
  99. data/bench/bench_attributes.rb +0 -13
  100. data/bench/bench_attributes_new.rb +0 -14
  101. data/bench/bench_create.rb +0 -12
  102. data/bench/bench_find_all.rb +0 -12
  103. data/bench/bench_find_all_mt.rb +0 -25
  104. data/bench/bench_model.rb +0 -85
  105. data/bench/bench_new.rb +0 -12
  106. data/bench/bench_new_valid.rb +0 -12
  107. data/bench/bench_valid.rb +0 -13
  108. data/lib/arel/engines/sql/compilers/db2_compiler.rb +0 -9
  109. data/lib/arel/engines/sql/compilers/derby_compiler.rb +0 -6
  110. data/lib/arel/engines/sql/compilers/h2_compiler.rb +0 -6
  111. data/lib/arel/engines/sql/compilers/hsqldb_compiler.rb +0 -15
  112. data/lib/arel/engines/sql/compilers/jdbc_compiler.rb +0 -6
  113. data/lib/arel/engines/sql/compilers/mssql_compiler.rb +0 -46
  114. data/lib/arjdbc/jdbc/missing_functionality_helper.rb +0 -98
  115. data/lib/arjdbc/mssql/lock_helpers.rb +0 -76
  116. data/lib/arjdbc/mssql/tsql_methods.rb +0 -58
  117. data/lib/arjdbc/postgresql/column_cast.rb +0 -134
  118. data/test/activerecord/connections/native_jdbc_mysql/connection.rb +0 -25
  119. data/test/activerecord/jall.sh +0 -7
  120. data/test/activerecord/jtest.sh +0 -3
  121. data/test/assets/flowers.jpg +0 -0
  122. data/test/binary.rb +0 -67
  123. data/test/db/db2.rb +0 -43
  124. data/test/db/db2/binary_test.rb +0 -6
  125. data/test/db/db2/has_many_through_test.rb +0 -6
  126. data/test/db/db2/rake_test.rb +0 -82
  127. data/test/db/db2/rake_test_data.sql +0 -35
  128. data/test/db/db2/reset_column_information_test.rb +0 -5
  129. data/test/db/db2/serialize_test.rb +0 -6
  130. data/test/db/db2/simple_test.rb +0 -81
  131. data/test/db/db2/test_helper.rb +0 -6
  132. data/test/db/db2/unit_test.rb +0 -73
  133. data/test/db/derby.rb +0 -12
  134. data/test/db/derby/binary_test.rb +0 -6
  135. data/test/db/derby/migration_test.rb +0 -74
  136. data/test/db/derby/rake_test.rb +0 -96
  137. data/test/db/derby/reset_column_information_test.rb +0 -6
  138. data/test/db/derby/row_locking_test.rb +0 -20
  139. data/test/db/derby/schema_dump_test.rb +0 -5
  140. data/test/db/derby/serialize_test.rb +0 -6
  141. data/test/db/derby/simple_test.rb +0 -173
  142. data/test/db/derby/test_helper.rb +0 -6
  143. data/test/db/derby/unit_test.rb +0 -32
  144. data/test/db/derby/xml_column_test.rb +0 -17
  145. data/test/db/h2.rb +0 -11
  146. data/test/db/h2/binary_test.rb +0 -6
  147. data/test/db/h2/change_column_test.rb +0 -68
  148. data/test/db/h2/identity_column_test.rb +0 -35
  149. data/test/db/h2/offset_test.rb +0 -49
  150. data/test/db/h2/rake_test.rb +0 -98
  151. data/test/db/h2/schema_dump_test.rb +0 -29
  152. data/test/db/h2/serialize_test.rb +0 -6
  153. data/test/db/h2/simple_test.rb +0 -56
  154. data/test/db/hsqldb.rb +0 -11
  155. data/test/db/hsqldb/binary_test.rb +0 -6
  156. data/test/db/hsqldb/rake_test.rb +0 -101
  157. data/test/db/hsqldb/schema_dump_test.rb +0 -19
  158. data/test/db/hsqldb/serialize_test.rb +0 -6
  159. data/test/db/hsqldb/simple_test.rb +0 -17
  160. data/test/db/informix.rb +0 -13
  161. data/test/db/jdbc.rb +0 -16
  162. data/test/db/jdbc_derby.rb +0 -14
  163. data/test/db/jdbc_h2.rb +0 -17
  164. data/test/db/jdbc_mysql.rb +0 -13
  165. data/test/db/jdbc_postgres.rb +0 -23
  166. data/test/db/jndi_config.rb +0 -32
  167. data/test/db/jndi_pooled_config.rb +0 -32
  168. data/test/db/mssql.rb +0 -11
  169. data/test/db/mssql/binary_test.rb +0 -6
  170. data/test/db/mssql/exec_proc_test.rb +0 -46
  171. data/test/db/mssql/identity_insert_test.rb +0 -18
  172. data/test/db/mssql/ignore_system_views_test.rb +0 -40
  173. data/test/db/mssql/limit_offset_test.rb +0 -190
  174. data/test/db/mssql/multibyte_test.rb +0 -16
  175. data/test/db/mssql/multiple_connections_test.rb +0 -71
  176. data/test/db/mssql/rake_test.rb +0 -143
  177. data/test/db/mssql/reset_column_information_test.rb +0 -6
  178. data/test/db/mssql/row_locking_test.rb +0 -7
  179. data/test/db/mssql/serialize_test.rb +0 -6
  180. data/test/db/mssql/simple_test.rb +0 -140
  181. data/test/db/mssql/transaction_test.rb +0 -6
  182. data/test/db/mssql/types_test.rb +0 -205
  183. data/test/db/mssql/unit_test.rb +0 -249
  184. data/test/db/mysql.rb +0 -4
  185. data/test/db/mysql/_rails_test_mysql.32.out +0 -6585
  186. data/test/db/mysql/binary_test.rb +0 -6
  187. data/test/db/mysql/connection_test.rb +0 -51
  188. data/test/db/mysql/index_length_test.rb +0 -58
  189. data/test/db/mysql/multibyte_test.rb +0 -10
  190. data/test/db/mysql/nonstandard_primary_key_test.rb +0 -39
  191. data/test/db/mysql/rake_test.rb +0 -97
  192. data/test/db/mysql/reset_column_information_test.rb +0 -6
  193. data/test/db/mysql/schema_dump_test.rb +0 -228
  194. data/test/db/mysql/serialize_test.rb +0 -6
  195. data/test/db/mysql/simple_test.rb +0 -187
  196. data/test/db/mysql/statement_escaping_test.rb +0 -46
  197. data/test/db/mysql/transaction_test.rb +0 -6
  198. data/test/db/mysql/types_test.rb +0 -30
  199. data/test/db/mysql/unit_test.rb +0 -93
  200. data/test/db/mysql_config.rb +0 -7
  201. data/test/db/oracle.rb +0 -27
  202. data/test/db/oracle/binary_test.rb +0 -6
  203. data/test/db/oracle/limit_test.rb +0 -24
  204. data/test/db/oracle/multibyte_test.rb +0 -22
  205. data/test/db/oracle/rake_test.rb +0 -100
  206. data/test/db/oracle/reset_column_information_test.rb +0 -6
  207. data/test/db/oracle/serialize_test.rb +0 -6
  208. data/test/db/oracle/simple_test.rb +0 -140
  209. data/test/db/oracle/specific_test.rb +0 -180
  210. data/test/db/oracle/transaction_test.rb +0 -31
  211. data/test/db/oracle/unit_test.rb +0 -31
  212. data/test/db/postgres.rb +0 -11
  213. data/test/db/postgres/_rails_test_postgres.32.out +0 -6405
  214. data/test/db/postgres/a_custom_primary_key_test.rb +0 -50
  215. data/test/db/postgres/active_schema_unit_test.rb +0 -68
  216. data/test/db/postgres/array_type_test.rb +0 -101
  217. data/test/db/postgres/binary_test.rb +0 -6
  218. data/test/db/postgres/connection_test.rb +0 -63
  219. data/test/db/postgres/data_types_test.rb +0 -703
  220. data/test/db/postgres/hstore_test.rb +0 -200
  221. data/test/db/postgres/information_schema_leak_test.rb +0 -30
  222. data/test/db/postgres/json_test.rb +0 -86
  223. data/test/db/postgres/ltree_test.rb +0 -51
  224. data/test/db/postgres/mixed_case_test.rb +0 -29
  225. data/test/db/postgres/native_types_test.rb +0 -124
  226. data/test/db/postgres/rake_test.rb +0 -117
  227. data/test/db/postgres/reserved_test.rb +0 -22
  228. data/test/db/postgres/reset_column_information_test.rb +0 -6
  229. data/test/db/postgres/row_locking_test.rb +0 -21
  230. data/test/db/postgres/schema_dump_test.rb +0 -95
  231. data/test/db/postgres/schema_test.rb +0 -115
  232. data/test/db/postgres/simple_test.rb +0 -260
  233. data/test/db/postgres/table_alias_length_test.rb +0 -16
  234. data/test/db/postgres/transaction_test.rb +0 -6
  235. data/test/db/postgres/unit_test.rb +0 -31
  236. data/test/db/postgres_config.rb +0 -10
  237. data/test/db/sqlite3.rb +0 -6
  238. data/test/db/sqlite3/_rails_test_sqlite3.32.out +0 -6274
  239. data/test/db/sqlite3/has_many_though_test.rb +0 -6
  240. data/test/db/sqlite3/rake_test.rb +0 -71
  241. data/test/db/sqlite3/reset_column_information_test.rb +0 -6
  242. data/test/db/sqlite3/schema_dump_test.rb +0 -6
  243. data/test/db/sqlite3/serialize_test.rb +0 -6
  244. data/test/db/sqlite3/simple_test.rb +0 -268
  245. data/test/db/sqlite3/transaction_test.rb +0 -32
  246. data/test/db/sqlite3/type_conversion_test.rb +0 -104
  247. data/test/has_many_through.rb +0 -61
  248. data/test/informix_simple_test.rb +0 -48
  249. data/test/jdbc/db2.rb +0 -36
  250. data/test/jdbc/oracle.rb +0 -34
  251. data/test/jdbc_column_test.rb +0 -23
  252. data/test/jdbc_common.rb +0 -16
  253. data/test/jdbc_connection_test.rb +0 -196
  254. data/test/jndi_callbacks_test.rb +0 -33
  255. data/test/jndi_test.rb +0 -55
  256. data/test/manualTestDatabase.rb +0 -191
  257. data/test/models/add_not_null_column_to_table.rb +0 -9
  258. data/test/models/auto_id.rb +0 -15
  259. data/test/models/binary.rb +0 -18
  260. data/test/models/custom_pk_name.rb +0 -15
  261. data/test/models/data_types.rb +0 -40
  262. data/test/models/entry.rb +0 -41
  263. data/test/models/mixed_case.rb +0 -22
  264. data/test/models/reserved_word.rb +0 -15
  265. data/test/models/rights_and_roles.rb +0 -57
  266. data/test/models/string_id.rb +0 -17
  267. data/test/models/thing.rb +0 -17
  268. data/test/models/topic.rb +0 -32
  269. data/test/models/validates_uniqueness_of_string.rb +0 -19
  270. data/test/rails/mysql.rb +0 -13
  271. data/test/rails/sqlite3/version.rb +0 -6
  272. data/test/rails_stub.rb +0 -31
  273. data/test/rake_test_support.rb +0 -298
  274. data/test/row_locking.rb +0 -102
  275. data/test/schema_dump.rb +0 -182
  276. data/test/serialize.rb +0 -275
  277. data/test/shared_helper.rb +0 -35
  278. data/test/simple.rb +0 -1317
  279. data/test/sybase_jtds_simple_test.rb +0 -28
  280. data/test/sybase_reset_column_information_test.rb +0 -6
  281. data/test/test_helper.rb +0 -304
  282. data/test/transaction.rb +0 -109
@@ -36,6 +36,7 @@ import java.sql.ResultSetMetaData;
36
36
  import java.sql.SQLException;
37
37
  import java.sql.Statement;
38
38
  import java.sql.DatabaseMetaData;
39
+ import java.sql.Savepoint;
39
40
  import java.util.ArrayList;
40
41
  import java.util.List;
41
42
 
@@ -54,7 +55,7 @@ import org.jruby.util.ByteList;
54
55
  * @author enebo
55
56
  */
56
57
  public class SQLite3RubyJdbcConnection extends RubyJdbcConnection {
57
-
58
+
58
59
  protected SQLite3RubyJdbcConnection(Ruby runtime, RubyClass metaClass) {
59
60
  super(runtime, metaClass);
60
61
  }
@@ -72,28 +73,39 @@ public class SQLite3RubyJdbcConnection extends RubyJdbcConnection {
72
73
  return new SQLite3RubyJdbcConnection(runtime, klass);
73
74
  }
74
75
  };
75
-
76
- @JRubyMethod(name = "last_insert_row_id")
77
- public IRubyObject getLastInsertRowId(final ThreadContext context)
76
+
77
+ @JRubyMethod(name = {"last_insert_rowid", "last_insert_id"}, alias = "last_insert_row_id")
78
+ public IRubyObject last_insert_rowid(final ThreadContext context)
78
79
  throws SQLException {
79
80
  return withConnection(context, new Callable<IRubyObject>() {
80
81
  public IRubyObject call(final Connection connection) throws SQLException {
81
- Statement statement = null;
82
+ Statement statement = null; ResultSet genKeys = null;
82
83
  try {
83
84
  statement = connection.createStatement();
84
- return unmarshalIdResult(context.getRuntime(), statement);
85
+ // NOTE: strangely this will work and has been used for quite some time :
86
+ //return mapGeneratedKeys(context.getRuntime(), connection, statement, true);
87
+ // but we should assume SQLite JDBC will prefer sane API usage eventually :
88
+ genKeys = statement.executeQuery("SELECT last_insert_rowid()");
89
+ return doMapGeneratedKeys(context.getRuntime(), genKeys, true);
85
90
  }
86
91
  catch (final SQLException e) {
87
- debugMessage(context, "Failed to get generated keys: " + e.getMessage());
92
+ debugMessage(context, "failed to get generated keys: " + e.getMessage());
88
93
  throw e;
89
94
  }
90
- finally { close(statement); }
95
+ finally { close(genKeys); close(statement); }
91
96
  }
92
97
  });
93
98
  }
94
99
 
100
+ // NOTE: interestingly it supports getGeneratedKeys but not executeUpdate
101
+ // + the driver does not report it supports it via the meta-data yet does
102
+ @Override
103
+ protected boolean supportsGeneratedKeys(final Connection connection) throws SQLException {
104
+ return true;
105
+ }
106
+
95
107
  @Override
96
- protected Statement createStatement(final ThreadContext context, final Connection connection)
108
+ protected Statement createStatement(final ThreadContext context, final Connection connection)
97
109
  throws SQLException {
98
110
  final Statement statement = connection.createStatement();
99
111
  IRubyObject statementEscapeProcessing = getConfigValue(context, "statement_escape_processing");
@@ -103,32 +115,33 @@ public class SQLite3RubyJdbcConnection extends RubyJdbcConnection {
103
115
  // else leave as is by default
104
116
  return statement;
105
117
  }
106
-
118
+
107
119
  @Override
108
- protected IRubyObject jdbcToRuby(final Ruby runtime, final int column, int type, final ResultSet resultSet)
120
+ protected IRubyObject jdbcToRuby(final ThreadContext context,
121
+ final Ruby runtime, final int column, int type, final ResultSet resultSet)
109
122
  throws SQLException {
110
123
  // This is rather gross, and only needed because the resultset metadata for SQLite tries to be overly
111
- // clever, and returns a type for the column of the "current" row, so an integer value stored in a
124
+ // clever, and returns a type for the column of the "current" row, so an integer value stored in a
112
125
  // decimal column is returned as Types.INTEGER. Therefore, if the first row of a resultset was an
113
126
  // integer value, all rows of that result set would get truncated.
114
127
  if ( resultSet instanceof ResultSetMetaData ) {
115
128
  type = ((ResultSetMetaData) resultSet).getColumnType(column);
116
129
  }
117
- return super.jdbcToRuby(runtime, column, type, resultSet);
130
+ return super.jdbcToRuby(context, runtime, column, type, resultSet);
118
131
  }
119
-
132
+
120
133
  @Override
121
- protected IRubyObject streamToRuby(
134
+ protected IRubyObject streamToRuby(final ThreadContext context,
122
135
  final Ruby runtime, final ResultSet resultSet, final int column)
123
136
  throws SQLException, IOException {
124
137
  final byte[] bytes = resultSet.getBytes(column);
125
138
  if ( resultSet.wasNull() ) return runtime.getNil();
126
139
  return runtime.newString( new ByteList(bytes, false) );
127
140
  }
128
-
141
+
129
142
  @Override
130
- protected RubyArray mapTables(final Ruby runtime, final DatabaseMetaData metaData,
131
- final String catalog, final String schemaPattern, final String tablePattern,
143
+ protected RubyArray mapTables(final Ruby runtime, final DatabaseMetaData metaData,
144
+ final String catalog, final String schemaPattern, final String tablePattern,
132
145
  final ResultSet tablesSet) throws SQLException {
133
146
  final List<IRubyObject> tables = new ArrayList<IRubyObject>(32);
134
147
  while ( tablesSet.next() ) {
@@ -138,5 +151,74 @@ public class SQLite3RubyJdbcConnection extends RubyJdbcConnection {
138
151
  }
139
152
  return runtime.newArray(tables);
140
153
  }
141
-
154
+
155
+ private static class SavepointStub implements Savepoint {
156
+
157
+ @Override
158
+ public int getSavepointId() throws SQLException {
159
+ throw new UnsupportedOperationException();
160
+ }
161
+
162
+ @Override
163
+ public String getSavepointName() throws SQLException {
164
+ throw new UnsupportedOperationException();
165
+ }
166
+
167
+ }
168
+
169
+ @Override
170
+ @JRubyMethod(name = "create_savepoint", optional = 1)
171
+ public IRubyObject create_savepoint(final ThreadContext context, final IRubyObject[] args) {
172
+ IRubyObject name = args.length > 0 ? args[0] : null;
173
+ final Connection connection = getConnection(true);
174
+ try {
175
+ connection.setAutoCommit(false);
176
+ // NOTE: JDBC driver does not support setSavepoint(String) :
177
+ connection.createStatement().execute("SAVEPOINT " + name.toString());
178
+
179
+ getSavepoints(context).put(name, new SavepointStub());
180
+
181
+ return name;
182
+ }
183
+ catch (SQLException e) {
184
+ return handleException(context, e);
185
+ }
186
+ }
187
+
188
+ @Override
189
+ @JRubyMethod(name = "rollback_savepoint", required = 1)
190
+ public IRubyObject rollback_savepoint(final ThreadContext context, final IRubyObject name) {
191
+ final Connection connection = getConnection(true);
192
+ try {
193
+ if ( getSavepoints(context).get(name) == null ) {
194
+ throw context.getRuntime().newRuntimeError("could not rollback savepoint: '" + name + "' (not set)");
195
+ }
196
+ // NOTE: JDBC driver does not implement rollback(Savepoint) :
197
+ connection.createStatement().execute("ROLLBACK TO SAVEPOINT " + name.toString());
198
+
199
+ return context.getRuntime().getNil();
200
+ }
201
+ catch (SQLException e) {
202
+ return handleException(context, e);
203
+ }
204
+ }
205
+
206
+ @Override
207
+ @JRubyMethod(name = "release_savepoint", required = 1)
208
+ public IRubyObject release_savepoint(final ThreadContext context, final IRubyObject name) {
209
+ final Connection connection = getConnection(true);
210
+ try {
211
+ if ( getSavepoints(context).get(name) == null ) {
212
+ throw context.getRuntime().newRuntimeError("could not release savepoint: '" + name + "' (not set)");
213
+ }
214
+ // NOTE: JDBC driver does not implement release(Savepoint) :
215
+ connection.createStatement().execute("RELEASE SAVEPOINT " + name.toString());
216
+
217
+ return context.getRuntime().getNil();
218
+ }
219
+ catch (SQLException e) {
220
+ return handleException(context, e);
221
+ }
222
+ }
223
+
142
224
  }
@@ -31,36 +31,36 @@ import org.jruby.util.ByteList;
31
31
 
32
32
  /**
33
33
  * Shared (common) quoting helpers.
34
- *
34
+ *
35
35
  * <br>
36
36
  * NOTE: This is internal API !
37
37
  * <br>
38
- *
38
+ *
39
39
  * @author kares
40
40
  */
41
41
  public abstract class QuotingUtils {
42
-
42
+
43
43
  public static final ByteList BYTES_0 = new ByteList(new byte[] { '0' }, false);
44
-
44
+
45
45
  public static final ByteList BYTES_1 = new ByteList(new byte[] { '1' }, false);
46
-
46
+
47
47
  // e.g. string.gsub("'", "''") -> quoteCharWith(string, '\'', '\'');
48
48
  public static RubyString quoteCharWith(
49
- final ThreadContext context,
50
- final RubyString string,
49
+ final ThreadContext context,
50
+ final RubyString string,
51
51
  final char value, final char quote) {
52
-
52
+
53
53
  final ByteList stringBytes = string.getByteList();
54
54
  final byte[] bytes = stringBytes.unsafeBytes();
55
55
  final int begin = stringBytes.getBegin();
56
56
  final int realSize = stringBytes.getRealSize();
57
-
57
+
58
58
  ByteList quotedBytes = null; int appendFrom = begin;
59
59
  for ( int i = begin; i < begin + realSize; i++ ) {
60
60
  if ( bytes[i] == value ) {
61
61
  if ( quotedBytes == null ) {
62
62
  quotedBytes = new ByteList(
63
- new byte[realSize + 8],
63
+ new byte[realSize + 8],
64
64
  stringBytes.getEncoding()
65
65
  );
66
66
  quotedBytes.setBegin(0);
@@ -79,26 +79,26 @@ public abstract class QuotingUtils {
79
79
  final Ruby runtime = context.getRuntime();
80
80
  return runtime.newString(quotedBytes);
81
81
  }
82
-
83
- static final ByteList SINGLE_Q = new ByteList(new byte[] { '\'' }, false);
84
- static final ByteList QUOTED_SINGLE_Q = new ByteList(new byte[] { '\'', '\'' }, false);
85
-
82
+
83
+ public static final ByteList BYTES_SINGLE_Q = new ByteList(new byte[] { '\'' }, false);
84
+ public static final ByteList BYTES_SINGLE_Q_x2 = new ByteList(new byte[] { '\'', '\'' }, false);
85
+
86
86
  // string.gsub("'", "''") :
87
87
  public static IRubyObject quoteSingleQuotesWithFallback(
88
- final ThreadContext context, final IRubyObject string) {
88
+ final ThreadContext context, final IRubyObject string) {
89
89
  // string.gsub("'", "''") :
90
90
  if ( string instanceof RubyString ) {
91
91
  final char single = '\'';
92
92
  return quoteCharWith(context, (RubyString) string, single, single);
93
93
  }
94
94
  else { // ActiveSupport::Multibyte::Chars
95
- return string.callMethod(context, "gsub",
95
+ return string.callMethod(context, "gsub",
96
96
  new IRubyObject[] {
97
- context.getRuntime().newString(SINGLE_Q),
98
- context.getRuntime().newString(QUOTED_SINGLE_Q)
97
+ context.getRuntime().newString(BYTES_SINGLE_Q),
98
+ context.getRuntime().newString(BYTES_SINGLE_Q_x2)
99
99
  }
100
100
  );
101
101
  }
102
102
  }
103
-
103
+
104
104
  }
metadata CHANGED
@@ -1,411 +1,257 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbc-adapter
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 1.3.0.beta2
5
+ version: 1.3.0.rc1
6
6
  platform: ruby
7
- authors:
8
- - Nick Sieger, Ola Bini and JRuby contributors
9
- autorequire:
7
+ authors:
8
+ - Nick Sieger, Ola Bini and JRuby contributors
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-05-31 00:00:00 Z
14
- dependencies: []
15
-
16
- description: |-
17
- activerecord-jdbc-adapter is a database adapter for Rails\' ActiveRecord
18
- component that can be used with JRuby[http://www.jruby.org/]. It allows use of
19
- virtually any JDBC-compliant database with your JRuby on Rails application.
20
- email: nick@nicksieger.com, ola.bini@gmail.com
12
+ date: 2013-08-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activerecord
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '2.2'
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '2.2'
27
+ none: false
28
+ prerelease: false
29
+ type: :runtime
30
+ description: 'AR-JDBC is a database adapter for Rails'' ActiveRecord component designed
31
+ to be used with JRuby built upon Java''s JDBC API for database access. Provides
32
+ (ActiveRecord) built-in adapters: MySQL, PostgreSQL and SQLite3 as well as adapters
33
+ for popular databases such as Oracle, SQLServer, DB2, FireBird and even Java (embed)
34
+ databases: Derby, HSQLDB and H2. It allows to connect to virtually any JDBC-compliant
35
+ database with your JRuby on Rails application.'
36
+ email:
37
+ - nick@nicksieger.com
38
+ - ola.bini@gmail.com
21
39
  executables: []
22
-
23
40
  extensions: []
24
-
25
41
  extra_rdoc_files: []
26
-
27
- files:
28
- - .gitignore
29
- - .travis.yml
30
- - Appraisals
31
- - Gemfile
32
- - Gemfile.lock
33
- - History.txt
34
- - LICENSE.txt
35
- - README.md
36
- - Rakefile
37
- - activerecord-jdbc-adapter.gemspec
38
- - bench/bench_attributes.rb
39
- - bench/bench_attributes_new.rb
40
- - bench/bench_create.rb
41
- - bench/bench_find_all.rb
42
- - bench/bench_find_all_mt.rb
43
- - bench/bench_model.rb
44
- - bench/bench_new.rb
45
- - bench/bench_new_valid.rb
46
- - bench/bench_valid.rb
47
- - gemfiles/rails23.gemfile
48
- - gemfiles/rails23.gemfile.lock
49
- - gemfiles/rails30.gemfile
50
- - gemfiles/rails30.gemfile.lock
51
- - gemfiles/rails31.gemfile
52
- - gemfiles/rails31.gemfile.lock
53
- - gemfiles/rails32.gemfile
54
- - gemfiles/rails32.gemfile.lock
55
- - gemfiles/rails40.gemfile
56
- - gemfiles/rails40.gemfile.lock
57
- - lib/active_record/connection_adapters/as400_adapter.rb
58
- - lib/active_record/connection_adapters/db2_adapter.rb
59
- - lib/active_record/connection_adapters/derby_adapter.rb
60
- - lib/active_record/connection_adapters/h2_adapter.rb
61
- - lib/active_record/connection_adapters/hsqldb_adapter.rb
62
- - lib/active_record/connection_adapters/informix_adapter.rb
63
- - lib/active_record/connection_adapters/jdbc_adapter.rb
64
- - lib/active_record/connection_adapters/jndi_adapter.rb
65
- - lib/active_record/connection_adapters/mssql_adapter.rb
66
- - lib/active_record/connection_adapters/mysql2_adapter.rb
67
- - lib/active_record/connection_adapters/mysql_adapter.rb
68
- - lib/active_record/connection_adapters/oracle_adapter.rb
69
- - lib/active_record/connection_adapters/postgresql_adapter.rb
70
- - lib/active_record/connection_adapters/sqlite3_adapter.rb
71
- - lib/activerecord-jdbc-adapter.rb
72
- - lib/arel/engines/sql/compilers/db2_compiler.rb
73
- - lib/arel/engines/sql/compilers/derby_compiler.rb
74
- - lib/arel/engines/sql/compilers/h2_compiler.rb
75
- - lib/arel/engines/sql/compilers/hsqldb_compiler.rb
76
- - lib/arel/engines/sql/compilers/jdbc_compiler.rb
77
- - lib/arel/engines/sql/compilers/mssql_compiler.rb
78
- - lib/arel/visitors/compat.rb
79
- - lib/arel/visitors/db2.rb
80
- - lib/arel/visitors/derby.rb
81
- - lib/arel/visitors/firebird.rb
82
- - lib/arel/visitors/hsqldb.rb
83
- - lib/arel/visitors/sql_server.rb
84
- - lib/arjdbc.rb
85
- - lib/arjdbc/db2.rb
86
- - lib/arjdbc/db2/adapter.rb
87
- - lib/arjdbc/db2/as400.rb
88
- - lib/arjdbc/db2/connection_methods.rb
89
- - lib/arjdbc/derby.rb
90
- - lib/arjdbc/derby/active_record_patch.rb
91
- - lib/arjdbc/derby/adapter.rb
92
- - lib/arjdbc/derby/connection_methods.rb
93
- - lib/arjdbc/discover.rb
94
- - lib/arjdbc/firebird.rb
95
- - lib/arjdbc/firebird/adapter.rb
96
- - lib/arjdbc/h2.rb
97
- - lib/arjdbc/h2/adapter.rb
98
- - lib/arjdbc/h2/connection_methods.rb
99
- - lib/arjdbc/hsqldb.rb
100
- - lib/arjdbc/hsqldb/adapter.rb
101
- - lib/arjdbc/hsqldb/connection_methods.rb
102
- - lib/arjdbc/hsqldb/explain_support.rb
103
- - lib/arjdbc/informix.rb
104
- - lib/arjdbc/informix/adapter.rb
105
- - lib/arjdbc/informix/connection_methods.rb
106
- - lib/arjdbc/jdbc.rb
107
- - lib/arjdbc/jdbc/adapter.rb
108
- - lib/arjdbc/jdbc/adapter_java.jar
109
- - lib/arjdbc/jdbc/adapter_require.rb
110
- - lib/arjdbc/jdbc/base_ext.rb
111
- - lib/arjdbc/jdbc/callbacks.rb
112
- - lib/arjdbc/jdbc/column.rb
113
- - lib/arjdbc/jdbc/connection.rb
114
- - lib/arjdbc/jdbc/connection_methods.rb
115
- - lib/arjdbc/jdbc/driver.rb
116
- - lib/arjdbc/jdbc/extension.rb
117
- - lib/arjdbc/jdbc/java.rb
118
- - lib/arjdbc/jdbc/jdbc.rake
119
- - lib/arjdbc/jdbc/missing_functionality_helper.rb
120
- - lib/arjdbc/jdbc/quoted_primary_key.rb
121
- - lib/arjdbc/jdbc/railtie.rb
122
- - lib/arjdbc/jdbc/rake_tasks.rb
123
- - lib/arjdbc/jdbc/serialized_attributes_helper.rb
124
- - lib/arjdbc/jdbc/type_converter.rb
125
- - lib/arjdbc/mimer.rb
126
- - lib/arjdbc/mimer/adapter.rb
127
- - lib/arjdbc/mssql.rb
128
- - lib/arjdbc/mssql/adapter.rb
129
- - lib/arjdbc/mssql/connection_methods.rb
130
- - lib/arjdbc/mssql/explain_support.rb
131
- - lib/arjdbc/mssql/limit_helpers.rb
132
- - lib/arjdbc/mssql/lock_helpers.rb
133
- - lib/arjdbc/mssql/tsql_methods.rb
134
- - lib/arjdbc/mssql/utils.rb
135
- - lib/arjdbc/mysql.rb
136
- - lib/arjdbc/mysql/adapter.rb
137
- - lib/arjdbc/mysql/connection_methods.rb
138
- - lib/arjdbc/mysql/explain_support.rb
139
- - lib/arjdbc/oracle.rb
140
- - lib/arjdbc/oracle/adapter.rb
141
- - lib/arjdbc/oracle/connection_methods.rb
142
- - lib/arjdbc/postgresql.rb
143
- - lib/arjdbc/postgresql/adapter.rb
144
- - lib/arjdbc/postgresql/column_cast.rb
145
- - lib/arjdbc/postgresql/connection_methods.rb
146
- - lib/arjdbc/postgresql/explain_support.rb
147
- - lib/arjdbc/railtie.rb
148
- - lib/arjdbc/sqlite3.rb
149
- - lib/arjdbc/sqlite3/adapter.rb
150
- - lib/arjdbc/sqlite3/connection_methods.rb
151
- - lib/arjdbc/sqlite3/explain_support.rb
152
- - lib/arjdbc/sybase.rb
153
- - lib/arjdbc/sybase/adapter.rb
154
- - lib/arjdbc/tasks.rb
155
- - lib/arjdbc/tasks/database_tasks.rb
156
- - lib/arjdbc/tasks/databases.rake
157
- - lib/arjdbc/tasks/databases3.rake
158
- - lib/arjdbc/tasks/databases4.rake
159
- - lib/arjdbc/tasks/db2_database_tasks.rb
160
- - lib/arjdbc/tasks/derby_database_tasks.rb
161
- - lib/arjdbc/tasks/h2_database_tasks.rb
162
- - lib/arjdbc/tasks/hsqldb_database_tasks.rb
163
- - lib/arjdbc/tasks/jdbc_database_tasks.rb
164
- - lib/arjdbc/tasks/mssql_database_tasks.rb
165
- - lib/arjdbc/tasks/oracle/enhanced_structure_dump.rb
166
- - lib/arjdbc/tasks/oracle_database_tasks.rb
167
- - lib/arjdbc/version.rb
168
- - lib/generators/jdbc/USAGE
169
- - lib/generators/jdbc/jdbc_generator.rb
170
- - lib/jdbc_adapter.rb
171
- - lib/jdbc_adapter/rake_tasks.rb
172
- - lib/jdbc_adapter/version.rb
173
- - pom.xml
174
- - rails_generators/jdbc_generator.rb
175
- - rails_generators/templates/config/initializers/jdbc.rb
176
- - rails_generators/templates/lib/tasks/jdbc.rake
177
- - rakelib/01-tomcat.rake
178
- - rakelib/02-test.rake
179
- - rakelib/bundler_ext.rb
180
- - rakelib/compile.rake
181
- - rakelib/db.rake
182
- - rakelib/rails.rake
183
- - src/java/arjdbc/ArJdbcModule.java
184
- - src/java/arjdbc/db2/DB2Module.java
185
- - src/java/arjdbc/db2/DB2RubyJdbcConnection.java
186
- - src/java/arjdbc/derby/DerbyModule.java
187
- - src/java/arjdbc/derby/DerbyRubyJdbcConnection.java
188
- - src/java/arjdbc/h2/H2RubyJdbcConnection.java
189
- - src/java/arjdbc/hsqldb/HSQLDBModule.java
190
- - src/java/arjdbc/informix/InformixRubyJdbcConnection.java
191
- - src/java/arjdbc/jdbc/AdapterJavaService.java
192
- - src/java/arjdbc/jdbc/Callable.java
193
- - src/java/arjdbc/jdbc/JdbcConnectionFactory.java
194
- - src/java/arjdbc/jdbc/RubyJdbcConnection.java
195
- - src/java/arjdbc/jdbc/SQLBlock.java
196
- - src/java/arjdbc/mssql/MSSQLModule.java
197
- - src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java
198
- - src/java/arjdbc/mssql/MssqlRubyJdbcConnection.java
199
- - src/java/arjdbc/mysql/MySQLModule.java
200
- - src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java
201
- - src/java/arjdbc/oracle/OracleModule.java
202
- - src/java/arjdbc/oracle/OracleRubyJdbcConnection.java
203
- - src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java
204
- - src/java/arjdbc/postgresql/PostgresqlRubyJdbcConnection.java
205
- - src/java/arjdbc/sqlite3/SQLite3Module.java
206
- - src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java
207
- - src/java/arjdbc/sqlite3/Sqlite3RubyJdbcConnection.java
208
- - src/java/arjdbc/util/QuotingUtils.java
209
- - test/activerecord/connections/native_jdbc_mysql/connection.rb
210
- - test/activerecord/jall.sh
211
- - test/activerecord/jtest.sh
212
- - test/assets/example.log
213
- - test/assets/flowers.jpg
214
- - test/assets/test.txt
215
- - test/binary.rb
216
- - test/db/db2.rb
217
- - test/db/db2/binary_test.rb
218
- - test/db/db2/has_many_through_test.rb
219
- - test/db/db2/rake_test.rb
220
- - test/db/db2/rake_test_data.sql
221
- - test/db/db2/reset_column_information_test.rb
222
- - test/db/db2/serialize_test.rb
223
- - test/db/db2/simple_test.rb
224
- - test/db/db2/test_helper.rb
225
- - test/db/db2/unit_test.rb
226
- - test/db/derby.rb
227
- - test/db/derby/binary_test.rb
228
- - test/db/derby/migration_test.rb
229
- - test/db/derby/rake_test.rb
230
- - test/db/derby/reset_column_information_test.rb
231
- - test/db/derby/row_locking_test.rb
232
- - test/db/derby/schema_dump_test.rb
233
- - test/db/derby/serialize_test.rb
234
- - test/db/derby/simple_test.rb
235
- - test/db/derby/test_helper.rb
236
- - test/db/derby/unit_test.rb
237
- - test/db/derby/xml_column_test.rb
238
- - test/db/h2.rb
239
- - test/db/h2/binary_test.rb
240
- - test/db/h2/change_column_test.rb
241
- - test/db/h2/identity_column_test.rb
242
- - test/db/h2/offset_test.rb
243
- - test/db/h2/rake_test.rb
244
- - test/db/h2/schema_dump_test.rb
245
- - test/db/h2/serialize_test.rb
246
- - test/db/h2/simple_test.rb
247
- - test/db/hsqldb.rb
248
- - test/db/hsqldb/binary_test.rb
249
- - test/db/hsqldb/rake_test.rb
250
- - test/db/hsqldb/schema_dump_test.rb
251
- - test/db/hsqldb/serialize_test.rb
252
- - test/db/hsqldb/simple_test.rb
253
- - test/db/informix.rb
254
- - test/db/jdbc.rb
255
- - test/db/jdbc_derby.rb
256
- - test/db/jdbc_h2.rb
257
- - test/db/jdbc_mysql.rb
258
- - test/db/jdbc_postgres.rb
259
- - test/db/jndi_config.rb
260
- - test/db/jndi_pooled_config.rb
261
- - test/db/mssql.rb
262
- - test/db/mssql/binary_test.rb
263
- - test/db/mssql/exec_proc_test.rb
264
- - test/db/mssql/identity_insert_test.rb
265
- - test/db/mssql/ignore_system_views_test.rb
266
- - test/db/mssql/limit_offset_test.rb
267
- - test/db/mssql/multibyte_test.rb
268
- - test/db/mssql/multiple_connections_test.rb
269
- - test/db/mssql/rake_test.rb
270
- - test/db/mssql/reset_column_information_test.rb
271
- - test/db/mssql/row_locking_test.rb
272
- - test/db/mssql/serialize_test.rb
273
- - test/db/mssql/simple_test.rb
274
- - test/db/mssql/transaction_test.rb
275
- - test/db/mssql/types_test.rb
276
- - test/db/mssql/unit_test.rb
277
- - test/db/mysql.rb
278
- - test/db/mysql/_rails_test_mysql.32.out
279
- - test/db/mysql/binary_test.rb
280
- - test/db/mysql/connection_test.rb
281
- - test/db/mysql/index_length_test.rb
282
- - test/db/mysql/multibyte_test.rb
283
- - test/db/mysql/nonstandard_primary_key_test.rb
284
- - test/db/mysql/rake_test.rb
285
- - test/db/mysql/reset_column_information_test.rb
286
- - test/db/mysql/schema_dump_test.rb
287
- - test/db/mysql/serialize_test.rb
288
- - test/db/mysql/simple_test.rb
289
- - test/db/mysql/statement_escaping_test.rb
290
- - test/db/mysql/transaction_test.rb
291
- - test/db/mysql/types_test.rb
292
- - test/db/mysql/unit_test.rb
293
- - test/db/mysql_config.rb
294
- - test/db/oracle.rb
295
- - test/db/oracle/binary_test.rb
296
- - test/db/oracle/limit_test.rb
297
- - test/db/oracle/multibyte_test.rb
298
- - test/db/oracle/rake_test.rb
299
- - test/db/oracle/reset_column_information_test.rb
300
- - test/db/oracle/serialize_test.rb
301
- - test/db/oracle/simple_test.rb
302
- - test/db/oracle/specific_test.rb
303
- - test/db/oracle/transaction_test.rb
304
- - test/db/oracle/unit_test.rb
305
- - test/db/postgres.rb
306
- - test/db/postgres/_rails_test_postgres.32.out
307
- - test/db/postgres/a_custom_primary_key_test.rb
308
- - test/db/postgres/active_schema_unit_test.rb
309
- - test/db/postgres/array_type_test.rb
310
- - test/db/postgres/binary_test.rb
311
- - test/db/postgres/connection_test.rb
312
- - test/db/postgres/data_types_test.rb
313
- - test/db/postgres/hstore_test.rb
314
- - test/db/postgres/information_schema_leak_test.rb
315
- - test/db/postgres/json_test.rb
316
- - test/db/postgres/ltree_test.rb
317
- - test/db/postgres/mixed_case_test.rb
318
- - test/db/postgres/native_types_test.rb
319
- - test/db/postgres/rake_test.rb
320
- - test/db/postgres/reserved_test.rb
321
- - test/db/postgres/reset_column_information_test.rb
322
- - test/db/postgres/row_locking_test.rb
323
- - test/db/postgres/schema_dump_test.rb
324
- - test/db/postgres/schema_test.rb
325
- - test/db/postgres/simple_test.rb
326
- - test/db/postgres/table_alias_length_test.rb
327
- - test/db/postgres/transaction_test.rb
328
- - test/db/postgres/unit_test.rb
329
- - test/db/postgres_config.rb
330
- - test/db/sqlite3.rb
331
- - test/db/sqlite3/_rails_test_sqlite3.32.out
332
- - test/db/sqlite3/has_many_though_test.rb
333
- - test/db/sqlite3/rake_test.rb
334
- - test/db/sqlite3/reset_column_information_test.rb
335
- - test/db/sqlite3/schema_dump_test.rb
336
- - test/db/sqlite3/serialize_test.rb
337
- - test/db/sqlite3/simple_test.rb
338
- - test/db/sqlite3/transaction_test.rb
339
- - test/db/sqlite3/type_conversion_test.rb
340
- - test/has_many_through.rb
341
- - test/informix_simple_test.rb
342
- - test/jdbc/db2.rb
343
- - test/jdbc/oracle.rb
344
- - test/jdbc_column_test.rb
345
- - test/jdbc_common.rb
346
- - test/jdbc_connection_test.rb
347
- - test/jndi_callbacks_test.rb
348
- - test/jndi_test.rb
349
- - test/manualTestDatabase.rb
350
- - test/models/add_not_null_column_to_table.rb
351
- - test/models/auto_id.rb
352
- - test/models/binary.rb
353
- - test/models/custom_pk_name.rb
354
- - test/models/data_types.rb
355
- - test/models/entry.rb
356
- - test/models/mixed_case.rb
357
- - test/models/reserved_word.rb
358
- - test/models/rights_and_roles.rb
359
- - test/models/string_id.rb
360
- - test/models/thing.rb
361
- - test/models/topic.rb
362
- - test/models/validates_uniqueness_of_string.rb
363
- - test/rails/mysql.rb
364
- - test/rails/sqlite3/version.rb
365
- - test/rails_stub.rb
366
- - test/rake_test_support.rb
367
- - test/row_locking.rb
368
- - test/schema_dump.rb
369
- - test/serialize.rb
370
- - test/shared_helper.rb
371
- - test/simple.rb
372
- - test/sybase_jtds_simple_test.rb
373
- - test/sybase_reset_column_information_test.rb
374
- - test/test_helper.rb
375
- - test/transaction.rb
42
+ files:
43
+ - .gitignore
44
+ - .travis.yml
45
+ - .yardopts
46
+ - Appraisals
47
+ - CONTRIBUTING.md
48
+ - Gemfile
49
+ - Gemfile.lock
50
+ - History.md
51
+ - LICENSE.txt
52
+ - README.md
53
+ - RUNNING_TESTS.md
54
+ - Rakefile
55
+ - Rakefile.jdbc
56
+ - activerecord-jdbc-adapter.gemspec
57
+ - gemfiles/rails23.gemfile
58
+ - gemfiles/rails23.gemfile.lock
59
+ - gemfiles/rails30.gemfile
60
+ - gemfiles/rails30.gemfile.lock
61
+ - gemfiles/rails31.gemfile
62
+ - gemfiles/rails31.gemfile.lock
63
+ - gemfiles/rails32.gemfile
64
+ - gemfiles/rails32.gemfile.lock
65
+ - gemfiles/rails40.gemfile
66
+ - gemfiles/rails40.gemfile.lock
67
+ - lib/active_record/connection_adapters/as400_adapter.rb
68
+ - lib/active_record/connection_adapters/db2_adapter.rb
69
+ - lib/active_record/connection_adapters/derby_adapter.rb
70
+ - lib/active_record/connection_adapters/firebird_adapter.rb
71
+ - lib/active_record/connection_adapters/h2_adapter.rb
72
+ - lib/active_record/connection_adapters/hsqldb_adapter.rb
73
+ - lib/active_record/connection_adapters/informix_adapter.rb
74
+ - lib/active_record/connection_adapters/jdbc_adapter.rb
75
+ - lib/active_record/connection_adapters/jndi_adapter.rb
76
+ - lib/active_record/connection_adapters/mssql_adapter.rb
77
+ - lib/active_record/connection_adapters/mysql2_adapter.rb
78
+ - lib/active_record/connection_adapters/mysql_adapter.rb
79
+ - lib/active_record/connection_adapters/oracle_adapter.rb
80
+ - lib/active_record/connection_adapters/postgresql_adapter.rb
81
+ - lib/active_record/connection_adapters/sqlite3_adapter.rb
82
+ - lib/active_record/connection_adapters/sqlserver_adapter.rb
83
+ - lib/activerecord-jdbc-adapter.rb
84
+ - lib/arel/visitors/compat.rb
85
+ - lib/arel/visitors/db2.rb
86
+ - lib/arel/visitors/derby.rb
87
+ - lib/arel/visitors/firebird.rb
88
+ - lib/arel/visitors/hsqldb.rb
89
+ - lib/arel/visitors/sql_server.rb
90
+ - lib/arjdbc.rb
91
+ - lib/arjdbc/db2.rb
92
+ - lib/arjdbc/db2/adapter.rb
93
+ - lib/arjdbc/db2/as400.rb
94
+ - lib/arjdbc/db2/column.rb
95
+ - lib/arjdbc/db2/connection_methods.rb
96
+ - lib/arjdbc/derby.rb
97
+ - lib/arjdbc/derby/active_record_patch.rb
98
+ - lib/arjdbc/derby/adapter.rb
99
+ - lib/arjdbc/derby/connection_methods.rb
100
+ - lib/arjdbc/discover.rb
101
+ - lib/arjdbc/firebird.rb
102
+ - lib/arjdbc/firebird/adapter.rb
103
+ - lib/arjdbc/firebird/connection_methods.rb
104
+ - lib/arjdbc/h2.rb
105
+ - lib/arjdbc/h2/adapter.rb
106
+ - lib/arjdbc/h2/connection_methods.rb
107
+ - lib/arjdbc/hsqldb.rb
108
+ - lib/arjdbc/hsqldb/adapter.rb
109
+ - lib/arjdbc/hsqldb/connection_methods.rb
110
+ - lib/arjdbc/hsqldb/explain_support.rb
111
+ - lib/arjdbc/informix.rb
112
+ - lib/arjdbc/informix/adapter.rb
113
+ - lib/arjdbc/informix/connection_methods.rb
114
+ - lib/arjdbc/jdbc.rb
115
+ - lib/arjdbc/jdbc/adapter.rb
116
+ - lib/arjdbc/jdbc/adapter_java.jar
117
+ - lib/arjdbc/jdbc/adapter_require.rb
118
+ - lib/arjdbc/jdbc/arel_support.rb
119
+ - lib/arjdbc/jdbc/base_ext.rb
120
+ - lib/arjdbc/jdbc/callbacks.rb
121
+ - lib/arjdbc/jdbc/column.rb
122
+ - lib/arjdbc/jdbc/connection.rb
123
+ - lib/arjdbc/jdbc/connection_methods.rb
124
+ - lib/arjdbc/jdbc/driver.rb
125
+ - lib/arjdbc/jdbc/extension.rb
126
+ - lib/arjdbc/jdbc/java.rb
127
+ - lib/arjdbc/jdbc/jdbc.rake
128
+ - lib/arjdbc/jdbc/quoted_primary_key.rb
129
+ - lib/arjdbc/jdbc/railtie.rb
130
+ - lib/arjdbc/jdbc/rake_tasks.rb
131
+ - lib/arjdbc/jdbc/serialized_attributes_helper.rb
132
+ - lib/arjdbc/jdbc/type_converter.rb
133
+ - lib/arjdbc/mimer.rb
134
+ - lib/arjdbc/mimer/adapter.rb
135
+ - lib/arjdbc/mssql.rb
136
+ - lib/arjdbc/mssql/adapter.rb
137
+ - lib/arjdbc/mssql/column.rb
138
+ - lib/arjdbc/mssql/connection_methods.rb
139
+ - lib/arjdbc/mssql/explain_support.rb
140
+ - lib/arjdbc/mssql/limit_helpers.rb
141
+ - lib/arjdbc/mssql/lock_methods.rb
142
+ - lib/arjdbc/mssql/utils.rb
143
+ - lib/arjdbc/mysql.rb
144
+ - lib/arjdbc/mysql/adapter.rb
145
+ - lib/arjdbc/mysql/column.rb
146
+ - lib/arjdbc/mysql/connection_methods.rb
147
+ - lib/arjdbc/mysql/explain_support.rb
148
+ - lib/arjdbc/oracle.rb
149
+ - lib/arjdbc/oracle/adapter.rb
150
+ - lib/arjdbc/oracle/column.rb
151
+ - lib/arjdbc/oracle/connection_methods.rb
152
+ - lib/arjdbc/postgresql.rb
153
+ - lib/arjdbc/postgresql/adapter.rb
154
+ - lib/arjdbc/postgresql/column.rb
155
+ - lib/arjdbc/postgresql/connection_methods.rb
156
+ - lib/arjdbc/postgresql/explain_support.rb
157
+ - lib/arjdbc/postgresql/schema_creation.rb
158
+ - lib/arjdbc/railtie.rb
159
+ - lib/arjdbc/sqlite3.rb
160
+ - lib/arjdbc/sqlite3/adapter.rb
161
+ - lib/arjdbc/sqlite3/connection_methods.rb
162
+ - lib/arjdbc/sqlite3/explain_support.rb
163
+ - lib/arjdbc/sybase.rb
164
+ - lib/arjdbc/sybase/adapter.rb
165
+ - lib/arjdbc/tasks.rb
166
+ - lib/arjdbc/tasks/database_tasks.rb
167
+ - lib/arjdbc/tasks/databases.rake
168
+ - lib/arjdbc/tasks/databases3.rake
169
+ - lib/arjdbc/tasks/databases4.rake
170
+ - lib/arjdbc/tasks/db2_database_tasks.rb
171
+ - lib/arjdbc/tasks/derby_database_tasks.rb
172
+ - lib/arjdbc/tasks/h2_database_tasks.rb
173
+ - lib/arjdbc/tasks/hsqldb_database_tasks.rb
174
+ - lib/arjdbc/tasks/jdbc_database_tasks.rb
175
+ - lib/arjdbc/tasks/mssql_database_tasks.rb
176
+ - lib/arjdbc/tasks/oracle/enhanced_structure_dump.rb
177
+ - lib/arjdbc/tasks/oracle_database_tasks.rb
178
+ - lib/arjdbc/util/quoted_cache.rb
179
+ - lib/arjdbc/util/table_copier.rb
180
+ - lib/arjdbc/version.rb
181
+ - lib/generators/jdbc/USAGE
182
+ - lib/generators/jdbc/jdbc_generator.rb
183
+ - lib/jdbc_adapter.rb
184
+ - lib/jdbc_adapter/rake_tasks.rb
185
+ - lib/jdbc_adapter/version.rb
186
+ - pom.xml
187
+ - rails_generators/jdbc_generator.rb
188
+ - rails_generators/templates/config/initializers/jdbc.rb
189
+ - rails_generators/templates/lib/tasks/jdbc.rake
190
+ - rakelib/01-tomcat.rake
191
+ - rakelib/02-test.rake
192
+ - rakelib/bundler_ext.rb
193
+ - rakelib/compile.rake
194
+ - rakelib/db.rake
195
+ - rakelib/rails.rake
196
+ - src/java/arjdbc/ArJdbcModule.java
197
+ - src/java/arjdbc/db2/DB2Module.java
198
+ - src/java/arjdbc/db2/DB2RubyJdbcConnection.java
199
+ - src/java/arjdbc/derby/DerbyModule.java
200
+ - src/java/arjdbc/derby/DerbyRubyJdbcConnection.java
201
+ - src/java/arjdbc/h2/H2Module.java
202
+ - src/java/arjdbc/h2/H2RubyJdbcConnection.java
203
+ - src/java/arjdbc/hsqldb/HSQLDBModule.java
204
+ - src/java/arjdbc/informix/InformixRubyJdbcConnection.java
205
+ - src/java/arjdbc/jdbc/AdapterJavaService.java
206
+ - src/java/arjdbc/jdbc/Callable.java
207
+ - src/java/arjdbc/jdbc/JdbcConnectionFactory.java
208
+ - src/java/arjdbc/jdbc/RubyJdbcConnection.java
209
+ - src/java/arjdbc/jdbc/SQLBlock.java
210
+ - src/java/arjdbc/mssql/MSSQLModule.java
211
+ - src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java
212
+ - src/java/arjdbc/mssql/MssqlRubyJdbcConnection.java
213
+ - src/java/arjdbc/mysql/MySQLModule.java
214
+ - src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java
215
+ - src/java/arjdbc/oracle/OracleModule.java
216
+ - src/java/arjdbc/oracle/OracleRubyJdbcConnection.java
217
+ - src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java
218
+ - src/java/arjdbc/postgresql/PostgresqlRubyJdbcConnection.java
219
+ - src/java/arjdbc/sqlite3/SQLite3Module.java
220
+ - src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java
221
+ - src/java/arjdbc/sqlite3/Sqlite3RubyJdbcConnection.java
222
+ - src/java/arjdbc/util/QuotingUtils.java
376
223
  homepage: https://github.com/jruby/activerecord-jdbc-adapter
377
- licenses:
378
- - BSD
379
- post_install_message:
380
- rdoc_options:
381
- - --main
382
- - README.md
383
- - -SHN
384
- - -f
385
- - darkfish
386
- require_paths:
387
- - lib
388
- required_ruby_version: !ruby/object:Gem::Requirement
224
+ licenses:
225
+ - BSD
226
+ post_install_message:
227
+ rdoc_options:
228
+ - --main
229
+ - README.md
230
+ - -SHN
231
+ - -f
232
+ - darkfish
233
+ require_paths:
234
+ - lib
235
+ required_ruby_version: !ruby/object:Gem::Requirement
236
+ requirements:
237
+ - - '>='
238
+ - !ruby/object:Gem::Version
239
+ segments:
240
+ - 0
241
+ hash: 2
242
+ version: '0'
389
243
  none: false
390
- requirements:
391
- - - ">="
392
- - !ruby/object:Gem::Version
393
- hash: 2
394
- segments:
395
- - 0
396
- version: "0"
397
- required_rubygems_version: !ruby/object:Gem::Requirement
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - '>'
247
+ - !ruby/object:Gem::Version
248
+ version: 1.3.1
398
249
  none: false
399
- requirements:
400
- - - ">"
401
- - !ruby/object:Gem::Version
402
- version: 1.3.1
403
250
  requirements: []
404
-
405
251
  rubyforge_project: jruby-extras
406
252
  rubygems_version: 1.8.24
407
- signing_key:
253
+ signing_key:
408
254
  specification_version: 3
409
255
  summary: JDBC adapter for ActiveRecord, for use within JRuby on Rails.
410
256
  test_files: []
411
-
257
+ has_rdoc: