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

QueryExtra #43

Open
inzanez opened this issue Nov 13, 2020 · 4 comments
Open

QueryExtra #43

inzanez opened this issue Nov 13, 2020 · 4 comments

Comments

@inzanez
Copy link
Contributor

inzanez commented Nov 13, 2020

@fMeow Did you have any plans on how to implement retrieval of QueyExtra data? I would like to implement that asap, as I need it.

I was just scanning through the code and think that extending the existing functions:

  • aql_fetch_all
  • aql_query

might be hard. But it could still be convenient to have something integrated. How about adding new functions:

  • aql_fetch_all_extra
  • aql_query_extra

which would return QueryExtra data in addition to the results.

@inzanez
Copy link
Contributor Author

inzanez commented Nov 15, 2020

Any update on this one? If you are not implementing anything already I would get started with this.

@fMeow
Copy link
Owner

fMeow commented Nov 16, 2020

Thank you for your kind suggetion.

I haven't used this feature and I fail to find QueryExtra in the arangodb document. Could you please give a link?

@inzanez
Copy link
Contributor Author

inzanez commented Nov 16, 2020

It‘s not a particular function. It‘s the ‚extra‘ information from the query response. I think only ‚results‘ are parsed right now, the rest is ignored. For instance, the 'total_count' etc. would be interesting.

@fMeow
Copy link
Owner

fMeow commented Nov 17, 2020

This is already inplemented. You can use aql_query_batch and aql_next_batch to get a Cursor which contains QueryExtra. See aql_fetch_all for usage.

aql_fetch_all, aql_query and etc are handy functions for a quick retrieval, which is actually a wrapper around aql_query_batch and aql_next_batch. ArangoDB actually returns a cursor, which contains all the extra information.

The reason of neglecting QueryExtra is that it may change across Cursor. So the end result is a list of QueryExtra, which is not ergonomic to me.

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

2 participants