umbrellio-utils 1.16.1 → 1.16.2
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/Gemfile.lock +2 -2
- data/lib/umbrellio_utils/click_house/backends/base.rb +14 -0
- data/lib/umbrellio_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7c14a1b2eb6b966828ef21ffe220125114d6ff5b7ff5138b4f4b8c29468cc4d
|
|
4
|
+
data.tar.gz: '09751ceed95d1fb73b1ff71b18f455999bf22b0a00ec1327b0b3a8365672a56e'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 453183b841b35ded94451993497b70d2228b897bb00351d191c5ed432943e0575b0f4eb9e71db4d5557d75662acac3ce31092c7c9706e11322192dd337eb591d
|
|
7
|
+
data.tar.gz: 8b12202e78c716ec7eee7f680143252e6766b3d290e048681959904636968b9d930570016eac28d4296028c213cdddb2b9365917430fea03ebb539a6a529099c
|
data/Gemfile.lock
CHANGED
|
@@ -11,7 +11,7 @@ GIT
|
|
|
11
11
|
PATH
|
|
12
12
|
remote: .
|
|
13
13
|
specs:
|
|
14
|
-
umbrellio-utils (1.16.
|
|
14
|
+
umbrellio-utils (1.16.2)
|
|
15
15
|
memery (~> 1)
|
|
16
16
|
|
|
17
17
|
GEM
|
|
@@ -352,7 +352,7 @@ GEM
|
|
|
352
352
|
self_data (1.3.0)
|
|
353
353
|
semantic_logger (4.18.0)
|
|
354
354
|
concurrent-ruby (~> 1.0)
|
|
355
|
-
sequel (5.
|
|
355
|
+
sequel (5.110.0)
|
|
356
356
|
bigdecimal
|
|
357
357
|
sequel-batches (2.0.3)
|
|
358
358
|
sequel
|
|
@@ -16,6 +16,10 @@ module UmbrellioUtils
|
|
|
16
16
|
# ClickHouse-specific dataset behaviour: string escaping plus grammar
|
|
17
17
|
# Sequel's Postgres dataset doesn't know about.
|
|
18
18
|
module ClickHouseDatasetMethods
|
|
19
|
+
JOIN_KEYWORDS = %w[
|
|
20
|
+
global inner left right full cross outer semi anti any all asof array paste
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
19
23
|
# ClickHouse uses C-style escape sequences in string literals, so
|
|
20
24
|
# backslashes must be doubled. Sequel's default (Postgres) escaping
|
|
21
25
|
# only escapes single-quotes.
|
|
@@ -74,6 +78,16 @@ module UmbrellioUtils
|
|
|
74
78
|
|
|
75
79
|
private
|
|
76
80
|
|
|
81
|
+
def join_type_sql(join_type)
|
|
82
|
+
return super unless join_type.is_a?(Symbol)
|
|
83
|
+
|
|
84
|
+
words = join_type.to_s.split("_", -1)
|
|
85
|
+
return super if words.empty?
|
|
86
|
+
return super unless words.all? { |word| JOIN_KEYWORDS.include?(word) }
|
|
87
|
+
|
|
88
|
+
"#{words.join(" ").upcase} JOIN"
|
|
89
|
+
end
|
|
90
|
+
|
|
77
91
|
# The subquery must project every column, both so the outer query can
|
|
78
92
|
# filter on `is_deleted` and so a caller's projection still resolves;
|
|
79
93
|
# that projection is re-applied outside instead.
|