activerecord-jdbc-alt-adapter 51.3.1-java → 51.3.2-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: 14951fdf9a0e78502d04e2121a0d9375a7df2f2c2799f68900f90bd35faf7e11
4
- data.tar.gz: de5abde7fda2e40f717246a69978ea0bf9b485368e9da5415211e84a136803b4
3
+ metadata.gz: f6c42966e47ce277f02009b46245502666af2a44e8e49c9e153f1fa41fceb6fc
4
+ data.tar.gz: 1ecdd492d26a05f456801f7cfb2f9b8804b5170e9636b3cda06396d4312ee88a
5
5
  SHA512:
6
- metadata.gz: f0bc89c6ebbad713b42e3ed992594f691a72faeabfc9cc5873881f145f081782c134d1615c8c2bd351306209a0ef872908180b0c1c0976957e428b1ff67eed59
7
- data.tar.gz: 2cd4047462b8bcb01e16ba0b319c95ec6a6e12c746268564c868ed43a245da5a462e8f316ac5778021d684cb5fc40fb12b5c8f923adb05baa098d86aebd6d2d2
6
+ metadata.gz: d7c0c078d3d2a3809fb80f79aeefe5ac68419e758ed3cd27097925d03aea9756801f3d339e2896caa19ea9af2f67ce10427456377714b59ced3d8078c87df629
7
+ data.tar.gz: 5f074ac80032b34bf31999fd57bad1c8b5618cb7094e2aaa5ac14fbc05e3d7571592c14924ef8f40118a6c3ef7dd24ccbfaed1abaf8ef73f2fc9e891855b74f4
Binary file
@@ -1,3 +1,3 @@
1
1
  module ArJdbc
2
- VERSION = '51.3.1'
2
+ VERSION = '51.3.2'
3
3
  end
@@ -2899,8 +2899,9 @@ public class RubyJdbcConnection extends RubyObject {
2899
2899
  value = value.callMethod(context, "to_date");
2900
2900
  }
2901
2901
 
2902
- // NOTE: assuming Date#to_s does right ...
2903
- statement.setDate(index, Date.valueOf(value.toString()));
2902
+ // NOTE: Here we rely in ActiveRecord (ActiveSupport) to get
2903
+ // the date as a string in the database format.
2904
+ statement.setDate(index, Date.valueOf(value.callMethod(context, "to_s", context.runtime.newSymbol("db")).toString()));
2904
2905
  }
2905
2906
 
2906
2907
  protected void setBooleanParameter(final ThreadContext context,
@@ -36,7 +36,6 @@ import java.sql.ResultSet;
36
36
  import java.sql.Savepoint;
37
37
  import java.sql.SQLException;
38
38
  import java.sql.Types;
39
- import java.sql.Date;
40
39
  import java.sql.Timestamp;
41
40
  import java.util.Locale;
42
41
 
@@ -306,21 +305,6 @@ public class MSSQLRubyJdbcConnection extends RubyJdbcConnection {
306
305
  statement.setObject(index, timeStr, Types.NVARCHAR);
307
306
  }
308
307
 
309
- @Override
310
- protected void setDateParameter(final ThreadContext context,
311
- final Connection connection, final PreparedStatement statement,
312
- final int index, IRubyObject value,
313
- final IRubyObject attribute, final int type) throws SQLException {
314
-
315
- if ( ! "Date".equals(value.getMetaClass().getName()) && value.respondsTo("to_date") ) {
316
- value = value.callMethod(context, "to_date");
317
- }
318
-
319
- // NOTE: Here we relay in ActiveRecord (ActiveSupport) to get
320
- // the date as a string in the database format.
321
- statement.setDate(index, Date.valueOf(value.callMethod(context, "to_s", context.runtime.newSymbol("db")).toString()));
322
- }
323
-
324
308
  // Overrides the method in parent, we only remove the savepoint
325
309
  // from the getSavepoints Map
326
310
  @JRubyMethod(name = "release_savepoint", required = 1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbc-alt-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 51.3.1
4
+ version: 51.3.2
5
5
  platform: java
6
6
  authors:
7
7
  - Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement