oracle_query 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.
- data/lib/oracle_query.rb +9 -3
- 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
|
-
|
49
|
-
|
50
|
-
|
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.
|
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-
|
12
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-oci8
|