activerecord-jdbc-alt-adapter 51.6.1-java → 51.7.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/arjdbc/version.rb +1 -1
- data/rakelib/01-tomcat.rake +2 -2
- data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +51 -0
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bac3f491bd6e25ce779db381c70f8de2bcfc566f7d7add71c73453d4b9d96da
|
4
|
+
data.tar.gz: 5e3cdf41dde39ac86a39d6d21057ede60c0fa321aa9e1164cc5c13c1b6584800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28c69d682d31b0c159bf4fbc309699c0c362696e7edff789e1a51304284407dd09f4f63bf0d97bd460616378b3456cad4535c7fef4c19d607a92ccb962c8d80d
|
7
|
+
data.tar.gz: d83167a275cc51a6715f9a019d8df7519c6bb35d531466fe2e0c61191150238f20c70f9ae233a85e5ad31f89ae61b2f28d9c1fb2b7a17e2591c2ca2ccf529b1b
|
data/.gitignore
CHANGED
data/lib/arjdbc/version.rb
CHANGED
data/rakelib/01-tomcat.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
namespace :'tomcat-jndi' do # contains a FS JNDI impl (for tests)
|
2
2
|
|
3
|
-
TOMCAT_MAVEN_REPO = '
|
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: 51.
|
4
|
+
version: 51.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:
|
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.1.7
|
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
|
- - "~>"
|
@@ -270,8 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
270
|
- !ruby/object:Gem::Version
|
271
271
|
version: '0'
|
272
272
|
requirements: []
|
273
|
-
|
274
|
-
rubygems_version: 2.7.10
|
273
|
+
rubygems_version: 3.0.6
|
275
274
|
signing_key:
|
276
275
|
specification_version: 4
|
277
276
|
summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server
|