rbhive 0.1.15 → 0.1.16

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/rbhive/connection.rb +7 -0
  2. metadata +2 -2
@@ -74,6 +74,13 @@ module RBHive
74
74
  ResultSet.new(client.fetchAll)
75
75
  end
76
76
 
77
+ def fetch_in_batch(query, batch_size=100)
78
+ execute(query)
79
+ until (next_batch = client.fetchN(batch_size)).empty?
80
+ yield next_batch
81
+ end
82
+ end
83
+
77
84
  def first(query)
78
85
  execute(query)
79
86
  ResultSet.new([client.fetchOne])
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 15
9
- version: 0.1.15
8
+ - 16
9
+ version: 0.1.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - Forward Internet Group