lib/td/client/api/table.rb in td-client-0.8.70 vs lib/td/client/api/table.rb in td-client-0.8.71
- old
+ new
@@ -127,18 +127,17 @@
end
# @param [String] db
# @param [String] table
# @param [Fixnum] count
- # @param [Fixnum] to
- # @param [Fixnum] from
# @param [Proc] block
# @return [Array, nil]
- def tail(db, table, count, to, from, &block)
+ def tail(db, table, count, to = nil, from = nil, &block)
+ unless to.nil? and from.nil?
+ warn('parameter "to" and "from" no longer work')
+ end
params = {'format' => 'msgpack'}
params['count'] = count.to_s if count
- params['to'] = to.to_s if to
- params['from'] = from.to_s if from
code, body, res = get("/v3/table/tail/#{e db}/#{e table}", params)
if code != "200"
raise_error("Tail table failed", res)
end
if block