oracle_query 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/oracle_query.rb +9 -3
  2. metadata +2 -2
data/lib/oracle_query.rb CHANGED
@@ -45,9 +45,15 @@ class Oracle
45
45
  end
46
46
 
47
47
  #set Table name, Values to update ["name = 'John', id = 30"], where columns = values
48
- def update (table, values, where)
49
- @oci.exec("UPDATE #{table} SET #{values[0]} WHERE #{where}")
50
- @oci.commit
48
+ #omitt set to false omitts where clause
49
+ def update (table, values, where, omitt)
50
+ if omitt == false
51
+ @oci.exec("UPDATE #{table} SET #{values[0]} WHERE #{where}")
52
+ @oci.commit
53
+ else
54
+ @oci.exec("UPDATE #{table} SET #{values[0]}")
55
+ @oci.commit
56
+ end
51
57
  end
52
58
 
53
59
  #Set table to name of table you wish to delete
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oracle_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
12
+ date: 2013-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-oci8