activerecord-jdbc-alt-adapter 72.0.0.rc1-java → 72.0.0.rc3-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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f13e7b4fa08bfb67f978fad2353bd633bd0420848babe30b611949d69667e77
|
|
4
|
+
data.tar.gz: 35ce8492f5985337a6f2ca02beac9eb38a0a3b9fc5957d816c39bf2da0790687
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 897405b85f5f90c962ca468c600ec44ca12d3cb0f058be273d9944dc998531e03daebf6f80a0cd8ad9cf7367fa90a7b811e7fc5282fc46a503dd987ef628f1f4
|
|
7
|
+
data.tar.gz: 6a85da335eaf8ecfd708bc6641ec58c7665bdba75784e57d4c3ee33540c5e7d42904ae87587d00ebb304cebc3e94a0d0bebf3f48e74dc7a41103ca1f22960a42
|
|
@@ -44,14 +44,17 @@ 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}"
|
|
48
|
+
type_casted_binds = type_casted_binds(binds)
|
|
49
|
+
|
|
47
50
|
with_raw_connection do |conn|
|
|
48
51
|
if without_prepared_statement?(binds)
|
|
49
52
|
log(sql, name, async: async) { conn.execute_query(sql) }
|
|
50
53
|
else
|
|
51
|
-
log(sql, name,
|
|
54
|
+
log(sql, name, type_casted_binds, async: async) do
|
|
52
55
|
# this is different from normal AR that always caches
|
|
53
56
|
cached_statement = fetch_cached_statement(sql) if prepare && @jdbc_statement_cache_enabled
|
|
54
|
-
conn.execute_prepared_query(sql,
|
|
57
|
+
conn.execute_prepared_query(sql, type_casted_binds, cached_statement)
|
|
55
58
|
end
|
|
56
59
|
end
|
|
57
60
|
end
|
|
Binary file
|
|
@@ -102,6 +102,8 @@ module ActiveRecord
|
|
|
102
102
|
# binds = convert_legacy_binds_to_attributes(binds) if binds.first.is_a?(Array)
|
|
103
103
|
|
|
104
104
|
# puts "internal----->sql: #{sql}, binds: #{binds}"
|
|
105
|
+
type_casted_binds = type_casted_binds(binds)
|
|
106
|
+
|
|
105
107
|
if without_prepared_statement?(binds)
|
|
106
108
|
log(sql, name) do
|
|
107
109
|
with_raw_connection do |conn|
|
|
@@ -113,13 +115,13 @@ module ActiveRecord
|
|
|
113
115
|
end
|
|
114
116
|
end
|
|
115
117
|
else
|
|
116
|
-
log(sql, name,
|
|
118
|
+
log(sql, name, type_casted_binds) do
|
|
117
119
|
with_raw_connection do |conn|
|
|
118
120
|
# this is different from normal AR that always caches
|
|
119
121
|
cached_statement = fetch_cached_statement(sql) if prepare && @jdbc_statement_cache_enabled
|
|
120
122
|
|
|
121
123
|
result = conditional_indentity_insert(sql) do
|
|
122
|
-
conn.execute_prepared_query(sql,
|
|
124
|
+
conn.execute_prepared_query(sql, type_casted_binds, cached_statement)
|
|
123
125
|
end
|
|
124
126
|
verified!
|
|
125
127
|
result
|
data/lib/arjdbc/version.rb
CHANGED
|
@@ -674,24 +674,24 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
|
674
674
|
final int index, final IRubyObject value,
|
|
675
675
|
final IRubyObject attribute, final int type) throws SQLException {
|
|
676
676
|
|
|
677
|
-
if ( attributeSQLType(context, attribute) == context.nil ) {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
|
|
677
|
+
// if ( attributeSQLType(context, attribute) == context.nil ) {
|
|
678
|
+
// /*
|
|
679
|
+
// We have to check for a uuid here because in some cases
|
|
680
|
+
// (for example, when doing "exists?" checks, or with legacy binds)
|
|
681
|
+
// ActiveRecord doesn't send us the actual type of the attribute
|
|
682
|
+
// and Postgres won't compare a uuid column with a string
|
|
683
|
+
// */
|
|
684
|
+
// final String uuid = value.toString();
|
|
685
|
+
// int length = uuid.length();
|
|
686
|
+
|
|
687
|
+
// // Checking the length so we don't have the overhead of the regex unless it "looks" like a UUID
|
|
688
|
+
// if (length >= 32 && length < 40 && uuidPattern.matcher(uuid).matches()) {
|
|
689
|
+
// setUUIDParameter(statement, index, uuid);
|
|
690
|
+
// return;
|
|
691
|
+
// }
|
|
692
|
+
// }
|
|
693
|
+
|
|
694
|
+
statement.setObject(index, value.asString().toString(), Types.OTHER);
|
|
695
695
|
}
|
|
696
696
|
|
|
697
697
|
|
metadata
CHANGED
|
@@ -1,14 +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.
|
|
4
|
+
version: 72.0.0.rc3
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sieger, Ola Bini, Karol Bucek, Jesse Chavez, and JRuby contributors
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
10
|
+
date: 2025-10-17 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
@@ -222,7 +221,6 @@ homepage: https://github.com/JesseChavez/activerecord-jdbc-adapter
|
|
|
222
221
|
licenses:
|
|
223
222
|
- BSD-2-Clause
|
|
224
223
|
metadata: {}
|
|
225
|
-
post_install_message:
|
|
226
224
|
rdoc_options:
|
|
227
225
|
- "--main"
|
|
228
226
|
- README.md
|
|
@@ -235,12 +233,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
235
233
|
version: '0'
|
|
236
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
235
|
requirements:
|
|
238
|
-
- - "
|
|
236
|
+
- - ">="
|
|
239
237
|
- !ruby/object:Gem::Version
|
|
240
|
-
version:
|
|
238
|
+
version: '0'
|
|
241
239
|
requirements: []
|
|
242
|
-
rubygems_version: 3.3
|
|
243
|
-
signing_key:
|
|
240
|
+
rubygems_version: 3.6.3
|
|
244
241
|
specification_version: 4
|
|
245
242
|
summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server
|
|
246
243
|
test_files: []
|