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.
- data/.gitignore +14 -8
- data/.travis.yml +40 -31
- data/.yardopts +4 -0
- data/Appraisals +2 -5
- data/CONTRIBUTING.md +46 -0
- data/Gemfile +21 -4
- data/Gemfile.lock +42 -17
- data/{History.txt → History.md} +142 -75
- data/README.md +102 -104
- data/RUNNING_TESTS.md +76 -0
- data/Rakefile.jdbc +20 -0
- data/activerecord-jdbc-adapter.gemspec +35 -18
- data/gemfiles/rails23.gemfile +4 -3
- data/gemfiles/rails23.gemfile.lock +9 -6
- data/gemfiles/rails30.gemfile +4 -3
- data/gemfiles/rails30.gemfile.lock +9 -6
- data/gemfiles/rails31.gemfile +4 -3
- data/gemfiles/rails31.gemfile.lock +9 -6
- data/gemfiles/rails32.gemfile +4 -3
- data/gemfiles/rails32.gemfile.lock +17 -14
- data/gemfiles/rails40.gemfile +5 -5
- data/gemfiles/rails40.gemfile.lock +17 -69
- data/lib/active_record/connection_adapters/firebird_adapter.rb +1 -0
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +1 -0
- data/lib/arel/visitors/compat.rb +22 -3
- data/lib/arel/visitors/db2.rb +8 -4
- data/lib/arel/visitors/derby.rb +14 -13
- data/lib/arel/visitors/firebird.rb +5 -4
- data/lib/arel/visitors/hsqldb.rb +11 -9
- data/lib/arel/visitors/sql_server.rb +89 -61
- data/lib/arjdbc.rb +1 -1
- data/lib/arjdbc/db2/adapter.rb +181 -212
- data/lib/arjdbc/db2/as400.rb +31 -18
- data/lib/arjdbc/db2/column.rb +167 -0
- data/lib/arjdbc/db2/connection_methods.rb +2 -0
- data/lib/arjdbc/derby/adapter.rb +206 -107
- data/lib/arjdbc/derby/connection_methods.rb +4 -9
- data/lib/arjdbc/firebird.rb +1 -0
- data/lib/arjdbc/firebird/adapter.rb +202 -64
- data/lib/arjdbc/firebird/connection_methods.rb +20 -0
- data/lib/arjdbc/h2/adapter.rb +56 -36
- data/lib/arjdbc/hsqldb/adapter.rb +99 -68
- data/lib/arjdbc/jdbc/adapter.rb +474 -265
- data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
- data/lib/arjdbc/jdbc/adapter_require.rb +8 -7
- data/lib/arjdbc/jdbc/arel_support.rb +132 -0
- data/lib/arjdbc/jdbc/base_ext.rb +8 -7
- data/lib/arjdbc/jdbc/callbacks.rb +16 -10
- data/lib/arjdbc/jdbc/column.rb +25 -3
- data/lib/arjdbc/jdbc/connection.rb +28 -55
- data/lib/arjdbc/jdbc/extension.rb +14 -14
- data/lib/arjdbc/jdbc/java.rb +6 -3
- data/lib/arjdbc/jdbc/jdbc.rake +1 -1
- data/lib/arjdbc/jdbc/quoted_primary_key.rb +2 -2
- data/lib/arjdbc/jdbc/rake_tasks.rb +1 -1
- data/lib/arjdbc/jdbc/type_converter.rb +5 -2
- data/lib/arjdbc/mssql/adapter.rb +160 -280
- data/lib/arjdbc/mssql/column.rb +182 -0
- data/lib/arjdbc/mssql/connection_methods.rb +37 -4
- data/lib/arjdbc/mssql/explain_support.rb +13 -21
- data/lib/arjdbc/mssql/limit_helpers.rb +79 -42
- data/lib/arjdbc/mssql/lock_methods.rb +77 -0
- data/lib/arjdbc/mssql/utils.rb +11 -11
- data/lib/arjdbc/mysql/adapter.rb +165 -247
- data/lib/arjdbc/mysql/column.rb +123 -0
- data/lib/arjdbc/mysql/connection_methods.rb +3 -6
- data/lib/arjdbc/oracle/adapter.rb +282 -288
- data/lib/arjdbc/oracle/column.rb +122 -0
- data/lib/arjdbc/oracle/connection_methods.rb +3 -0
- data/lib/arjdbc/postgresql/adapter.rb +336 -574
- data/lib/arjdbc/postgresql/column.rb +458 -0
- data/lib/arjdbc/postgresql/connection_methods.rb +1 -2
- data/lib/arjdbc/postgresql/schema_creation.rb +38 -0
- data/lib/arjdbc/sqlite3/adapter.rb +189 -145
- data/lib/arjdbc/sqlite3/explain_support.rb +1 -1
- data/lib/arjdbc/tasks/oracle/enhanced_structure_dump.rb +8 -8
- data/lib/arjdbc/util/quoted_cache.rb +60 -0
- data/lib/arjdbc/util/table_copier.rb +110 -0
- data/lib/arjdbc/version.rb +6 -7
- data/pom.xml +56 -2
- data/rakelib/02-test.rake +72 -83
- data/rakelib/db.rake +29 -17
- data/src/java/arjdbc/ArJdbcModule.java +21 -18
- data/src/java/arjdbc/db2/DB2RubyJdbcConnection.java +84 -12
- data/src/java/arjdbc/derby/DerbyModule.java +140 -143
- data/src/java/arjdbc/derby/DerbyRubyJdbcConnection.java +58 -7
- data/src/java/arjdbc/h2/H2Module.java +43 -0
- data/src/java/arjdbc/informix/InformixRubyJdbcConnection.java +7 -6
- data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +1223 -648
- data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +24 -23
- data/src/java/arjdbc/mysql/MySQLModule.java +33 -32
- data/src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java +147 -30
- data/src/java/arjdbc/oracle/OracleModule.java +13 -13
- data/src/java/arjdbc/oracle/OracleRubyJdbcConnection.java +114 -6
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +166 -36
- data/src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java +101 -19
- data/src/java/arjdbc/util/QuotingUtils.java +19 -19
- metadata +240 -394
- data/bench/bench_attributes.rb +0 -13
- data/bench/bench_attributes_new.rb +0 -14
- data/bench/bench_create.rb +0 -12
- data/bench/bench_find_all.rb +0 -12
- data/bench/bench_find_all_mt.rb +0 -25
- data/bench/bench_model.rb +0 -85
- data/bench/bench_new.rb +0 -12
- data/bench/bench_new_valid.rb +0 -12
- data/bench/bench_valid.rb +0 -13
- data/lib/arel/engines/sql/compilers/db2_compiler.rb +0 -9
- data/lib/arel/engines/sql/compilers/derby_compiler.rb +0 -6
- data/lib/arel/engines/sql/compilers/h2_compiler.rb +0 -6
- data/lib/arel/engines/sql/compilers/hsqldb_compiler.rb +0 -15
- data/lib/arel/engines/sql/compilers/jdbc_compiler.rb +0 -6
- data/lib/arel/engines/sql/compilers/mssql_compiler.rb +0 -46
- data/lib/arjdbc/jdbc/missing_functionality_helper.rb +0 -98
- data/lib/arjdbc/mssql/lock_helpers.rb +0 -76
- data/lib/arjdbc/mssql/tsql_methods.rb +0 -58
- data/lib/arjdbc/postgresql/column_cast.rb +0 -134
- data/test/activerecord/connections/native_jdbc_mysql/connection.rb +0 -25
- data/test/activerecord/jall.sh +0 -7
- data/test/activerecord/jtest.sh +0 -3
- data/test/assets/flowers.jpg +0 -0
- data/test/binary.rb +0 -67
- data/test/db/db2.rb +0 -43
- data/test/db/db2/binary_test.rb +0 -6
- data/test/db/db2/has_many_through_test.rb +0 -6
- data/test/db/db2/rake_test.rb +0 -82
- data/test/db/db2/rake_test_data.sql +0 -35
- data/test/db/db2/reset_column_information_test.rb +0 -5
- data/test/db/db2/serialize_test.rb +0 -6
- data/test/db/db2/simple_test.rb +0 -81
- data/test/db/db2/test_helper.rb +0 -6
- data/test/db/db2/unit_test.rb +0 -73
- data/test/db/derby.rb +0 -12
- data/test/db/derby/binary_test.rb +0 -6
- data/test/db/derby/migration_test.rb +0 -74
- data/test/db/derby/rake_test.rb +0 -96
- data/test/db/derby/reset_column_information_test.rb +0 -6
- data/test/db/derby/row_locking_test.rb +0 -20
- data/test/db/derby/schema_dump_test.rb +0 -5
- data/test/db/derby/serialize_test.rb +0 -6
- data/test/db/derby/simple_test.rb +0 -173
- data/test/db/derby/test_helper.rb +0 -6
- data/test/db/derby/unit_test.rb +0 -32
- data/test/db/derby/xml_column_test.rb +0 -17
- data/test/db/h2.rb +0 -11
- data/test/db/h2/binary_test.rb +0 -6
- data/test/db/h2/change_column_test.rb +0 -68
- data/test/db/h2/identity_column_test.rb +0 -35
- data/test/db/h2/offset_test.rb +0 -49
- data/test/db/h2/rake_test.rb +0 -98
- data/test/db/h2/schema_dump_test.rb +0 -29
- data/test/db/h2/serialize_test.rb +0 -6
- data/test/db/h2/simple_test.rb +0 -56
- data/test/db/hsqldb.rb +0 -11
- data/test/db/hsqldb/binary_test.rb +0 -6
- data/test/db/hsqldb/rake_test.rb +0 -101
- data/test/db/hsqldb/schema_dump_test.rb +0 -19
- data/test/db/hsqldb/serialize_test.rb +0 -6
- data/test/db/hsqldb/simple_test.rb +0 -17
- data/test/db/informix.rb +0 -13
- data/test/db/jdbc.rb +0 -16
- data/test/db/jdbc_derby.rb +0 -14
- data/test/db/jdbc_h2.rb +0 -17
- data/test/db/jdbc_mysql.rb +0 -13
- data/test/db/jdbc_postgres.rb +0 -23
- data/test/db/jndi_config.rb +0 -32
- data/test/db/jndi_pooled_config.rb +0 -32
- data/test/db/mssql.rb +0 -11
- data/test/db/mssql/binary_test.rb +0 -6
- data/test/db/mssql/exec_proc_test.rb +0 -46
- data/test/db/mssql/identity_insert_test.rb +0 -18
- data/test/db/mssql/ignore_system_views_test.rb +0 -40
- data/test/db/mssql/limit_offset_test.rb +0 -190
- data/test/db/mssql/multibyte_test.rb +0 -16
- data/test/db/mssql/multiple_connections_test.rb +0 -71
- data/test/db/mssql/rake_test.rb +0 -143
- data/test/db/mssql/reset_column_information_test.rb +0 -6
- data/test/db/mssql/row_locking_test.rb +0 -7
- data/test/db/mssql/serialize_test.rb +0 -6
- data/test/db/mssql/simple_test.rb +0 -140
- data/test/db/mssql/transaction_test.rb +0 -6
- data/test/db/mssql/types_test.rb +0 -205
- data/test/db/mssql/unit_test.rb +0 -249
- data/test/db/mysql.rb +0 -4
- data/test/db/mysql/_rails_test_mysql.32.out +0 -6585
- data/test/db/mysql/binary_test.rb +0 -6
- data/test/db/mysql/connection_test.rb +0 -51
- data/test/db/mysql/index_length_test.rb +0 -58
- data/test/db/mysql/multibyte_test.rb +0 -10
- data/test/db/mysql/nonstandard_primary_key_test.rb +0 -39
- data/test/db/mysql/rake_test.rb +0 -97
- data/test/db/mysql/reset_column_information_test.rb +0 -6
- data/test/db/mysql/schema_dump_test.rb +0 -228
- data/test/db/mysql/serialize_test.rb +0 -6
- data/test/db/mysql/simple_test.rb +0 -187
- data/test/db/mysql/statement_escaping_test.rb +0 -46
- data/test/db/mysql/transaction_test.rb +0 -6
- data/test/db/mysql/types_test.rb +0 -30
- data/test/db/mysql/unit_test.rb +0 -93
- data/test/db/mysql_config.rb +0 -7
- data/test/db/oracle.rb +0 -27
- data/test/db/oracle/binary_test.rb +0 -6
- data/test/db/oracle/limit_test.rb +0 -24
- data/test/db/oracle/multibyte_test.rb +0 -22
- data/test/db/oracle/rake_test.rb +0 -100
- data/test/db/oracle/reset_column_information_test.rb +0 -6
- data/test/db/oracle/serialize_test.rb +0 -6
- data/test/db/oracle/simple_test.rb +0 -140
- data/test/db/oracle/specific_test.rb +0 -180
- data/test/db/oracle/transaction_test.rb +0 -31
- data/test/db/oracle/unit_test.rb +0 -31
- data/test/db/postgres.rb +0 -11
- data/test/db/postgres/_rails_test_postgres.32.out +0 -6405
- data/test/db/postgres/a_custom_primary_key_test.rb +0 -50
- data/test/db/postgres/active_schema_unit_test.rb +0 -68
- data/test/db/postgres/array_type_test.rb +0 -101
- data/test/db/postgres/binary_test.rb +0 -6
- data/test/db/postgres/connection_test.rb +0 -63
- data/test/db/postgres/data_types_test.rb +0 -703
- data/test/db/postgres/hstore_test.rb +0 -200
- data/test/db/postgres/information_schema_leak_test.rb +0 -30
- data/test/db/postgres/json_test.rb +0 -86
- data/test/db/postgres/ltree_test.rb +0 -51
- data/test/db/postgres/mixed_case_test.rb +0 -29
- data/test/db/postgres/native_types_test.rb +0 -124
- data/test/db/postgres/rake_test.rb +0 -117
- data/test/db/postgres/reserved_test.rb +0 -22
- data/test/db/postgres/reset_column_information_test.rb +0 -6
- data/test/db/postgres/row_locking_test.rb +0 -21
- data/test/db/postgres/schema_dump_test.rb +0 -95
- data/test/db/postgres/schema_test.rb +0 -115
- data/test/db/postgres/simple_test.rb +0 -260
- data/test/db/postgres/table_alias_length_test.rb +0 -16
- data/test/db/postgres/transaction_test.rb +0 -6
- data/test/db/postgres/unit_test.rb +0 -31
- data/test/db/postgres_config.rb +0 -10
- data/test/db/sqlite3.rb +0 -6
- data/test/db/sqlite3/_rails_test_sqlite3.32.out +0 -6274
- data/test/db/sqlite3/has_many_though_test.rb +0 -6
- data/test/db/sqlite3/rake_test.rb +0 -71
- data/test/db/sqlite3/reset_column_information_test.rb +0 -6
- data/test/db/sqlite3/schema_dump_test.rb +0 -6
- data/test/db/sqlite3/serialize_test.rb +0 -6
- data/test/db/sqlite3/simple_test.rb +0 -268
- data/test/db/sqlite3/transaction_test.rb +0 -32
- data/test/db/sqlite3/type_conversion_test.rb +0 -104
- data/test/has_many_through.rb +0 -61
- data/test/informix_simple_test.rb +0 -48
- data/test/jdbc/db2.rb +0 -36
- data/test/jdbc/oracle.rb +0 -34
- data/test/jdbc_column_test.rb +0 -23
- data/test/jdbc_common.rb +0 -16
- data/test/jdbc_connection_test.rb +0 -196
- data/test/jndi_callbacks_test.rb +0 -33
- data/test/jndi_test.rb +0 -55
- data/test/manualTestDatabase.rb +0 -191
- data/test/models/add_not_null_column_to_table.rb +0 -9
- data/test/models/auto_id.rb +0 -15
- data/test/models/binary.rb +0 -18
- data/test/models/custom_pk_name.rb +0 -15
- data/test/models/data_types.rb +0 -40
- data/test/models/entry.rb +0 -41
- data/test/models/mixed_case.rb +0 -22
- data/test/models/reserved_word.rb +0 -15
- data/test/models/rights_and_roles.rb +0 -57
- data/test/models/string_id.rb +0 -17
- data/test/models/thing.rb +0 -17
- data/test/models/topic.rb +0 -32
- data/test/models/validates_uniqueness_of_string.rb +0 -19
- data/test/rails/mysql.rb +0 -13
- data/test/rails/sqlite3/version.rb +0 -6
- data/test/rails_stub.rb +0 -31
- data/test/rake_test_support.rb +0 -298
- data/test/row_locking.rb +0 -102
- data/test/schema_dump.rb +0 -182
- data/test/serialize.rb +0 -275
- data/test/shared_helper.rb +0 -35
- data/test/simple.rb +0 -1317
- data/test/sybase_jtds_simple_test.rb +0 -28
- data/test/sybase_reset_column_information_test.rb +0 -6
- data/test/test_helper.rb +0 -304
- 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
|
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
|
-
|
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, "
|
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
|
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
|
84
|
-
static final ByteList
|
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(
|
98
|
-
context.getRuntime().newString(
|
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.
|
5
|
+
version: 1.3.0.rc1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
9
|
-
autorequire:
|
7
|
+
authors:
|
8
|
+
- Nick Sieger, Ola Bini and JRuby contributors
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
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
|
-
|
379
|
-
post_install_message:
|
380
|
-
rdoc_options:
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
require_paths:
|
387
|
-
|
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
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
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:
|