Class: Redis::Commands::Search::Cursor
- Inherits:
-
Object
- Object
- Redis::Commands::Search::Cursor
- Defined in:
- lib/redis/commands/modules/search/aggregation.rb
Overview
Represents an FT.CURSOR read for paging through aggregation results.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#build_args ⇒ Array<String>
Render the cursor arguments for
FT.CURSOR READ. -
#initialize(cid) ⇒ Cursor
constructor
A new instance of Cursor.
Constructor Details
#initialize(cid) ⇒ Cursor
Returns a new instance of Cursor.
402 403 404 405 |
# File 'lib/redis/commands/modules/search/aggregation.rb', line 402 def initialize(cid) @cid = cid @count = 0 end |
Instance Attribute Details
#cid ⇒ Integer
399 400 401 |
# File 'lib/redis/commands/modules/search/aggregation.rb', line 399 def cid @cid end |
#count ⇒ Integer
399 400 401 |
# File 'lib/redis/commands/modules/search/aggregation.rb', line 399 def count @count end |
Instance Method Details
#build_args ⇒ Array<String>
Render the cursor arguments for FT.CURSOR READ.
410 411 412 413 414 |
# File 'lib/redis/commands/modules/search/aggregation.rb', line 410 def build_args args = [@cid.to_s] args.concat(["COUNT", @count.to_s]) if @count > 0 args end |