mysql_incremental_query 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mysql_incremental_query.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -2,13 +2,13 @@ class Mysql
|
|
2
2
|
def incremental_query(query, &block)
|
3
3
|
result = nil;
|
4
4
|
def result.free;end
|
5
|
+
qwr = self.query_with_result
|
5
6
|
begin
|
6
|
-
qwr = self.query_with_result
|
7
7
|
self.query_with_result = false
|
8
8
|
result = self.query(query).use_result
|
9
9
|
result.each { |row| yield(row) }
|
10
|
-
self.query_with_result = qwr
|
11
10
|
ensure
|
11
|
+
self.query_with_result = qwr
|
12
12
|
result.free
|
13
13
|
end
|
14
14
|
end
|