sequel-activerecord_connection 1.2.10 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/sequel/extensions/activerecord_connection/mysql2.rb +4 -0
- data/lib/sequel/extensions/activerecord_connection/postgres.rb +4 -0
- data/lib/sequel/extensions/activerecord_connection/sqlite.rb +4 -0
- data/lib/sequel/extensions/activerecord_connection/tinytds.rb +6 -0
- data/lib/sequel/extensions/activerecord_connection.rb +11 -1
- data/sequel-activerecord_connection.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b0b564099dd7cf0627c98960d7ca34a0fb1682aaa1f5262ee03de9a9bf2ad8a
|
4
|
+
data.tar.gz: 90b84910bae08b57fcc4e3f29deafe07e1e5fb620ae662960c0058a462bc81b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58fd8e6e50e2dc25dba484c1deee60c1f20681761431c4654a3da092572f2cbfb768eb992a7d7e7eb6f03a77691289e3dd5366796c03ecfdefdbf88412bbfa29
|
7
|
+
data.tar.gz: c92338695de7971f16dd4adf3b518bb00f294a033df519fb1b7077c05a3d080cda443c3ac6d245214d2a07d53c7a00c12dbb914de4cda6e8bb74547c6da6541d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 1.2.11 (2023-01-09)
|
2
|
+
|
3
|
+
* Raise explicit exception in case of mismatch between Active Record and Sequel adapter (@janko)
|
4
|
+
|
1
5
|
## 1.2.10 (2022-12-13)
|
2
6
|
|
3
7
|
* Fix incorrect PG type mapping when using prepared statements in Sequel (@janko)
|
@@ -12,7 +16,7 @@
|
|
12
16
|
|
13
17
|
## 1.2.7 (2022-01-20)
|
14
18
|
|
15
|
-
* Require Sequel
|
19
|
+
* Require Sequel 5.38+ (@janko)
|
16
20
|
|
17
21
|
## 1.2.6 (2021-12-26)
|
18
22
|
|
@@ -35,7 +35,13 @@ module Sequel
|
|
35
35
|
# Avoid calling Sequel's connection pool, instead use Active Record's.
|
36
36
|
def synchronize(*)
|
37
37
|
activerecord_lock do
|
38
|
-
|
38
|
+
conn = activerecord_connection.raw_connection
|
39
|
+
|
40
|
+
if activerecord_connection_class && !conn.is_a?(activerecord_connection_class)
|
41
|
+
fail Error, "expected Active Record connection to be a #{activerecord_connection_class}, got #{conn.class}"
|
42
|
+
end
|
43
|
+
|
44
|
+
yield conn
|
39
45
|
end
|
40
46
|
end
|
41
47
|
|
@@ -151,6 +157,10 @@ module Sequel
|
|
151
157
|
activerecord_model.connection
|
152
158
|
end
|
153
159
|
|
160
|
+
def activerecord_connection_class
|
161
|
+
# defines in adapter modules
|
162
|
+
end
|
163
|
+
|
154
164
|
def activerecord_log(sql, &block)
|
155
165
|
ActiveSupport::Notifications.instrument(
|
156
166
|
"sql.active_record",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-activerecord_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.4.1
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Allows Sequel to use ActiveRecord connection for database interaction.
|