wikk_sql 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wikk_sql.rb +4 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24ae4136e9b1d2294d3a2f450cf28dc937240fc3
4
- data.tar.gz: f51eabc9c1f8efe8c93d3c9315877d30a0e2cb4f
3
+ metadata.gz: e79080d1dcb41aeef5ff6185476cc3391f0e63d8
4
+ data.tar.gz: 58b2c77cf999e3fa72d4ac8adcf6ef2512a84061
5
5
  SHA512:
6
- metadata.gz: c7c9abebe4e35e9f1911be665e755bc2714d06d45cfc57909f7b7b3c8fa1538d9f3fc2cf87a044853733ade99a3616d5358264675070934ede25cd910ec4d7e9
7
- data.tar.gz: 4597cc3055cd996a8dc7554f9c84dc785e4e1e71905b5712e9fa48bcc1d645859a52887a9edcfe3db9106664881bd18b696bba7c6db6fa801677074a1e8aa637
6
+ metadata.gz: 10fe03396296a531bbeeee1ded2e4352f4aaf2bbd6b5ab1ac32f7d08d525516df5c638b8b64ba1d9c5d64813c4253818c496566490e99744fdaec7b862fe6572
7
+ data.tar.gz: 67fe12be20fa3417ef08d5c043b4d1c7003a3605b7f3cfabe080a3ca25e82b57099364680ea61870d7d6fc2e5a0da54f0985f78cb7f613e7ac10e098193232ed
@@ -8,7 +8,7 @@ module WIKK
8
8
  # @attr_reader [Mysql::Result] result the last query's result
9
9
  # @attr_reader [Mysql] my the DB connection descriptor
10
10
  class SQL
11
- VERSION = '0.1.3'
11
+ VERSION = '0.1.4'
12
12
 
13
13
  attr_reader :affected_rows, :result, :my
14
14
 
@@ -45,6 +45,7 @@ module WIKK
45
45
  @my = nil
46
46
  raise e
47
47
  end
48
+ raise Mysql::Error, 'Not Connected' if @my == nil
48
49
  #@@my.reconnect = true
49
50
  if block_given?
50
51
  yield
@@ -68,6 +69,7 @@ module WIKK
68
69
  # @yieldparam [Mysql::Result] @result and @affected_rows are also set.
69
70
  # @return [Mysql::Result] @result and @affected_rows are also set.
70
71
  def query(the_query)
72
+ raise Mysql::Error, 'Not Connected' if @my == nil
71
73
  begin
72
74
  if @result != nil
73
75
  @result.free #Free any result we had left over from previous use.
@@ -95,7 +97,7 @@ module WIKK
95
97
  # @yieldparam [] yields to block, where the queries are performed.
96
98
  # @raise [Mysql] passes on Mysql errors, freeing the result.
97
99
  def transaction
98
- #puts "transaction"
100
+ raise Mysql::Error, 'Not Connected' if @my == nil
99
101
  if block_given?
100
102
  begin
101
103
  @my.query("START TRANSACTION WITH CONSISTENT SNAPSHOT")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikk_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Burrowes