jvertica 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 369bed78b93ecf0d0109978b511cc45888a34b48
4
- data.tar.gz: 1dad70be1b3332bdd3600e090e882c91881a8a64
3
+ metadata.gz: ab5f8736cac99b5044af9d9531657ead41aba91c
4
+ data.tar.gz: 868c7a7cea4c09c0e8a5d87a356caa51bf4513f8
5
5
  SHA512:
6
- metadata.gz: c13f6110d84ea92fa8a7fde4533031ca47edb9849f68afe7c549cef5d1f4acbfc9a6a74fda1837e2b32cc279401d9ac369d99b77eb14bd2f31c4f33aa4bfe5c2
7
- data.tar.gz: 07b9bdd5d5b7b68c4ab4204e9880bfe2661d49c75be5314dede28bab32faaee018edfa1ca60e710d5d3c4a3c18bda161177fffdfa6de15343d4080427916c7a4
6
+ metadata.gz: be5c17f9209573075175bf89d3934a157706f7e749618e566249b09ce4481c3faa1c5e900b16f99a9bbf8f88371b314ec7d359e303c08b020b63229662fad20b
7
+ data.tar.gz: 8c3ca41bf17333e44c6a6d4395f91181a3c93f68a50df845e83655bd4d1776cc15d4f541dfb603da486e3b6cf216755738101fd87136224b803a188caf4ba54c
@@ -1,3 +1,3 @@
1
1
  class Jvertica
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/jvertica.rb CHANGED
@@ -39,6 +39,7 @@ class Jvertica
39
39
 
40
40
  @connection = begin
41
41
  DriverManager.getConnection "jdbc:vertica://#{host}:#{port}/#{database}", prop
42
+ @closed = false
42
43
  rescue => e
43
44
  raise ConnectionError.new("Connection Failed.\n" +
44
45
  "Error Message => #{e.message}\n" +
@@ -46,12 +47,16 @@ class Jvertica
46
47
  end
47
48
  end
48
49
 
50
+ def closed?
51
+ @closed
52
+ end
53
+
49
54
  def close
50
- @connection.close
55
+ @connection.close && @closed = true
51
56
  end
52
57
 
53
58
  def commit
54
- @connection.commit
59
+ @connection.commit
55
60
  end
56
61
 
57
62
  def rollback
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jvertica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - takahiro.nakayama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-15 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement