iconara / cql-rb

Cassandra CQL 3 binary protocol driver for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paging. Undefined method error

brlo opened this issue · comments

Hi

Trying to use Paging like this:

require 'cql'
client = Cql::Client.connect(hosts: ['localhost'])

result_page = client.execute("SELECT * FROM large_table WHERE id = 'partition_with_lots_of_data'", page_size: 100)

loop do
  result_page.each do |row|
    p row
  end
  if result_page.last_page?
    break
  else
    result_page = result_page.next_page
  end
end

And get this "undefined method" Error:

undefined method `last_page?' for #<Cql::Client::QueryResult:0x00000005514898>

cql-rb (1.2.1)
rails (4.1.0)
ruby (2.1.0)

Maybe you know why? Thanks

Oh, seems what that function from cql-rb v2, am I right?

commented

Paging is a v2.0 feature, use v2.0.0.pre1. It’s a prerelease but stable except possibly for some API changes (I haven’t decided yet).

On 1 maj 2014, at 13:34, Rodion notifications@github.com wrote:

Hi

Trying to use Paging like this:

require 'cql'
client = Cql::Client.connect(hosts: ['localhost'])

result_page = client.execute("SELECT * FROM large_table WHERE id = 'partition_with_lots_of_data'", page_size: 100)

loop do
result_page.each do |row|
p row
end
if result_page.last_page?
break
else
result_page = result_page.next_page
end
end

And get this "undefined method" Error:

undefined method `last_page?' for #Cql::Client::QueryResult:0x00000005514898
cql-rb (1.2.1)
rails (4.1.0)
ruby (2.1.0)

Maybe you know why? Thanks


Reply to this email directly or view it on GitHub.

Already using. Seems that it's really stable.
Can you share your plans about releasing version 2?
Thanks

commented

Sorry didn’t see your second message before I replied. Good that you figured it out.

v2.0 should have been out ages ago, it’s basically been feature complete and stable for two months. Just haven’t been able to find the time to review the API, I want to make sure I’m happy with it before I realease a new major version.

On 1 maj 2014, at 17:49, Rodion notifications@github.com wrote:

Closed #97.


Reply to this email directly or view it on GitHub.