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: d521831adb1cee94daa5c95fb4e29f039ee0a31f0fe77dd4126b43ad6cf653ff
4
- data.tar.gz: e9cfc515a02cc8031777b4d581accf35a6db0d36dc35f17fa8d872be39035edd
3
+ metadata.gz: 4cc315eef32b269bfa6be1d883eeeecd3b4f33269528d1841213621b28717812
4
+ data.tar.gz: 4c78d834e731c3903dde4cad8461bc5b3e2bc1c7886e41dcc3064090712aa710
5
5
  SHA512:
6
- metadata.gz: f7b17a1a849e8152013ffbc78bde9129a7bbdb535b061522d1447c1210af23dbdb11c14b3c57edcc79c8ba716ae1d0551db183c0270b2f4099535571432f2065
7
- data.tar.gz: 505302e548bcf2796bc09acea5c6bf9a60ace419617401b0dc17be31785f8366dc87ad2a093a7693bb1550a28693da87eaef191237477b26565946f21f28f4e4
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."
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DataConduit
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/data_conduit.rb CHANGED
@@ -11,4 +11,5 @@ DataConduit::RepositoryFactory.register(:trino, DataConduit::Adapters::TrinoRepo
11
11
 
12
12
  module DataConduit
13
13
  class Error < StandardError; end
14
+ class TrinoException < Error; end
14
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_conduit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinicius Dittgen