blackstack-db 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/blackstack-db.rb +10 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25578f16a2bc64d70e9070f80d4db0670defdf81d6676c04692f6037a3c0f45a
4
- data.tar.gz: 98ec2ee0b7e35cddb34785b45d1d08dde7ced218ee3ebb1088ad53ed2473cca7
3
+ metadata.gz: 353b4b2bdb838ebab93502e2e02ac00729a9c2056c7a7299ae513013f16ca093
4
+ data.tar.gz: 7dd91a9b54af25ce2d35f7948bb9be89879301630b6009578c565a635f5997af
5
5
  SHA512:
6
- metadata.gz: 94048636735c829dddb4c80875f069b4f356c6a1752d3ad1e487f9f8bf3efe3dfb6c43516ed1ca07439a93ffa984bca9d06ffedb256574e0772facbaf7134f28
7
- data.tar.gz: 051eb7d1f310bce9fb52f44ed9e25f0e308cd762ed7daa60eb4af1edb1485a6c422cc6c62b5ad3e3ce6fba9436d4eaaca854b0f23e05ec181230b19f087b5b9a
6
+ metadata.gz: 5823b900dea5263daf3e93a9f8a09cedf4bc5e36a73c2b118c179a1696a1419a7e5988319de982dc9f16b39efb2aa294ac54ddd117a3efa36e7c4e7e029d858e
7
+ data.tar.gz: 7c4f6c16b311a98fec899d417e25c7b45564df4f5690384c7a0c965b8357bcefe824016688af3cd3e71cbe0ac6872c1c49740d54c5427c64effd0b1ab7dd43b8
data/lib/blackstack-db.rb CHANGED
@@ -17,6 +17,16 @@ module BlackStack
17
17
  @@db_type
18
18
  end # db_type
19
19
 
20
+ def self.connection_string
21
+ if @@db_type == TYPE_POSTGRESQL
22
+ return BlackStack::PostgreSQL.connection_string
23
+ elsif @@db_type == TYPE_CRDB
24
+ return BlackStack::CRDB.connection_string
25
+ else
26
+ raise "Unknown database type"
27
+ end
28
+ end # connection_string
29
+
20
30
  def self.db_connect
21
31
  if @@db_type == TYPE_POSTGRESQL
22
32
  return BlackStack::PostgreSQL.connect
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
11
+ date: 2024-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize