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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f13e7b4fa08bfb67f978fad2353bd633bd0420848babe30b611949d69667e77
4
- data.tar.gz: 35ce8492f5985337a6f2ca02beac9eb38a0a3b9fc5957d816c39bf2da0790687
3
+ metadata.gz: baaa50d113a2274f8903a79fbf8e4b39a6c11aebdc2d0990096a85607b066008
4
+ data.tar.gz: d22231445a8f984983411e62f83882aeb1e0c6f2e77c8cb9c9a406b807cf0b67
5
5
  SHA512:
6
- metadata.gz: 897405b85f5f90c962ca468c600ec44ca12d3cb0f058be273d9944dc998531e03daebf6f80a0cd8ad9cf7367fa90a7b811e7fc5282fc46a503dd987ef628f1f4
7
- data.tar.gz: 6a85da335eaf8ecfd708bc6641ec58c7665bdba75784e57d4c3ee33540c5e7d42904ae87587d00ebb304cebc3e94a0d0bebf3f48e74dc7a41103ca1f22960a42
6
+ metadata.gz: edb3438cd5ddcce496b11f475ab8e57ecaef28d4d17f27a20dac22e2bad94af7fc71c3c21e90febc5c08240f53b501f04e817ef9ffa62250dbb1b877dc70ec6a
7
+ data.tar.gz: 2f742a3523f864599b2e4f9813d55558d74430990227bff4bbdeec1695a42687fa2624fae8a75af60b2e5ce43f19911b867fc85523c502b95a2a355eb1ee8c7a
@@ -156,7 +156,7 @@ jobs:
156
156
  ruby-version: [ 'jruby-9.4.8.0' ]
157
157
  db: [ 'mssql' ]
158
158
  test_targets: [ "rails:test_mssql" ]
159
- ar_version: ["7-1-stable-dev"]
159
+ ar_version: ["7-2-stable-dev"]
160
160
 
161
161
  services:
162
162
  mssql:
@@ -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
@@ -60,6 +60,15 @@ module ActiveRecord
60
60
  end
61
61
  end
62
62
 
63
+ def type_cast(value) # :nodoc:
64
+ case value
65
+ when BigDecimal
66
+ value
67
+ else
68
+ super
69
+ end
70
+ end
71
+
63
72
  QUOTED_TRUE = '1'
64
73
  QUOTED_FALSE = '0'
65
74
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArJdbc
4
- VERSION = "72.0.0.rc3"
4
+ VERSION = "72.1.0"
5
5
  end
@@ -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.setNull(index, type);
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.0.0.rc3
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-17 00:00:00.000000000 Z
10
+ date: 2025-12-15 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord