umbrellio-utils 1.13.1 → 1.13.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 +1 -1
- data/lib/umbrellio_utils/click_house/backends/base.rb +10 -1
- data/lib/umbrellio_utils/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3fb1789266f96caa48d78ccd5889e105acdbef4dc223c4b172c6be49fb4612d
|
|
4
|
+
data.tar.gz: fc558f846c8fa09ce78c0deb81f2b2e94760a063ebb281cf9f2e23be4c795fa6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92dfcbbd2228a4f39fdb93eb0cc26e56ab9859d7a55233662a98118e70315474e819de791d187cecd75a99e9e1d99dc4cc95f1c45bd124f7df6cfbc7fe171ef0
|
|
7
|
+
data.tar.gz: e544b012acf6d92bbad772cbce24d115cc03e5a7453270fc8c8b7dbead9e0bd209c7c83a726f19d6a73b2853163222fc3a29aea0920021fc2fdde58978bc7f9d
|
data/Gemfile.lock
CHANGED
|
@@ -13,6 +13,15 @@ module UmbrellioUtils
|
|
|
13
13
|
class Base
|
|
14
14
|
include Singleton
|
|
15
15
|
|
|
16
|
+
# ClickHouse uses C-style escape sequences in string literals, so
|
|
17
|
+
# backslashes must be doubled. Sequel's default (Postgres) escaping
|
|
18
|
+
# only escapes single-quotes.
|
|
19
|
+
module ClickHouseStringEscaping
|
|
20
|
+
def literal_string_append(sql, str)
|
|
21
|
+
sql << "'" << str.gsub("\\") { "\\\\" }.gsub("'", "''") << "'"
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
16
25
|
# Concrete backends implement the low-level ops (execute / query /
|
|
17
26
|
# insert / describe_table / server_version / tables / admin_execute
|
|
18
27
|
# / config / logger) and define SERVER_ERROR.
|
|
@@ -27,7 +36,7 @@ module UmbrellioUtils
|
|
|
27
36
|
else
|
|
28
37
|
DB.from(source)
|
|
29
38
|
end
|
|
30
|
-
ds.clone(ch: true)
|
|
39
|
+
ds.clone(ch: true).with_extend(ClickHouseStringEscaping)
|
|
31
40
|
end
|
|
32
41
|
|
|
33
42
|
def count(dataset)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: umbrellio-utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.13.
|
|
4
|
+
version: 1.13.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Team Umbrellio
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: memery
|
|
@@ -87,7 +86,6 @@ metadata:
|
|
|
87
86
|
homepage_uri: https://github.com/umbrellio/utils
|
|
88
87
|
source_code_uri: https://github.com/umbrellio/utils
|
|
89
88
|
documentation_uri: https://rubydoc.info/gems/umbrellio-utils
|
|
90
|
-
post_install_message:
|
|
91
89
|
rdoc_options: []
|
|
92
90
|
require_paths:
|
|
93
91
|
- lib
|
|
@@ -102,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
100
|
- !ruby/object:Gem::Version
|
|
103
101
|
version: '0'
|
|
104
102
|
requirements: []
|
|
105
|
-
rubygems_version:
|
|
106
|
-
signing_key:
|
|
103
|
+
rubygems_version: 4.0.12
|
|
107
104
|
specification_version: 4
|
|
108
105
|
summary: A set of utilities that speed up development
|
|
109
106
|
test_files: []
|