Query Cursor

67 views
Skip to first unread message

srk

unread,
Nov 6, 2013, 8:01:49 AM11/6/13
to google-a...@googlegroups.com
Hi,

I was working with query cursors in gae and found a weird cursor value named 'ExQ' retured by the query when there were no additional records. I am expecting a null or empty cursor when there are no records that is to be fetched from the datastore. can someone kindly help me to get rid of the 3 letter String and obtain a null or empty string from the query. i am using jdo query cursors.

Thanks in advance,
Srikanth

Vinny P

unread,
Nov 7, 2013, 12:48:12 AM11/7/13
to google-a...@googlegroups.com
On Wed, Nov 6, 2013 at 7:01 AM, srk <srikanth.kr...@a-cti.com> wrote:
I was working with query cursors in gae and found a weird cursor value named 'ExQ' retured by the query when there were no additional records. I am expecting a null or empty cursor when there are no records that is to be fetched from the datastore. can someone kindly help me to get rid of the 3 letter String and obtain a null or empty string from the query. i am using jdo query cursors.



Are you using any helper libraries to handle these JDO queries? If so, what happens if you use the low level Java datastore API to process cursor queries?

Anyway - as you noted in your post - "ExQ" is a notice that there are no more entities to return. It means functionally the same thing as a null or empty cursor response. Presumably your code is already checking for a null or empty query string; you can check for this value as well.
 

-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 

Srikanth Krishnamurthy

unread,
Nov 7, 2013, 10:52:40 AM11/7/13
to google-a...@googlegroups.com
Vinny,

Thanks a lot for responding to my question and it was really helpful. I appreciate it. Thanks once again. I was using JDO query cursors mentioned in the app engine documentation and hence i had the problem however i have not tried whether the same "EXQ" is being produced in the app enging datastore queries. Kindly let me know if i can check the same condition like i check for null and empty even for datastore queries too if that happens for me once i try with it.

Thanks a lot for your support,
Srikanth


--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/awGzxM58cRQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Vinny P

unread,
Nov 7, 2013, 10:33:26 PM11/7/13
to google-a...@googlegroups.com
On Thu, Nov 7, 2013 at 9:52 AM, Srikanth Krishnamurthy <srikanth.kr...@a-cti.com> wrote:
Let me know if i can check the same condition like i check for null and empty even for datastore queries too if that happens for me once i try with it.



Yes, you can check for ExQ in the same manner as null or empty cursor strings.

Srikanth Krishnamurthy

unread,
Nov 8, 2013, 2:54:19 AM11/8/13
to google-a...@googlegroups.com
Vinny, 

Thanks a lot for the update. I will do that meanwhile Please check and let me know if that happens for datastore queries for you after you try it. You are great. Thanks once again.

Srikanth


Reply all
Reply to author
Forward
0 new messages