activerecord-jdbc-adapter 1.0.3-java → 50.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +33 -0
- data/.travis.yml +79 -0
- data/.yardopts +4 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +91 -0
- data/History.md +1191 -0
- data/LICENSE.txt +22 -17
- data/README.md +169 -0
- data/RUNNING_TESTS.md +127 -0
- data/Rakefile +294 -5
- data/Rakefile.jdbc +20 -0
- data/activerecord-jdbc-adapter.gemspec +55 -0
- data/lib/active_record/connection_adapters/as400_adapter.rb +2 -0
- data/lib/active_record/connection_adapters/db2_adapter.rb +1 -0
- data/lib/active_record/connection_adapters/firebird_adapter.rb +1 -0
- data/lib/active_record/connection_adapters/mariadb_adapter.rb +1 -0
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +1 -0
- data/lib/activerecord-jdbc-adapter.rb +0 -5
- data/lib/arel/visitors/compat.rb +60 -0
- data/lib/arel/visitors/db2.rb +128 -6
- data/lib/arel/visitors/derby.rb +103 -10
- data/lib/arel/visitors/firebird.rb +79 -0
- data/lib/arel/visitors/h2.rb +25 -0
- data/lib/arel/visitors/hsqldb.rb +18 -10
- data/lib/arel/visitors/postgresql_jdbc.rb +6 -0
- data/lib/arel/visitors/sql_server.rb +225 -0
- data/lib/arel/visitors/sql_server/ng42.rb +293 -0
- data/lib/arjdbc.rb +11 -21
- data/lib/arjdbc/abstract/connection_management.rb +35 -0
- data/lib/arjdbc/abstract/core.rb +64 -0
- data/lib/arjdbc/abstract/database_statements.rb +64 -0
- data/lib/arjdbc/abstract/statement_cache.rb +58 -0
- data/lib/arjdbc/abstract/transaction_support.rb +86 -0
- data/lib/arjdbc/db2.rb +3 -1
- data/lib/arjdbc/db2/adapter.rb +630 -250
- data/lib/arjdbc/db2/as400.rb +130 -0
- data/lib/arjdbc/db2/column.rb +167 -0
- data/lib/arjdbc/db2/connection_methods.rb +44 -0
- data/lib/arjdbc/derby.rb +1 -5
- data/lib/arjdbc/derby/active_record_patch.rb +13 -0
- data/lib/arjdbc/derby/adapter.rb +409 -217
- data/lib/arjdbc/derby/connection_methods.rb +16 -14
- data/lib/arjdbc/derby/schema_creation.rb +15 -0
- data/lib/arjdbc/discover.rb +62 -50
- data/lib/arjdbc/firebird.rb +3 -1
- data/lib/arjdbc/firebird/adapter.rb +365 -62
- data/lib/arjdbc/firebird/connection_methods.rb +23 -0
- data/lib/arjdbc/h2.rb +2 -3
- data/lib/arjdbc/h2/adapter.rb +273 -6
- data/lib/arjdbc/h2/connection_methods.rb +23 -8
- data/lib/arjdbc/hsqldb.rb +2 -3
- data/lib/arjdbc/hsqldb/adapter.rb +204 -77
- data/lib/arjdbc/hsqldb/connection_methods.rb +24 -10
- data/lib/arjdbc/hsqldb/explain_support.rb +35 -0
- data/lib/arjdbc/hsqldb/schema_creation.rb +11 -0
- data/lib/arjdbc/informix.rb +4 -2
- data/lib/arjdbc/informix/adapter.rb +78 -54
- data/lib/arjdbc/informix/connection_methods.rb +8 -9
- data/lib/arjdbc/jdbc.rb +59 -2
- data/lib/arjdbc/jdbc/adapter.rb +356 -166
- data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
- data/lib/arjdbc/jdbc/adapter_require.rb +46 -0
- data/lib/arjdbc/jdbc/base_ext.rb +15 -0
- data/lib/arjdbc/jdbc/callbacks.rb +27 -18
- data/lib/arjdbc/jdbc/column.rb +79 -20
- data/lib/arjdbc/jdbc/connection.rb +5 -119
- data/lib/arjdbc/jdbc/connection_methods.rb +32 -4
- data/lib/arjdbc/jdbc/error.rb +65 -0
- data/lib/arjdbc/jdbc/extension.rb +41 -29
- data/lib/arjdbc/jdbc/java.rb +5 -6
- data/lib/arjdbc/jdbc/jdbc.rake +3 -126
- data/lib/arjdbc/jdbc/railtie.rb +2 -9
- data/lib/arjdbc/jdbc/rake_tasks.rb +3 -10
- data/lib/arjdbc/jdbc/serialized_attributes_helper.rb +3 -0
- data/lib/arjdbc/jdbc/type_cast.rb +166 -0
- data/lib/arjdbc/jdbc/type_converter.rb +35 -19
- data/lib/arjdbc/mssql.rb +6 -3
- data/lib/arjdbc/mssql/adapter.rb +630 -298
- data/lib/arjdbc/mssql/column.rb +200 -0
- data/lib/arjdbc/mssql/connection_methods.rb +66 -17
- data/lib/arjdbc/mssql/explain_support.rb +99 -0
- data/lib/arjdbc/mssql/limit_helpers.rb +189 -50
- data/lib/arjdbc/mssql/lock_methods.rb +77 -0
- data/lib/arjdbc/mssql/types.rb +343 -0
- data/lib/arjdbc/mssql/utils.rb +82 -0
- data/lib/arjdbc/mysql.rb +2 -3
- data/lib/arjdbc/mysql/adapter.rb +86 -356
- data/lib/arjdbc/mysql/connection_methods.rb +159 -23
- data/lib/arjdbc/oracle/adapter.rb +714 -263
- data/lib/arjdbc/postgresql.rb +2 -3
- data/lib/arjdbc/postgresql/_bc_time_cast_patch.rb +24 -0
- data/lib/arjdbc/postgresql/adapter.rb +570 -400
- data/lib/arjdbc/postgresql/base/array_decoder.rb +26 -0
- data/lib/arjdbc/postgresql/base/array_encoder.rb +25 -0
- data/lib/arjdbc/postgresql/base/array_parser.rb +95 -0
- data/lib/arjdbc/postgresql/base/pgconn.rb +11 -0
- data/lib/arjdbc/postgresql/column.rb +51 -0
- data/lib/arjdbc/postgresql/connection_methods.rb +57 -18
- data/lib/arjdbc/postgresql/name.rb +24 -0
- data/lib/arjdbc/postgresql/oid_types.rb +192 -0
- data/lib/arjdbc/railtie.rb +11 -0
- data/lib/arjdbc/sqlite3.rb +2 -3
- data/lib/arjdbc/sqlite3/adapter.rb +518 -198
- data/lib/arjdbc/sqlite3/connection_methods.rb +49 -24
- data/lib/arjdbc/sybase.rb +2 -2
- data/lib/arjdbc/sybase/adapter.rb +7 -6
- data/lib/arjdbc/tasks.rb +13 -0
- data/lib/arjdbc/tasks/database_tasks.rb +52 -0
- data/lib/arjdbc/tasks/databases.rake +91 -0
- data/lib/arjdbc/tasks/databases3.rake +215 -0
- data/lib/arjdbc/tasks/databases4.rake +39 -0
- data/lib/arjdbc/tasks/db2_database_tasks.rb +104 -0
- data/lib/arjdbc/tasks/derby_database_tasks.rb +95 -0
- data/lib/arjdbc/tasks/h2_database_tasks.rb +31 -0
- data/lib/arjdbc/tasks/hsqldb_database_tasks.rb +70 -0
- data/lib/arjdbc/tasks/jdbc_database_tasks.rb +169 -0
- data/lib/arjdbc/tasks/mssql_database_tasks.rb +46 -0
- data/lib/arjdbc/util/quoted_cache.rb +60 -0
- data/lib/arjdbc/util/serialized_attributes.rb +98 -0
- data/lib/arjdbc/util/table_copier.rb +110 -0
- data/lib/arjdbc/version.rb +1 -6
- data/lib/generators/jdbc/USAGE +9 -0
- data/lib/generators/jdbc/jdbc_generator.rb +8 -0
- data/lib/jdbc_adapter.rb +1 -1
- data/lib/jdbc_adapter/rake_tasks.rb +3 -2
- data/lib/jdbc_adapter/version.rb +2 -1
- data/pom.xml +114 -0
- data/rails_generators/jdbc_generator.rb +1 -1
- data/rails_generators/templates/config/initializers/jdbc.rb +8 -5
- data/rails_generators/templates/lib/tasks/jdbc.rake +7 -4
- data/rakelib/01-tomcat.rake +51 -0
- data/rakelib/02-test.rake +132 -0
- data/rakelib/bundler_ext.rb +11 -0
- data/rakelib/compile.rake +67 -22
- data/rakelib/db.rake +61 -0
- data/rakelib/rails.rake +204 -29
- data/src/java/arjdbc/ArJdbcModule.java +286 -0
- data/src/java/arjdbc/db2/DB2Module.java +76 -0
- data/src/java/arjdbc/db2/DB2RubyJdbcConnection.java +126 -0
- data/src/java/arjdbc/derby/DerbyModule.java +99 -243
- data/src/java/arjdbc/derby/DerbyRubyJdbcConnection.java +152 -0
- data/src/java/arjdbc/firebird/FirebirdRubyJdbcConnection.java +174 -0
- data/src/java/arjdbc/{jdbc/JdbcConnectionFactory.java → h2/H2Module.java} +20 -6
- data/src/java/arjdbc/h2/H2RubyJdbcConnection.java +27 -12
- data/src/java/arjdbc/hsqldb/HSQLDBModule.java +73 -0
- data/src/java/arjdbc/informix/InformixRubyJdbcConnection.java +7 -6
- data/src/java/arjdbc/jdbc/AdapterJavaService.java +7 -29
- data/src/java/arjdbc/jdbc/Callable.java +44 -0
- data/src/java/arjdbc/jdbc/ConnectionFactory.java +132 -0
- data/src/java/arjdbc/jdbc/DataSourceConnectionFactory.java +157 -0
- data/src/java/arjdbc/jdbc/DriverConnectionFactory.java +63 -0
- data/src/java/arjdbc/jdbc/DriverWrapper.java +119 -0
- data/src/java/arjdbc/jdbc/JdbcResult.java +130 -0
- data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +3622 -948
- data/src/java/arjdbc/mssql/MSSQLModule.java +90 -0
- data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +181 -0
- data/src/java/arjdbc/mysql/MySQLModule.java +99 -81
- data/src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java +294 -0
- data/src/java/arjdbc/oracle/OracleModule.java +80 -0
- data/src/java/arjdbc/oracle/OracleRubyJdbcConnection.java +387 -17
- data/src/java/arjdbc/postgresql/ByteaUtils.java +157 -0
- data/src/java/arjdbc/postgresql/PgResultSetMetaDataWrapper.java +23 -0
- data/src/java/arjdbc/postgresql/PostgreSQLModule.java +77 -0
- data/src/java/arjdbc/postgresql/PostgreSQLResult.java +184 -0
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +952 -0
- data/src/java/arjdbc/sqlite3/SQLite3Module.java +73 -0
- data/src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java +525 -0
- data/src/java/arjdbc/util/CallResultSet.java +826 -0
- data/src/java/arjdbc/util/DateTimeUtils.java +580 -0
- data/src/java/arjdbc/util/ObjectSupport.java +65 -0
- data/src/java/arjdbc/util/QuotingUtils.java +138 -0
- data/src/java/arjdbc/util/StringCache.java +63 -0
- data/src/java/arjdbc/util/StringHelper.java +159 -0
- metadata +245 -268
- data/History.txt +0 -369
- data/Manifest.txt +0 -180
- data/README.txt +0 -181
- data/lib/active_record/connection_adapters/oracle_adapter.rb +0 -1
- 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/arel/visitors/mssql.rb +0 -44
- data/lib/arjdbc/jdbc/compatibility.rb +0 -51
- data/lib/arjdbc/jdbc/core_ext.rb +0 -24
- data/lib/arjdbc/jdbc/discover.rb +0 -18
- data/lib/arjdbc/jdbc/driver.rb +0 -44
- data/lib/arjdbc/jdbc/missing_functionality_helper.rb +0 -87
- data/lib/arjdbc/jdbc/quoted_primary_key.rb +0 -28
- data/lib/arjdbc/jdbc/require_driver.rb +0 -16
- data/lib/arjdbc/mimer.rb +0 -2
- data/lib/arjdbc/mimer/adapter.rb +0 -142
- data/lib/arjdbc/mssql/tsql_helper.rb +0 -61
- data/lib/arjdbc/oracle.rb +0 -3
- data/lib/arjdbc/oracle/connection_methods.rb +0 -11
- data/lib/pg.rb +0 -4
- data/rakelib/package.rake +0 -92
- data/rakelib/test.rake +0 -81
- data/src/java/arjdbc/jdbc/SQLBlock.java +0 -48
- data/src/java/arjdbc/mssql/MssqlRubyJdbcConnection.java +0 -127
- data/src/java/arjdbc/postgresql/PostgresqlRubyJdbcConnection.java +0 -57
- data/src/java/arjdbc/sqlite3/Sqlite3RubyJdbcConnection.java +0 -64
- data/test/abstract_db_create.rb +0 -117
- data/test/activerecord/connection_adapters/type_conversion_test.rb +0 -31
- data/test/activerecord/connections/native_jdbc_mysql/connection.rb +0 -25
- data/test/db/db2.rb +0 -11
- data/test/db/derby.rb +0 -12
- data/test/db/h2.rb +0 -11
- data/test/db/hsqldb.rb +0 -13
- data/test/db/informix.rb +0 -11
- data/test/db/jdbc.rb +0 -11
- data/test/db/jndi_config.rb +0 -40
- data/test/db/logger.rb +0 -3
- data/test/db/mssql.rb +0 -9
- data/test/db/mysql.rb +0 -10
- data/test/db/oracle.rb +0 -34
- data/test/db/postgres.rb +0 -9
- data/test/db/sqlite3.rb +0 -11
- data/test/db2_simple_test.rb +0 -66
- data/test/derby_migration_test.rb +0 -68
- data/test/derby_multibyte_test.rb +0 -12
- data/test/derby_simple_test.rb +0 -99
- data/test/generic_jdbc_connection_test.rb +0 -29
- data/test/h2_simple_test.rb +0 -41
- data/test/has_many_through.rb +0 -79
- data/test/helper.rb +0 -5
- data/test/hsqldb_simple_test.rb +0 -6
- data/test/informix_simple_test.rb +0 -48
- data/test/jdbc_common.rb +0 -25
- data/test/jndi_callbacks_test.rb +0 -40
- data/test/jndi_test.rb +0 -25
- data/test/manualTestDatabase.rb +0 -191
- data/test/models/add_not_null_column_to_table.rb +0 -12
- data/test/models/auto_id.rb +0 -18
- data/test/models/data_types.rb +0 -28
- data/test/models/entry.rb +0 -43
- data/test/models/mixed_case.rb +0 -25
- data/test/models/reserved_word.rb +0 -18
- data/test/models/string_id.rb +0 -18
- data/test/models/validates_uniqueness_of_string.rb +0 -19
- data/test/mssql_db_create_test.rb +0 -26
- data/test/mssql_identity_insert_test.rb +0 -19
- data/test/mssql_legacy_types_test.rb +0 -58
- data/test/mssql_limit_offset_test.rb +0 -136
- data/test/mssql_multibyte_test.rb +0 -18
- data/test/mssql_simple_test.rb +0 -55
- data/test/mysql_db_create_test.rb +0 -27
- data/test/mysql_info_test.rb +0 -113
- data/test/mysql_multibyte_test.rb +0 -10
- data/test/mysql_nonstandard_primary_key_test.rb +0 -42
- data/test/mysql_simple_test.rb +0 -49
- data/test/oracle_simple_test.rb +0 -18
- data/test/oracle_specific_test.rb +0 -83
- data/test/pick_rails_version.rb +0 -3
- data/test/postgres_db_create_test.rb +0 -32
- data/test/postgres_drop_db_test.rb +0 -16
- data/test/postgres_mixed_case_test.rb +0 -29
- data/test/postgres_nonseq_pkey_test.rb +0 -38
- data/test/postgres_reserved_test.rb +0 -22
- data/test/postgres_schema_search_path_test.rb +0 -44
- data/test/postgres_simple_test.rb +0 -51
- data/test/postgres_table_alias_length_test.rb +0 -15
- data/test/simple.rb +0 -546
- data/test/sqlite3_simple_test.rb +0 -233
- data/test/sybase_jtds_simple_test.rb +0 -28
@@ -0,0 +1,65 @@
|
|
1
|
+
|
2
|
+
package arjdbc.util;
|
3
|
+
|
4
|
+
import java.util.List;
|
5
|
+
import org.jruby.Ruby;
|
6
|
+
import org.jruby.RubyBasicObject;
|
7
|
+
import org.jruby.RubyString;
|
8
|
+
import org.jruby.runtime.ThreadContext;
|
9
|
+
import org.jruby.runtime.builtin.IRubyObject;
|
10
|
+
import org.jruby.runtime.builtin.Variable;
|
11
|
+
|
12
|
+
public abstract class ObjectSupport {
|
13
|
+
|
14
|
+
@SuppressWarnings("unchecked")
|
15
|
+
public static RubyString inspect(final RubyBasicObject self) {
|
16
|
+
return inspect(self, (List) self.getInstanceVariableList());
|
17
|
+
}
|
18
|
+
|
19
|
+
public static RubyString inspect(final RubyBasicObject self, final List<Variable> variableList) {
|
20
|
+
final Ruby runtime = self.getRuntime();
|
21
|
+
return RubyString.newString(runtime, inspect(runtime, self, variableList));
|
22
|
+
}
|
23
|
+
|
24
|
+
private static StringBuilder inspect(final Ruby runtime, final RubyBasicObject self,
|
25
|
+
final List<Variable> variableList) {
|
26
|
+
final StringBuilder part = new StringBuilder();
|
27
|
+
String cname = self.getMetaClass().getRealClass().getName();
|
28
|
+
part.append("#<").append(cname).append(":0x");
|
29
|
+
part.append(Integer.toHexString(System.identityHashCode(self)));
|
30
|
+
|
31
|
+
if (runtime.isInspecting(self)) {
|
32
|
+
/* 6:tags 16:addr 1:eos */
|
33
|
+
part.append(" ...>");
|
34
|
+
return part;
|
35
|
+
}
|
36
|
+
try {
|
37
|
+
runtime.registerInspecting(self);
|
38
|
+
final ThreadContext context = runtime.getCurrentContext();
|
39
|
+
return inspectObj(context, variableList, part);
|
40
|
+
} finally {
|
41
|
+
runtime.unregisterInspecting(self);
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
private static StringBuilder inspectObj(final ThreadContext context,
|
46
|
+
final List<Variable> variableList,
|
47
|
+
final StringBuilder part) {
|
48
|
+
String sep = "";
|
49
|
+
|
50
|
+
for ( final Variable ivar : variableList ) {
|
51
|
+
part.append(sep).append(' ').append( ivar.getName() ).append('=');
|
52
|
+
final Object ival = ivar.getValue();
|
53
|
+
if ( ival instanceof IRubyObject ) {
|
54
|
+
part.append( ((IRubyObject) ival).callMethod(context, "inspect") );
|
55
|
+
}
|
56
|
+
else { // allow the variable to come formatted (as is) already :
|
57
|
+
part.append( ival ); // ival == null ? "nil" : ival.toString()
|
58
|
+
}
|
59
|
+
sep = ",";
|
60
|
+
}
|
61
|
+
part.append('>');
|
62
|
+
return part;
|
63
|
+
}
|
64
|
+
|
65
|
+
}
|
@@ -0,0 +1,138 @@
|
|
1
|
+
/*
|
2
|
+
* The MIT License
|
3
|
+
*
|
4
|
+
* Copyright 2013 Karol Bucek.
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
package arjdbc.util;
|
25
|
+
|
26
|
+
import org.jruby.RubyString;
|
27
|
+
import org.jruby.runtime.Helpers;
|
28
|
+
import org.jruby.runtime.ThreadContext;
|
29
|
+
import org.jruby.runtime.builtin.IRubyObject;
|
30
|
+
import org.jruby.util.ByteList;
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Shared (common) quoting helpers.
|
34
|
+
*
|
35
|
+
* <br>
|
36
|
+
* NOTE: This is internal API !
|
37
|
+
* <br>
|
38
|
+
*
|
39
|
+
* @author kares
|
40
|
+
*/
|
41
|
+
public abstract class QuotingUtils {
|
42
|
+
|
43
|
+
public static final ByteList BYTES_0 = new ByteList(new byte[] { '0' }, false);
|
44
|
+
|
45
|
+
public static final ByteList BYTES_1 = new ByteList(new byte[] { '1' }, false);
|
46
|
+
|
47
|
+
// e.g. string.gsub("'", "''") -> quoteCharWith(string, '\'', '\'');
|
48
|
+
public static RubyString quoteCharWith(
|
49
|
+
final ThreadContext context,
|
50
|
+
final RubyString string,
|
51
|
+
final char value, final char quote) {
|
52
|
+
return quoteCharWith(context, string, value, quote, 0, 8);
|
53
|
+
}
|
54
|
+
|
55
|
+
@SuppressWarnings("deprecation")
|
56
|
+
public static RubyString quoteCharWith(
|
57
|
+
final ThreadContext context,
|
58
|
+
final RubyString string,
|
59
|
+
final char value, final char quote,
|
60
|
+
final int newOffset, final int newSizeDiff) {
|
61
|
+
|
62
|
+
final ByteList stringBytes = string.getByteList();
|
63
|
+
final byte[] bytes = stringBytes.unsafeBytes();
|
64
|
+
final int begin = stringBytes.getBegin();
|
65
|
+
final int realSize = stringBytes.getRealSize();
|
66
|
+
|
67
|
+
ByteList quotedBytes = null; int appendFrom = begin;
|
68
|
+
for ( int i = begin; i < begin + realSize; i++ ) {
|
69
|
+
if ( bytes[i] == value ) {
|
70
|
+
if ( quotedBytes == null ) {
|
71
|
+
quotedBytes = new ByteList(
|
72
|
+
new byte[realSize + newOffset + newSizeDiff],
|
73
|
+
stringBytes.getEncoding(), false
|
74
|
+
);
|
75
|
+
quotedBytes.begin = newOffset;
|
76
|
+
quotedBytes.realSize = 0;
|
77
|
+
}
|
78
|
+
quotedBytes.append(bytes, appendFrom, i - appendFrom);
|
79
|
+
quotedBytes.append(quote).append(value); // e.g. "'" => "''"
|
80
|
+
appendFrom = i + 1;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
if ( quotedBytes != null ) { // append what's left in the end :
|
84
|
+
quotedBytes.append(bytes, appendFrom, begin + realSize - appendFrom);
|
85
|
+
}
|
86
|
+
else return string; // nothing changed, can return original
|
87
|
+
|
88
|
+
return context.runtime.newString(quotedBytes);
|
89
|
+
}
|
90
|
+
|
91
|
+
@SuppressWarnings("deprecation")
|
92
|
+
public static RubyString quoteCharAndDecorateWith(
|
93
|
+
final ThreadContext context, final RubyString string,
|
94
|
+
final char value, final char quote,
|
95
|
+
final byte prefix, final byte suffix) {
|
96
|
+
|
97
|
+
final ByteList str = string.getByteList();
|
98
|
+
final RubyString quotedString = // part.gsub('v', 'vv')
|
99
|
+
quoteCharWith(context, string, value, quote, 1, 4 + 1);
|
100
|
+
if ( quotedString == string ) {
|
101
|
+
final int realSize = str.getRealSize();
|
102
|
+
final ByteList quoted = new ByteList(
|
103
|
+
new byte[realSize + 2], string.getEncoding(), false
|
104
|
+
);
|
105
|
+
quoted.begin = 0; quoted.realSize = 0;
|
106
|
+
quoted.append(prefix);
|
107
|
+
quoted.append(str.unsafeBytes(), str.getBegin(), realSize);
|
108
|
+
quoted.append(suffix);
|
109
|
+
return context.runtime.newString(quoted);
|
110
|
+
}
|
111
|
+
// we got a new string with a reserve of 1 byte front and back :
|
112
|
+
final ByteList quoted = quotedString.getByteList();
|
113
|
+
quoted.begin = 0; // setBegin invalidates
|
114
|
+
quoted.bytes[0] = prefix; quoted.realSize++;
|
115
|
+
quoted.append(suffix);
|
116
|
+
return quotedString;
|
117
|
+
}
|
118
|
+
|
119
|
+
public static final ByteList BYTES_SINGLE_Q = new ByteList(new byte[] { '\'' }, false);
|
120
|
+
public static final ByteList BYTES_SINGLE_Q_x2 = new ByteList(new byte[] { '\'', '\'' }, false);
|
121
|
+
|
122
|
+
// string.gsub("'", "''") :
|
123
|
+
public static IRubyObject quoteSingleQuotesWithFallback(
|
124
|
+
final ThreadContext context, final IRubyObject string) {
|
125
|
+
// string.gsub("'", "''") :
|
126
|
+
if ( string instanceof RubyString ) {
|
127
|
+
final char single = '\'';
|
128
|
+
return quoteCharWith(context, (RubyString) string, single, single);
|
129
|
+
}
|
130
|
+
else { // ActiveSupport::Multibyte::Chars
|
131
|
+
return Helpers.invoke(context, string, "gsub",
|
132
|
+
context.runtime.newString(BYTES_SINGLE_Q),
|
133
|
+
context.runtime.newString(BYTES_SINGLE_Q_x2)
|
134
|
+
);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/*
|
2
|
+
* The MIT License
|
3
|
+
*
|
4
|
+
* Copyright 2014 Karol Bucek.
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
package arjdbc.util;
|
25
|
+
|
26
|
+
import java.lang.ref.SoftReference;
|
27
|
+
import java.util.concurrent.ConcurrentHashMap;
|
28
|
+
|
29
|
+
import org.jruby.Ruby;
|
30
|
+
import org.jruby.RubyString;
|
31
|
+
import org.jruby.runtime.ThreadContext;
|
32
|
+
import org.jruby.util.ByteList;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Cache of _unicode_ strings.
|
36
|
+
*
|
37
|
+
* @author kares
|
38
|
+
*/
|
39
|
+
public final class StringCache {
|
40
|
+
|
41
|
+
final ConcurrentHashMap<String, SoftReference<ByteList>> cache = new ConcurrentHashMap<>(64);
|
42
|
+
|
43
|
+
public RubyString get(final ThreadContext context, final String key) {
|
44
|
+
final ByteList bytes;
|
45
|
+
final SoftReference<ByteList> ref = cache.get(key);
|
46
|
+
if ( ref == null || (bytes = ref.get()) == null ) return store(context, key);
|
47
|
+
return (RubyString) RubyString.newUnicodeString(context.runtime, bytes).freeze(context);
|
48
|
+
}
|
49
|
+
|
50
|
+
private RubyString store(final ThreadContext context, final String key) {
|
51
|
+
final Ruby runtime = context.runtime;
|
52
|
+
final RubyString str = RubyString.newUnicodeString(runtime, key);
|
53
|
+
cache.putIfAbsent(key, new SoftReference<>(str.getByteList()));
|
54
|
+
// not clearing up orphans - but since its to be used for column/table names ...
|
55
|
+
// should be fine - DB drivers tend do also cache some meta-data information
|
56
|
+
return (RubyString) str.freeze(context);
|
57
|
+
}
|
58
|
+
|
59
|
+
public void clear() {
|
60
|
+
cache.clear();
|
61
|
+
}
|
62
|
+
|
63
|
+
}
|
@@ -0,0 +1,159 @@
|
|
1
|
+
/*
|
2
|
+
* The MIT License
|
3
|
+
*
|
4
|
+
* Copyright 2014 Karol Bucek.
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
package arjdbc.util;
|
25
|
+
|
26
|
+
import java.io.IOException;
|
27
|
+
import java.io.InputStream;
|
28
|
+
import java.nio.charset.Charset;
|
29
|
+
|
30
|
+
import org.jcodings.Encoding;
|
31
|
+
import org.jcodings.specific.UTF8Encoding;
|
32
|
+
import org.jruby.Ruby;
|
33
|
+
import org.jruby.RubyEncoding;
|
34
|
+
import org.jruby.RubyString;
|
35
|
+
import org.jruby.util.ByteList;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Some (Ruby) byte string helpers.
|
39
|
+
*
|
40
|
+
* @author kares
|
41
|
+
*/
|
42
|
+
public abstract class StringHelper {
|
43
|
+
|
44
|
+
public static byte decByte(final int digit) {
|
45
|
+
switch (digit) {
|
46
|
+
case 0 : return '0';
|
47
|
+
case 1 : return '1';
|
48
|
+
case 2 : return '2';
|
49
|
+
case 3 : return '3';
|
50
|
+
case 4 : return '4';
|
51
|
+
case 5 : return '5';
|
52
|
+
case 6 : return '6';
|
53
|
+
case 7 : return '7';
|
54
|
+
case 8 : return '8';
|
55
|
+
case 9 : return '9';
|
56
|
+
}
|
57
|
+
throw new IllegalStateException("unexpected digit: " + digit);
|
58
|
+
}
|
59
|
+
|
60
|
+
public static RubyString newString(final Ruby runtime, final byte[] bytes) {
|
61
|
+
return RubyString.newString(runtime, new ByteList(bytes, false));
|
62
|
+
}
|
63
|
+
|
64
|
+
private static final Charset ASCII_CHARSET = Charset.forName("ISO-8859-1");
|
65
|
+
|
66
|
+
public static RubyString newASCIIString(final Ruby runtime, final String str) {
|
67
|
+
final ByteList byteList = new ByteList(str.getBytes(ASCII_CHARSET), false);
|
68
|
+
return RubyString.newString(runtime, byteList);
|
69
|
+
}
|
70
|
+
|
71
|
+
public static RubyString newUTF8String(final Ruby runtime, final byte[] bytes) {
|
72
|
+
final ByteList byteList = new ByteList(bytes, false);
|
73
|
+
return RubyString.newString(runtime, byteList, UTF8Encoding.INSTANCE);
|
74
|
+
}
|
75
|
+
|
76
|
+
public static RubyString newDefaultInternalString(final Ruby runtime, final byte[] bytes) {
|
77
|
+
final ByteList byteList = new ByteList(bytes, false);
|
78
|
+
Encoding enc = runtime.getDefaultInternalEncoding();
|
79
|
+
if (enc == null) enc = runtime.getEncodingService().getJavaDefault();
|
80
|
+
return RubyString.newString(runtime, byteList, enc);
|
81
|
+
}
|
82
|
+
|
83
|
+
public static RubyString newDefaultInternalString(final Ruby runtime, final CharSequence str) {
|
84
|
+
Encoding enc = runtime.getDefaultInternalEncoding();
|
85
|
+
if (enc == null) enc = runtime.getEncodingService().getJavaDefault();
|
86
|
+
return RubyString.newString(runtime, new ByteList(RubyEncoding.encode(str, enc.getCharset()), enc));
|
87
|
+
}
|
88
|
+
|
89
|
+
public static RubyString newDefaultInternalString(final Ruby runtime, final String str) {
|
90
|
+
return RubyString.newInternalFromJavaExternal(runtime, str);
|
91
|
+
}
|
92
|
+
|
93
|
+
public static int readBytes(final ByteList output, final InputStream input)
|
94
|
+
throws IOException {
|
95
|
+
@SuppressWarnings("deprecation") // capacity :
|
96
|
+
final int buffSize = output.bytes.length - output.begin;
|
97
|
+
return readBytes(output, input, buffSize);
|
98
|
+
}
|
99
|
+
|
100
|
+
public static int readBytes(final ByteList output, final InputStream input, int buffSize)
|
101
|
+
throws IOException {
|
102
|
+
int read = 0;
|
103
|
+
while ( true ) {
|
104
|
+
output.ensure( output.getRealSize() + buffSize );
|
105
|
+
final int begin = output.getBegin();
|
106
|
+
final int size = output.getRealSize();
|
107
|
+
int n = input.read(output.unsafeBytes(), begin + size, buffSize);
|
108
|
+
if ( n == -1 ) break;
|
109
|
+
output.setRealSize( size + n ); read += n;
|
110
|
+
}
|
111
|
+
return read;
|
112
|
+
}
|
113
|
+
|
114
|
+
public static boolean startsWithIgnoreCase(final ByteList bytes, final byte[] start) {
|
115
|
+
int p = nonWhitespaceIndex(bytes, bytes.getBegin());
|
116
|
+
final byte[] stringBytes = bytes.unsafeBytes();
|
117
|
+
if ( stringBytes[p] == '(' ) {
|
118
|
+
p = nonWhitespaceIndex(bytes, p + 1);
|
119
|
+
}
|
120
|
+
|
121
|
+
for ( int i = 0; i < bytes.getRealSize() && i < start.length; i++ ) {
|
122
|
+
if ( Character.toLowerCase(stringBytes[p + i]) != start[i] ) return false;
|
123
|
+
}
|
124
|
+
return true;
|
125
|
+
}
|
126
|
+
|
127
|
+
public static int nonWhitespaceIndex(final ByteList string, final int off) {
|
128
|
+
final int end = string.getBegin() + string.getRealSize();
|
129
|
+
final byte[] stringBytes = string.unsafeBytes();
|
130
|
+
for ( int i = off; i < end; i++ ) {
|
131
|
+
if ( ! Character.isWhitespace( stringBytes[i] ) ) return i;
|
132
|
+
}
|
133
|
+
return end;
|
134
|
+
}
|
135
|
+
|
136
|
+
@SuppressWarnings("deprecation")
|
137
|
+
private static int nonSpaceIndex(final byte[] str, int beg, int len) {
|
138
|
+
for ( int i = beg; i < len; i++ ) {
|
139
|
+
if ( ! Character.isSpace( (char) str[i] ) ) return i;
|
140
|
+
}
|
141
|
+
return len;
|
142
|
+
}
|
143
|
+
|
144
|
+
private static int nonDigitIndex(final byte[] str, int beg, int len) {
|
145
|
+
for ( int i = beg; i < len; i++ ) {
|
146
|
+
if ( ! Character.isDigit( (char) str[i] ) ) return i;
|
147
|
+
}
|
148
|
+
return len;
|
149
|
+
}
|
150
|
+
|
151
|
+
private static int extractIntValue(final byte[] str, int beg, int end) {
|
152
|
+
int n = 0;
|
153
|
+
for ( int i = beg; i < end; i++ ) {
|
154
|
+
n = 10 * n + ( str[i] - '0' );
|
155
|
+
}
|
156
|
+
return n;
|
157
|
+
}
|
158
|
+
|
159
|
+
}
|
metadata
CHANGED
@@ -1,277 +1,254 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbc-adapter
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
version: 1.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '50.1'
|
10
5
|
platform: java
|
11
|
-
authors:
|
12
|
-
|
13
|
-
autorequire:
|
6
|
+
authors:
|
7
|
+
- Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors
|
8
|
+
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 6
|
46
|
-
- 2
|
47
|
-
version: 2.6.2
|
48
|
-
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
description: |-
|
51
|
-
activerecord-jdbc-adapter is a database adapter for Rails' ActiveRecord
|
52
|
-
component that can be used with JRuby[http://www.jruby.org/]. It allows use of
|
53
|
-
virtually any JDBC-compliant database with your JRuby on Rails application.
|
54
|
-
email: nick@nicksieger.com, ola.bini@gmail.com
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.0.0
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - "~>"
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 5.0.0
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
|
+
description: 'AR-JDBC is a database adapter for Rails'' ActiveRecord component designed
|
28
|
+
to be used with JRuby built upon Java''s JDBC API for database access. Provides
|
29
|
+
(ActiveRecord) built-in adapters: MySQL, PostgreSQL and SQLite3 as well as adapters
|
30
|
+
for popular databases such as Oracle, SQLServer, DB2, FireBird and even Java (embed)
|
31
|
+
databases: Derby, HSQLDB and H2. It allows to connect to virtually any JDBC-compliant
|
32
|
+
database with your JRuby on Rails application.'
|
33
|
+
email:
|
34
|
+
- nick@nicksieger.com
|
35
|
+
- ola.bini@gmail.com
|
36
|
+
- self@kares.org
|
55
37
|
executables: []
|
56
|
-
|
57
38
|
extensions: []
|
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
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
requirements:
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
- 0
|
268
|
-
version: "0"
|
39
|
+
extra_rdoc_files: []
|
40
|
+
files:
|
41
|
+
- ".gitignore"
|
42
|
+
- ".travis.yml"
|
43
|
+
- ".yardopts"
|
44
|
+
- CONTRIBUTING.md
|
45
|
+
- Gemfile
|
46
|
+
- History.md
|
47
|
+
- LICENSE.txt
|
48
|
+
- README.md
|
49
|
+
- RUNNING_TESTS.md
|
50
|
+
- Rakefile
|
51
|
+
- Rakefile.jdbc
|
52
|
+
- activerecord-jdbc-adapter.gemspec
|
53
|
+
- lib/active_record/connection_adapters/as400_adapter.rb
|
54
|
+
- lib/active_record/connection_adapters/db2_adapter.rb
|
55
|
+
- lib/active_record/connection_adapters/derby_adapter.rb
|
56
|
+
- lib/active_record/connection_adapters/firebird_adapter.rb
|
57
|
+
- lib/active_record/connection_adapters/h2_adapter.rb
|
58
|
+
- lib/active_record/connection_adapters/hsqldb_adapter.rb
|
59
|
+
- lib/active_record/connection_adapters/informix_adapter.rb
|
60
|
+
- lib/active_record/connection_adapters/jdbc_adapter.rb
|
61
|
+
- lib/active_record/connection_adapters/jndi_adapter.rb
|
62
|
+
- lib/active_record/connection_adapters/mariadb_adapter.rb
|
63
|
+
- lib/active_record/connection_adapters/mssql_adapter.rb
|
64
|
+
- lib/active_record/connection_adapters/mysql2_adapter.rb
|
65
|
+
- lib/active_record/connection_adapters/mysql_adapter.rb
|
66
|
+
- lib/active_record/connection_adapters/postgresql_adapter.rb
|
67
|
+
- lib/active_record/connection_adapters/sqlite3_adapter.rb
|
68
|
+
- lib/active_record/connection_adapters/sqlserver_adapter.rb
|
69
|
+
- lib/activerecord-jdbc-adapter.rb
|
70
|
+
- lib/arel/visitors/compat.rb
|
71
|
+
- lib/arel/visitors/db2.rb
|
72
|
+
- lib/arel/visitors/derby.rb
|
73
|
+
- lib/arel/visitors/firebird.rb
|
74
|
+
- lib/arel/visitors/h2.rb
|
75
|
+
- lib/arel/visitors/hsqldb.rb
|
76
|
+
- lib/arel/visitors/postgresql_jdbc.rb
|
77
|
+
- lib/arel/visitors/sql_server.rb
|
78
|
+
- lib/arel/visitors/sql_server/ng42.rb
|
79
|
+
- lib/arjdbc.rb
|
80
|
+
- lib/arjdbc/abstract/connection_management.rb
|
81
|
+
- lib/arjdbc/abstract/core.rb
|
82
|
+
- lib/arjdbc/abstract/database_statements.rb
|
83
|
+
- lib/arjdbc/abstract/statement_cache.rb
|
84
|
+
- lib/arjdbc/abstract/transaction_support.rb
|
85
|
+
- lib/arjdbc/db2.rb
|
86
|
+
- lib/arjdbc/db2/adapter.rb
|
87
|
+
- lib/arjdbc/db2/as400.rb
|
88
|
+
- lib/arjdbc/db2/column.rb
|
89
|
+
- lib/arjdbc/db2/connection_methods.rb
|
90
|
+
- lib/arjdbc/derby.rb
|
91
|
+
- lib/arjdbc/derby/active_record_patch.rb
|
92
|
+
- lib/arjdbc/derby/adapter.rb
|
93
|
+
- lib/arjdbc/derby/connection_methods.rb
|
94
|
+
- lib/arjdbc/derby/schema_creation.rb
|
95
|
+
- lib/arjdbc/discover.rb
|
96
|
+
- lib/arjdbc/firebird.rb
|
97
|
+
- lib/arjdbc/firebird/adapter.rb
|
98
|
+
- lib/arjdbc/firebird/connection_methods.rb
|
99
|
+
- lib/arjdbc/h2.rb
|
100
|
+
- lib/arjdbc/h2/adapter.rb
|
101
|
+
- lib/arjdbc/h2/connection_methods.rb
|
102
|
+
- lib/arjdbc/hsqldb.rb
|
103
|
+
- lib/arjdbc/hsqldb/adapter.rb
|
104
|
+
- lib/arjdbc/hsqldb/connection_methods.rb
|
105
|
+
- lib/arjdbc/hsqldb/explain_support.rb
|
106
|
+
- lib/arjdbc/hsqldb/schema_creation.rb
|
107
|
+
- lib/arjdbc/informix.rb
|
108
|
+
- lib/arjdbc/informix/adapter.rb
|
109
|
+
- lib/arjdbc/informix/connection_methods.rb
|
110
|
+
- lib/arjdbc/jdbc.rb
|
111
|
+
- lib/arjdbc/jdbc/adapter.rb
|
112
|
+
- lib/arjdbc/jdbc/adapter_java.jar
|
113
|
+
- lib/arjdbc/jdbc/adapter_require.rb
|
114
|
+
- lib/arjdbc/jdbc/base_ext.rb
|
115
|
+
- lib/arjdbc/jdbc/callbacks.rb
|
116
|
+
- lib/arjdbc/jdbc/column.rb
|
117
|
+
- lib/arjdbc/jdbc/connection.rb
|
118
|
+
- lib/arjdbc/jdbc/connection_methods.rb
|
119
|
+
- lib/arjdbc/jdbc/error.rb
|
120
|
+
- lib/arjdbc/jdbc/extension.rb
|
121
|
+
- lib/arjdbc/jdbc/java.rb
|
122
|
+
- lib/arjdbc/jdbc/jdbc.rake
|
123
|
+
- lib/arjdbc/jdbc/railtie.rb
|
124
|
+
- lib/arjdbc/jdbc/rake_tasks.rb
|
125
|
+
- lib/arjdbc/jdbc/serialized_attributes_helper.rb
|
126
|
+
- lib/arjdbc/jdbc/type_cast.rb
|
127
|
+
- lib/arjdbc/jdbc/type_converter.rb
|
128
|
+
- lib/arjdbc/mssql.rb
|
129
|
+
- lib/arjdbc/mssql/adapter.rb
|
130
|
+
- lib/arjdbc/mssql/column.rb
|
131
|
+
- lib/arjdbc/mssql/connection_methods.rb
|
132
|
+
- lib/arjdbc/mssql/explain_support.rb
|
133
|
+
- lib/arjdbc/mssql/limit_helpers.rb
|
134
|
+
- lib/arjdbc/mssql/lock_methods.rb
|
135
|
+
- lib/arjdbc/mssql/types.rb
|
136
|
+
- lib/arjdbc/mssql/utils.rb
|
137
|
+
- lib/arjdbc/mysql.rb
|
138
|
+
- lib/arjdbc/mysql/adapter.rb
|
139
|
+
- lib/arjdbc/mysql/connection_methods.rb
|
140
|
+
- lib/arjdbc/oracle/adapter.rb
|
141
|
+
- lib/arjdbc/postgresql.rb
|
142
|
+
- lib/arjdbc/postgresql/_bc_time_cast_patch.rb
|
143
|
+
- lib/arjdbc/postgresql/adapter.rb
|
144
|
+
- lib/arjdbc/postgresql/base/array_decoder.rb
|
145
|
+
- lib/arjdbc/postgresql/base/array_encoder.rb
|
146
|
+
- lib/arjdbc/postgresql/base/array_parser.rb
|
147
|
+
- lib/arjdbc/postgresql/base/pgconn.rb
|
148
|
+
- lib/arjdbc/postgresql/column.rb
|
149
|
+
- lib/arjdbc/postgresql/connection_methods.rb
|
150
|
+
- lib/arjdbc/postgresql/name.rb
|
151
|
+
- lib/arjdbc/postgresql/oid_types.rb
|
152
|
+
- lib/arjdbc/railtie.rb
|
153
|
+
- lib/arjdbc/sqlite3.rb
|
154
|
+
- lib/arjdbc/sqlite3/adapter.rb
|
155
|
+
- lib/arjdbc/sqlite3/connection_methods.rb
|
156
|
+
- lib/arjdbc/sybase.rb
|
157
|
+
- lib/arjdbc/sybase/adapter.rb
|
158
|
+
- lib/arjdbc/tasks.rb
|
159
|
+
- lib/arjdbc/tasks/database_tasks.rb
|
160
|
+
- lib/arjdbc/tasks/databases.rake
|
161
|
+
- lib/arjdbc/tasks/databases3.rake
|
162
|
+
- lib/arjdbc/tasks/databases4.rake
|
163
|
+
- lib/arjdbc/tasks/db2_database_tasks.rb
|
164
|
+
- lib/arjdbc/tasks/derby_database_tasks.rb
|
165
|
+
- lib/arjdbc/tasks/h2_database_tasks.rb
|
166
|
+
- lib/arjdbc/tasks/hsqldb_database_tasks.rb
|
167
|
+
- lib/arjdbc/tasks/jdbc_database_tasks.rb
|
168
|
+
- lib/arjdbc/tasks/mssql_database_tasks.rb
|
169
|
+
- lib/arjdbc/util/quoted_cache.rb
|
170
|
+
- lib/arjdbc/util/serialized_attributes.rb
|
171
|
+
- lib/arjdbc/util/table_copier.rb
|
172
|
+
- lib/arjdbc/version.rb
|
173
|
+
- lib/generators/jdbc/USAGE
|
174
|
+
- lib/generators/jdbc/jdbc_generator.rb
|
175
|
+
- lib/jdbc_adapter.rb
|
176
|
+
- lib/jdbc_adapter/rake_tasks.rb
|
177
|
+
- lib/jdbc_adapter/version.rb
|
178
|
+
- pom.xml
|
179
|
+
- rails_generators/jdbc_generator.rb
|
180
|
+
- rails_generators/templates/config/initializers/jdbc.rb
|
181
|
+
- rails_generators/templates/lib/tasks/jdbc.rake
|
182
|
+
- rakelib/01-tomcat.rake
|
183
|
+
- rakelib/02-test.rake
|
184
|
+
- rakelib/bundler_ext.rb
|
185
|
+
- rakelib/compile.rake
|
186
|
+
- rakelib/db.rake
|
187
|
+
- rakelib/rails.rake
|
188
|
+
- src/java/arjdbc/ArJdbcModule.java
|
189
|
+
- src/java/arjdbc/db2/DB2Module.java
|
190
|
+
- src/java/arjdbc/db2/DB2RubyJdbcConnection.java
|
191
|
+
- src/java/arjdbc/derby/DerbyModule.java
|
192
|
+
- src/java/arjdbc/derby/DerbyRubyJdbcConnection.java
|
193
|
+
- src/java/arjdbc/firebird/FirebirdRubyJdbcConnection.java
|
194
|
+
- src/java/arjdbc/h2/H2Module.java
|
195
|
+
- src/java/arjdbc/h2/H2RubyJdbcConnection.java
|
196
|
+
- src/java/arjdbc/hsqldb/HSQLDBModule.java
|
197
|
+
- src/java/arjdbc/informix/InformixRubyJdbcConnection.java
|
198
|
+
- src/java/arjdbc/jdbc/AdapterJavaService.java
|
199
|
+
- src/java/arjdbc/jdbc/Callable.java
|
200
|
+
- src/java/arjdbc/jdbc/ConnectionFactory.java
|
201
|
+
- src/java/arjdbc/jdbc/DataSourceConnectionFactory.java
|
202
|
+
- src/java/arjdbc/jdbc/DriverConnectionFactory.java
|
203
|
+
- src/java/arjdbc/jdbc/DriverWrapper.java
|
204
|
+
- src/java/arjdbc/jdbc/JdbcResult.java
|
205
|
+
- src/java/arjdbc/jdbc/RubyJdbcConnection.java
|
206
|
+
- src/java/arjdbc/mssql/MSSQLModule.java
|
207
|
+
- src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java
|
208
|
+
- src/java/arjdbc/mysql/MySQLModule.java
|
209
|
+
- src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java
|
210
|
+
- src/java/arjdbc/oracle/OracleModule.java
|
211
|
+
- src/java/arjdbc/oracle/OracleRubyJdbcConnection.java
|
212
|
+
- src/java/arjdbc/postgresql/ByteaUtils.java
|
213
|
+
- src/java/arjdbc/postgresql/PgResultSetMetaDataWrapper.java
|
214
|
+
- src/java/arjdbc/postgresql/PostgreSQLModule.java
|
215
|
+
- src/java/arjdbc/postgresql/PostgreSQLResult.java
|
216
|
+
- src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java
|
217
|
+
- src/java/arjdbc/sqlite3/SQLite3Module.java
|
218
|
+
- src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java
|
219
|
+
- src/java/arjdbc/util/CallResultSet.java
|
220
|
+
- src/java/arjdbc/util/DateTimeUtils.java
|
221
|
+
- src/java/arjdbc/util/ObjectSupport.java
|
222
|
+
- src/java/arjdbc/util/QuotingUtils.java
|
223
|
+
- src/java/arjdbc/util/StringCache.java
|
224
|
+
- src/java/arjdbc/util/StringHelper.java
|
225
|
+
homepage: https://github.com/jruby/activerecord-jdbc-adapter
|
226
|
+
licenses:
|
227
|
+
- BSD-2-Clause
|
228
|
+
metadata: {}
|
229
|
+
post_install_message:
|
230
|
+
rdoc_options:
|
231
|
+
- "--main"
|
232
|
+
- README.md
|
233
|
+
- "-SHN"
|
234
|
+
- "-f"
|
235
|
+
- darkfish
|
236
|
+
require_paths:
|
237
|
+
- lib
|
238
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
243
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - ">="
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: '0'
|
269
248
|
requirements: []
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
specification_version: 3
|
249
|
+
rubyforge_project:
|
250
|
+
rubygems_version: 2.6.14.1
|
251
|
+
signing_key:
|
252
|
+
specification_version: 4
|
275
253
|
summary: JDBC adapter for ActiveRecord, for use within JRuby on Rails.
|
276
254
|
test_files: []
|
277
|
-
|