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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9659870b66b539ca78533e654ab12884ff8a9732ba30d2f3017eec5a2362960f
4
- data.tar.gz: 143334da9d47cdffe125e21ae5dc908efae5127e9cd6dae1bbba8597679cb8b8
3
+ metadata.gz: a7c14a1b2eb6b966828ef21ffe220125114d6ff5b7ff5138b4f4b8c29468cc4d
4
+ data.tar.gz: '09751ceed95d1fb73b1ff71b18f455999bf22b0a00ec1327b0b3a8365672a56e'
5
5
  SHA512:
6
- metadata.gz: 8f1c55113650733182a1c6d5a1ae10b3af8d6eb83e65058d6a33d71654bf9df025900511b33423f221e2fbd80eb22be06d75e7572441c262c05b6fbaa39ef849
7
- data.tar.gz: 90ab826ac140e2b8655bdf279d37125c0fe412a36cad5a8f1ff93d2f0a3c6b236533553dc3fabcdd73543fa54d2ea530db5aa32e1f9de6cd646739755319a18b
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.1)
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.103.0)
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UmbrellioUtils
4
- VERSION = "1.16.1"
4
+ VERSION = "1.16.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umbrellio-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Umbrellio