-
Notifications
You must be signed in to change notification settings - Fork 31
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
Total item count #22
Comments
Hello @PascalLeMerrer , I'm working in a v2 release, with much more intuitive api, hopefully I will be able to finish it in a few weeks, as I'm very busy with work ! I will keep you updated if you want Regards |
Many thanks! |
It doesn't seem to work. Maybe it's a usage problem on my side? queryString := "FOR u in users SORT u.createdAt DESC LIMIT 0, 20 RETURN u"
arangoQuery := ara.NewQuery(queryString)
arangoQuery.SetFullCount(true)
cursor, err := config.Db().Execute(arangoQuery)
if err != nil {
fmt.Println(err)
return nil, 0, err
}
result := make([]User, len(cursor.Result))
err = cursor.FetchBatch(&result)
if err != nil {
fmt.Println(err)
return nil, 0, err
}
return result, cursor.FullCount(), nil |
The problem is in the unmarshalling of the response of the database. The fullcount field is not in extra, but in extra.stats. I will make a pull request with a fix. |
Fixed issue #22: total item count is 0.
How could I get the total number of items when I get a subset using the limit parameter?
The fullcount property is always 0, event when the AQL request contains a "LIMIT" clause.
The text was updated successfully, but these errors were encountered: