sequel-search-path 0.2.0 → 0.2.1
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: acc2f2cb88f6d194fe3f62a980b88eda3620736e
|
|
4
|
+
data.tar.gz: 9b0efc849c707409646b575c16b4d40f0d8f3d57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e6e1afaa9b59081ad716fe7a1566da43594b81a97f8988528959a110b630c42d7c75fe27c2794c0729aa19a9e3b31c0189937934a589ecf8feba75bcac29f6c
|
|
7
|
+
data.tar.gz: d10bfc5b06818d9549e22feaec977fe3c9a415ce9889ac3272a2686cebd42ba995fc79ee14f939db487e91a1ccb63c0fe3eb3a4e41f5d275436536c9066612dd
|
|
@@ -25,15 +25,18 @@ module Sequel
|
|
|
25
25
|
Thread.current[schemas_key] ||= [:public]
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
def schemas=(
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
def schemas=(new_schemas)
|
|
29
|
+
new_schemas = new_schemas.map(&:to_sym).uniq
|
|
30
|
+
|
|
31
|
+
return if schemas == new_schemas
|
|
32
|
+
|
|
33
|
+
Thread.current[schemas_key] = new_schemas
|
|
31
34
|
|
|
32
35
|
# Set the search_path in Postgres, unless it's in transaction rollback.
|
|
33
36
|
# If it is, the search_path will be reset for us anyway, and the SQL
|
|
34
37
|
# call will just raise another error.
|
|
35
38
|
unless synchronize(&:transaction_status) == PG::PQTRANS_INERROR
|
|
36
|
-
set_search_path(
|
|
39
|
+
set_search_path(new_schemas)
|
|
37
40
|
end
|
|
38
41
|
end
|
|
39
42
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sequel-search-path
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Hanks
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-09-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|