data_conduit 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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cc315eef32b269bfa6be1d883eeeecd3b4f33269528d1841213621b28717812
|
|
4
|
+
data.tar.gz: 4c78d834e731c3903dde4cad8461bc5b3e2bc1c7886e41dcc3064090712aa710
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56bb80246966f918000373dfec41ea9429554a93e3c13c9a404064349bcccd8a7fd9915dc924d039e30e10511fee3469bb5373c6e102130648ad6b83834dc21e
|
|
7
|
+
data.tar.gz: '0759aecc053dcc9f81ce8b484e5d89fd8b84f26919fc7c8aba75ea18375462b02b9ef95846bb0ac3365882ee9d7f3342f24b0a5503e4270b4b03e84eb1d9143c'
|
|
@@ -28,6 +28,10 @@ module DataConduit
|
|
|
28
28
|
def self.tables(config)
|
|
29
29
|
repo = new(nil, nil, config)
|
|
30
30
|
response_data = repo.send(:response_to, "SHOW tables")
|
|
31
|
+
if response_data[:result_data].is_a?(Hash) && response_data[:result_data]["error"]
|
|
32
|
+
raise DataConduit::TrinoException, response_data[:result_data]["error"].to_s
|
|
33
|
+
end
|
|
34
|
+
|
|
31
35
|
response_data[:result_data]&.flatten&.sort
|
|
32
36
|
end
|
|
33
37
|
|
|
@@ -39,7 +39,7 @@ module DataConduit
|
|
|
39
39
|
def validate_table_name(table_name)
|
|
40
40
|
raise ArgumentError, "Table name cannot be blank" if table_name.nil? || table_name.empty?
|
|
41
41
|
|
|
42
|
-
return if table_name.to_s.match?(/^[a-zA-Z0-9_
|
|
42
|
+
return if table_name.to_s.match?(/^[a-zA-Z0-9_.]+$/)
|
|
43
43
|
|
|
44
44
|
raise ArgumentError, "Invalid table name format. Table name must contain only letters, " \
|
|
45
45
|
"numbers, underscores, and periods."
|
data/lib/data_conduit/version.rb
CHANGED
data/lib/data_conduit.rb
CHANGED