activerecord-jdbc-alt-adapter 50.6.1-java → 50.7.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eee53bae892f228677fb5abcf5548fd9957731deade33f82446d70af7766365
4
- data.tar.gz: cb8386a343a16d9a503eccac19261a5ce975b94613d79ab0d8dbfeee87f0b955
3
+ metadata.gz: fccd81ff713725fd656c08d96bbbd658a7443a7260fa722e6d08bc601c093a94
4
+ data.tar.gz: 9729f0e2efe3eed4b5b2b191a773fc0dc1ce0ab74c057755df8b4b77a3ad9a22
5
5
  SHA512:
6
- metadata.gz: 36e77bf1b8f5795bda11f614f5e84743ab34f6ef9a802a28d7ca621727dca92987961e867011fc0ba51905e4a5158b89bb46670d265896d633114f0cc27d3fb3
7
- data.tar.gz: c57e1fcf4b860f9f6466fbd7e2cfb7c4d34a5ce5b50bc647fdd4279d950c6aa41ffefa975a82269f20ab60be07a5a1f9ce64c95f75d420747ac3b3e8903828d9
6
+ metadata.gz: 2542dd2750603e0e4fa7a0e550cacda950548ed65d8a95ef6e8c2e060fe4a771a2940dbefb78eefed46d572dcd8f467b96a041a5e62ee6df1dc3490db96f977c
7
+ data.tar.gz: c3d55ae33d32a70f1f666c1385956278417bf0332bd455c34326af36647a9163ed72a0317a4707398d43c7c48d9287ce911828e61bb588bd58ef47693df410dc
data/.gitignore CHANGED
@@ -34,3 +34,5 @@ activerecord-jdbc.iml
34
34
  lib/arjdbc/jdbc/adapter_java.jar
35
35
  .jrubyrc
36
36
  tags
37
+ .ruby-version
38
+ pik.sh
@@ -1,3 +1,3 @@
1
1
  module ArJdbc
2
- VERSION = '50.6.1'
2
+ VERSION = '50.7.0'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  namespace :'tomcat-jndi' do # contains a FS JNDI impl (for tests)
2
2
 
3
- TOMCAT_MAVEN_REPO = 'http://repo2.maven.org/maven2/org/apache/tomcat'
3
+ TOMCAT_MAVEN_REPO = 'https://repo1.maven.org/maven2/org/apache/tomcat'
4
4
  TOMCAT_VERSION = '7.0.54'
5
5
 
6
6
  DOWNLOAD_DIR = File.expand_path('../test/jars', File.dirname(__FILE__))
@@ -48,4 +48,4 @@ namespace :'tomcat-jndi' do # contains a FS JNDI impl (for tests)
48
48
  rm jar_path if File.exist?(jar_path)
49
49
  end
50
50
 
51
- end
51
+ end
@@ -203,6 +203,57 @@ public class MSSQLRubyJdbcConnection extends RubyJdbcConnection {
203
203
  });
204
204
  }
205
205
 
206
+ /**
207
+ * Executes an INSERT SQL statement
208
+ * @param context
209
+ * @param sql
210
+ * @param pk Rails PK
211
+ * @return ActiveRecord::Result
212
+ * @throws SQLException
213
+ */
214
+ @Override
215
+ @JRubyMethod(name = "execute_insert_pk", required = 2)
216
+ public IRubyObject execute_insert_pk(final ThreadContext context, final IRubyObject sql, final IRubyObject pk) {
217
+
218
+ // MSSQL does not like composite primary keys here so chop it if there is more than one column
219
+ IRubyObject modifiedPk = pk;
220
+
221
+ if (pk instanceof RubyArray) {
222
+ RubyArray ary = (RubyArray) pk;
223
+ if (ary.size() > 0) {
224
+ modifiedPk = ary.eltInternal(0);
225
+ }
226
+ }
227
+
228
+ return super.execute_insert_pk(context, sql, modifiedPk);
229
+ }
230
+
231
+ /**
232
+ * Executes an INSERT SQL statement using a prepared statement
233
+ * @param context
234
+ * @param sql
235
+ * @param binds RubyArray of values to be bound to the query
236
+ * @param pk Rails PK
237
+ * @return ActiveRecord::Result
238
+ * @throws SQLException
239
+ */
240
+ @Override
241
+ @JRubyMethod(name = "execute_insert_pk", required = 3)
242
+ public IRubyObject execute_insert_pk(final ThreadContext context, final IRubyObject sql, final IRubyObject binds,
243
+ final IRubyObject pk) {
244
+ // MSSQL does not like composite primary keys here so chop it if there is more than one column
245
+ IRubyObject modifiedPk = pk;
246
+
247
+ if (pk instanceof RubyArray) {
248
+ RubyArray ary = (RubyArray) pk;
249
+ if (ary.size() > 0) {
250
+ modifiedPk = ary.eltInternal(0);
251
+ }
252
+ }
253
+
254
+ return super.execute_insert_pk(context, sql, binds, modifiedPk);
255
+ }
256
+
206
257
  @Override
207
258
  protected Integer jdbcTypeFor(final String type) {
208
259
 
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: 50.6.1
4
+ version: 50.7.0
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-12-22 00:00:00.000000000 Z
11
+ date: 2021-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -20,8 +20,8 @@ dependencies:
20
20
  - !ruby/object:Gem::Version
21
21
  version: 5.0.3
22
22
  name: activerecord
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
@@ -262,8 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
264
  requirements: []
265
- rubyforge_project:
266
- rubygems_version: 2.7.6
265
+ rubygems_version: 3.0.6
267
266
  signing_key:
268
267
  specification_version: 4
269
268
  summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server