Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CQLC: Go Cassandra query returning page token for boundary limit? #40

Open
tanmay-saha opened this issue Nov 22, 2017 · 0 comments
Open

Comments

@tanmay-saha
Copy link

In my Cassandra database for a particular query, I have 8 records, and I am using relops/cqlc library to query.

When I query with limit = 8, it returns 8 records with a PageState which is to be used as page token for the next set of results. First of all, I don't think it should have returned that PageState. And also as expected when I query again with that page_token and the same query parameters, it returns no data.

This is a representative of the way I am using to query

query, err := cx.Select().From(db.MY_TABLE).Where(db.MY_TABLE.NAME.Eq(name), db.MY_TABLE.EV_START.Ge(begin), db.MY_TABLE.EV_START.Lt(end)).Prepare(cass)
query.PageSize(8)
iter := query.Iter()
data, err = db.BindMyTable(iter)

err = iter.Close()
next_page_token = iter.PageState()

*cass is a gocql.Session

Why is it returning a value for the next_page_token?

The same thing does not happen if I increase the limit by one more, say 9.

Did someone else face a similar issue? Any hints as to what might be the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant