activerecord-jdbc-adapter 60.0-java → 61.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 +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +14 -11
- data/Gemfile +1 -1
- data/README.md +8 -7
- data/activerecord-jdbc-adapter.gemspec +1 -1
- data/lib/arel/visitors/postgresql_jdbc.rb +1 -1
- data/lib/arjdbc/abstract/core.rb +1 -0
- data/lib/arjdbc/abstract/database_statements.rb +6 -2
- data/lib/arjdbc/abstract/transaction_support.rb +20 -7
- data/lib/arjdbc/mysql/adapter.rb +14 -5
- data/lib/arjdbc/mysql/connection_methods.rb +6 -1
- data/lib/arjdbc/postgresql/adapter.rb +94 -63
- data/lib/arjdbc/postgresql/column.rb +1 -1
- data/lib/arjdbc/postgresql/connection_methods.rb +1 -0
- data/lib/arjdbc/postgresql/oid_types.rb +5 -4
- data/lib/arjdbc/sqlite3/adapter.rb +106 -56
- data/lib/arjdbc/sqlite3/connection_methods.rb +12 -1
- data/lib/arjdbc/tasks/databases.rake +15 -10
- data/lib/arjdbc/version.rb +1 -1
- data/rakelib/01-tomcat.rake +2 -2
- data/rakelib/rails.rake +1 -1
- data/src/java/arjdbc/jdbc/RubyJdbcConnection.java +124 -41
- data/src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java +51 -0
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +101 -36
- data/src/java/arjdbc/sqlite3/SQLite3RubyJdbcConnection.java +3 -4
- data/src/java/arjdbc/util/DateTimeUtils.java +12 -4
- metadata +6 -7
@@ -370,10 +370,9 @@ public class SQLite3RubyJdbcConnection extends RubyJdbcConnection {
|
|
370
370
|
}
|
371
371
|
|
372
372
|
@Override
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
);
|
373
|
+
protected boolean resetSavepoints(final ThreadContext context, final Connection connection) throws SQLException {
|
374
|
+
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
|
375
|
+
return super.resetSavepoints(context, connection);
|
377
376
|
}
|
378
377
|
|
379
378
|
@Override
|
@@ -37,6 +37,7 @@ import org.jruby.Ruby;
|
|
37
37
|
import org.jruby.RubyFloat;
|
38
38
|
import org.jruby.RubyString;
|
39
39
|
import org.jruby.RubyTime;
|
40
|
+
import org.jruby.ext.date.RubyDateTime;
|
40
41
|
import org.jruby.javasupport.Java;
|
41
42
|
import org.jruby.runtime.Block;
|
42
43
|
import org.jruby.runtime.ThreadContext;
|
@@ -632,14 +633,21 @@ public abstract class DateTimeUtils {
|
|
632
633
|
*/
|
633
634
|
public static String timestampTimeToString(final ThreadContext context,
|
634
635
|
final IRubyObject value, DateTimeZone zone, boolean withZone) {
|
635
|
-
|
636
|
-
|
636
|
+
DateTime dt;
|
637
|
+
int usec = 0;
|
638
|
+
if (value instanceof RubyDateTime) {
|
639
|
+
dt = ((RubyDateTime) value).getDateTime();
|
640
|
+
} else {
|
641
|
+
RubyTime timeValue = toTime(context, value);
|
642
|
+
dt = timeValue.getDateTime();
|
643
|
+
usec = (int) timeValue.getUSec();
|
644
|
+
}
|
637
645
|
|
638
646
|
StringBuilder sb = new StringBuilder(36);
|
639
647
|
|
640
648
|
int year = dt.getYear();
|
641
649
|
if (year <= 0) {
|
642
|
-
year--;
|
650
|
+
if (!(value instanceof RubyDateTime)) year--;
|
643
651
|
} else if (zone != null) {
|
644
652
|
dt = dateTimeInZone(dt, zone);
|
645
653
|
year = dt.getYear();
|
@@ -659,7 +667,7 @@ public abstract class DateTimeUtils {
|
|
659
667
|
if (year < 0) sb.append(" BC");
|
660
668
|
sb.append(' ');
|
661
669
|
|
662
|
-
appendTime(sb, chrono, millis,
|
670
|
+
appendTime(sb, chrono, millis, usec, withZone);
|
663
671
|
|
664
672
|
return sb.toString();
|
665
673
|
}
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbc-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '61.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: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 6.
|
18
|
+
version: 6.1.0
|
19
19
|
name: activerecord
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.
|
26
|
+
version: 6.1.0
|
27
27
|
description: 'AR-JDBC is a database adapter for Rails'' ActiveRecord component designed
|
28
28
|
to be used with JRuby built upon Java''s JDBC API for database access. Provides
|
29
29
|
(ActiveRecord) built-in adapters: MySQL, PostgreSQL, SQLite3, and SQLServer.'
|
@@ -230,8 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
- !ruby/object:Gem::Version
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
|
-
|
234
|
-
rubygems_version: 2.7.10
|
233
|
+
rubygems_version: 3.0.6
|
235
234
|
signing_key:
|
236
235
|
specification_version: 4
|
237
236
|
summary: JDBC adapter for ActiveRecord, for use within JRuby on Rails.
|