qreport 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 2013-06-26 Kurt A. Stephens <ks.github@kurtstephens.com>
2
+
3
+ * v0.0.3: New Version: New Functionality.
4
+ * Connection#schemaname for table_exists?.
5
+
1
6
  2013-06-26 Kurt A. Stephens <ks.github@kurtstephens.com>
2
7
 
3
8
  * v0.0.2: New Version: New Functionality.
@@ -4,6 +4,7 @@ require 'time' # iso8601
4
4
  module Qreport
5
5
  class Connection
6
6
  attr_accessor :arguments, :verbose, :verbose_result, :env
7
+ attr_accessor :schemaname
7
8
  attr_accessor :conn, :conn_owned
8
9
 
9
10
  class << self
@@ -133,11 +134,8 @@ module Qreport
133
134
  run "ABORT"; self
134
135
  end
135
136
 
136
- def table_exists? name, schemaname = 'public'
137
- #result = run "SELECT * FROM pg_catalog.pg_tables",
138
- #:arguments => { :tablename => name }
139
- #pp result.rows
140
-
137
+ def table_exists? name, schemaname = nil
138
+ schemaname ||= self.schemaname
141
139
  result =
142
140
  run "SELECT EXISTS(SELECT * FROM pg_catalog.pg_tables WHERE tablename = :tablename AND schemaname = :schemaname) as \"exists\"",
143
141
  :arguments => { :tablename => name, :schemaname => schemaname }
@@ -1,3 +1,3 @@
1
1
  module Qreport
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qreport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: -4571312096483828013
118
+ hash: 1042479240824554319
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: -4571312096483828013
127
+ hash: 1042479240824554319
128
128
  requirements: []
129
129
  rubyforge_project:
130
130
  rubygems_version: 1.8.25