activerecord-jdbc-alt-adapter 72.0.0.rc3-java → 72.1.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +1 -1
- data/lib/arjdbc/abstract/database_statements.rb +2 -1
- data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
- data/lib/arjdbc/mssql/database_statements.rb +2 -1
- data/lib/arjdbc/mssql/quoting.rb +9 -0
- data/lib/arjdbc/version.rb +1 -1
- data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +8 -1
- data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +2 -0
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: baaa50d113a2274f8903a79fbf8e4b39a6c11aebdc2d0990096a85607b066008
|
|
4
|
+
data.tar.gz: d22231445a8f984983411e62f83882aeb1e0c6f2e77c8cb9c9a406b807cf0b67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: edb3438cd5ddcce496b11f475ab8e57ecaef28d4d17f27a20dac22e2bad94af7fc71c3c21e90febc5c08240f53b501f04e817ef9ffa62250dbb1b877dc70ec6a
|
|
7
|
+
data.tar.gz: 2f742a3523f864599b2e4f9813d55558d74430990227bff4bbdeec1695a42687fa2624fae8a75af60b2e5ce43f19911b867fc85523c502b95a2a355eb1ee8c7a
|
data/.github/workflows/main.yml
CHANGED
|
@@ -44,8 +44,9 @@ module ArJdbc
|
|
|
44
44
|
|
|
45
45
|
binds = convert_legacy_binds_to_attributes(binds) if binds.first.is_a?(Array)
|
|
46
46
|
|
|
47
|
-
# puts "internal----->sql: #{sql}, binds: #{binds}"
|
|
47
|
+
# puts "[1]internal----->sql: #{sql}, binds: #{binds}"
|
|
48
48
|
type_casted_binds = type_casted_binds(binds)
|
|
49
|
+
# puts "[2]internal----->sql: #{type_casted_binds.size}, binds: #{type_casted_binds}"
|
|
49
50
|
|
|
50
51
|
with_raw_connection do |conn|
|
|
51
52
|
if without_prepared_statement?(binds)
|
|
Binary file
|
|
@@ -101,8 +101,9 @@ module ActiveRecord
|
|
|
101
101
|
|
|
102
102
|
# binds = convert_legacy_binds_to_attributes(binds) if binds.first.is_a?(Array)
|
|
103
103
|
|
|
104
|
-
# puts "internal----->sql: #{sql}, binds: #{binds}"
|
|
104
|
+
# puts "[1]internal----->sql: #{sql}, binds: #{binds}"
|
|
105
105
|
type_casted_binds = type_casted_binds(binds)
|
|
106
|
+
# puts "[2]internal----->sql: #{type_casted_binds.size}, binds: #{type_casted_binds}"
|
|
106
107
|
|
|
107
108
|
if without_prepared_statement?(binds)
|
|
108
109
|
log(sql, name) do
|
data/lib/arjdbc/mssql/quoting.rb
CHANGED
data/lib/arjdbc/version.rb
CHANGED
|
@@ -2453,7 +2453,7 @@ public class RubyJdbcConnection extends RubyObject {
|
|
|
2453
2453
|
|
|
2454
2454
|
// All the set methods were calling this first so save a method call in the nil case
|
|
2455
2455
|
if ( value == context.nil ) {
|
|
2456
|
-
statement
|
|
2456
|
+
setNullParameter(context, connection, statement, index, type);
|
|
2457
2457
|
return;
|
|
2458
2458
|
}
|
|
2459
2459
|
|
|
@@ -2517,6 +2517,13 @@ public class RubyJdbcConnection extends RubyObject {
|
|
|
2517
2517
|
}
|
|
2518
2518
|
}
|
|
2519
2519
|
|
|
2520
|
+
protected void setNullParameter(final ThreadContext context,
|
|
2521
|
+
final Connection connection, final PreparedStatement statement,
|
|
2522
|
+
final int index, final int type) throws SQLException {
|
|
2523
|
+
// statement.setObject(index, null);
|
|
2524
|
+
statement.setNull(index, type);
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2520
2527
|
protected static final Map<String, Integer> JDBC_TYPE_FOR = new HashMap<>(32, 1);
|
|
2521
2528
|
static {
|
|
2522
2529
|
JDBC_TYPE_FOR.put("string", Types.VARCHAR);
|
|
@@ -293,6 +293,8 @@ public class MSSQLRubyJdbcConnection extends RubyJdbcConnection {
|
|
|
293
293
|
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
+
|
|
297
|
+
// statement.setObject(index, value.asString().toString());
|
|
296
298
|
super.setStringParameter(context, connection, statement, index, value, attribute, type);
|
|
297
299
|
}
|
|
298
300
|
|
|
@@ -413,6 +413,14 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
|
413
413
|
statement.setDate(index, Date.valueOf(value.toString()));
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
+
@Override
|
|
417
|
+
protected void setNullParameter(final ThreadContext context,
|
|
418
|
+
final Connection connection, final PreparedStatement statement,
|
|
419
|
+
final int index, final int type) throws SQLException {
|
|
420
|
+
statement.setObject(index, null);
|
|
421
|
+
// statement.setNull(index, type);
|
|
422
|
+
}
|
|
423
|
+
|
|
416
424
|
@Override
|
|
417
425
|
protected void setObjectParameter(final ThreadContext context,
|
|
418
426
|
final Connection connection, final PreparedStatement statement,
|
|
@@ -691,6 +699,7 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
|
691
699
|
// }
|
|
692
700
|
// }
|
|
693
701
|
|
|
702
|
+
// super.setStringParameter(context, connection, statement, index, value, attribute, type);
|
|
694
703
|
statement.setObject(index, value.asString().toString(), Types.OTHER);
|
|
695
704
|
}
|
|
696
705
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-jdbc-alt-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 72.
|
|
4
|
+
version: 72.1.0
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sieger, Ola Bini, Karol Bucek, Jesse Chavez, and JRuby contributors
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-15 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activerecord
|