uc3-dmp-rds 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-rds/adapter.rb +3 -3
- data/lib/uc3-dmp-rds/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: cc6233160adcb2ba80c918f291132ed535c074408e9e8741ecc22ba75d3a9560
|
4
|
+
data.tar.gz: 84b0cb62671d6b7a6495b6f4a866d1e102cae41f6112d2ef89f5e3305d2e3b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f196f1ce63bda0b18a0f12a7412bc469586485362396e30d64b4f3e77c04efd59e8772b69bc8a69eb4da1f9a95eeb90d7ae6ecc6934d9fa09da5ec661fd7e09
|
7
|
+
data.tar.gz: 2061fdebee99d9e038f5c40a2a4bcaf7266c8aed7172b9e315f4a0d035a6f5a915842558045029b015f0b14d09694ed527f907696a9d11c4516eab21494dd15f
|
data/lib/uc3-dmp-rds/adapter.rb
CHANGED
@@ -24,7 +24,7 @@ module Uc3DmpRds
|
|
24
24
|
|
25
25
|
class << self
|
26
26
|
# Connect to the RDS instance
|
27
|
-
def connect
|
27
|
+
def connect(debug: false)
|
28
28
|
creds = _credentials
|
29
29
|
ActiveRecord::Base.establish_connection(
|
30
30
|
adapter: 'mysql2',
|
@@ -35,12 +35,12 @@ module Uc3DmpRds
|
|
35
35
|
password: creds[:password],
|
36
36
|
encoding: 'utf8mb4'
|
37
37
|
)
|
38
|
-
ActiveRecord::Base.connected?
|
38
|
+
# ActiveRecord::Base.connected?
|
39
39
|
end
|
40
40
|
|
41
41
|
# Execute the specified query using ActiveRecord's helpers to sanitize the input
|
42
42
|
def execute_query(sql:, **params)
|
43
|
-
raise StandardError, MSG_NO_CONNECTION unless ActiveRecord::Base.connected?
|
43
|
+
# raise StandardError, MSG_NO_CONNECTION unless ActiveRecord::Base.connected?
|
44
44
|
return [] unless sql.is_a?(String) && !sql.strip.empty? && (params.nil? || params.is_a?(Hash))
|
45
45
|
# Verify that all of the kewords are accounted for and that values were supplied
|
46
46
|
raise StandardError, MSG_KEYWORDS_INVALID unless _verify_params(sql: sql, params: params)
|
data/lib/uc3-dmp-rds/version.rb
CHANGED