kevinmp79
Posts: 0
Joined: Fri Feb 17, 2012 3:10 am

Are Parse queries supported?

I was wondering if it's possible to use Parse queries in tiggzi? I had a look at your tutorial but they don't address the issue of querying data from Parse.

The problem is that the Parse query has to be in the form of a JSON object and not the url variable format which REST mapping supports.

Additionally, would they be able to support the Parse geopoint queries?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Are Parse queries supported?

Sure, it's possible. I looked here: https://parse.com/docs/rest#queries. They are all GET requests and the data is URL encoded (default for GET, --data-urlencoded): ..?param1=value1&param2=value2.

kevinmp79
Posts: 0
Joined: Fri Feb 17, 2012 3:10 am

Are Parse queries supported?

Hi Max,

Unfortunately Parse queries are encoded in one JSON object and not via separate URL parameters so if I were to query an object for a name=john and age=12, it would not be like this http://api.parse.com/1/classes/test/?.... If it were done like that I would be able to use the REST mapping to create the query.

Parse requires that their query need to be encoded into a JSON object so based on the example above the query would be http://api.parse.com/1/classes/test/?..." : "john" , "age" : "12";}. From what I can see that's not supported in the URL mapping.

Can you confirm if Parse queries can be processed? I tried non-queries and they work but I can't get queries working.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Are Parse queries supported?

That's true, but the JSON part is just how Parse expects the value, it's their format that you need to follow. Then the value is URL encoded. From Parse docs:

[quote:]
The value of the where parameter should be encoded JSON. Thus, if you look at the actual URL requested, it would be JSON-encoded, then URL-encoded.
[/quote]

Here is what I did and it works:
Image

code
where {"text": {"$regex": "D"}}
/code

to find all string values that start with letter D.

kevinmp79
Posts: 0
Joined: Fri Feb 17, 2012 3:10 am

Are Parse queries supported?

Thanks Max, I guess my question should be: can this be done using the standard tiggzi tools (e.g. the REST mapping from the REST service) or will I need to write custom JS to handle this?

If this is possible to do using the standard REST service interface and mapping, would you please consider adding this into the Parse tutorial currently on the site?

The tutorial is great but it only covers listing, adding and deleting info and doesn't cover querying which would be an integral part of any application.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Are Parse queries supported?

Sure, I'll add a tutorial on using queries.

We can look at adding such feature but it should be pretty easy to create such format even right now. The JSON should be pretty straight forward, no arrays or objects.

anilsojitra
Posts: 0
Joined: Fri Jan 20, 2012 10:51 am

Are Parse queries supported?

please can you advise whether the you have updated the tutorial with using queries on parse.com

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Are Parse queries supported?

Not yet.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Are Parse queries supported?

OK, finally (sorry for the long delay): http://help.gotiggr.com/documentation...

Return to “Issues”