Queries with empty values from parse.com

℡╲_俬逩灬. 提交于 2019-12-13 02:00:43

问题


Somehow I couldn't find the answer to this.

I am running a query to parse.com and want to download all of the rows that contain an empty value in one of my columns.

 ParseQuery<ParseObject> query = ParseQuery.getQuery(Constants.myTestTable);
    query.whereEqualTo("MyColumn", "");

When I upload a csv to parse where MyColumn does not have any value the column cells on parse show "(undefined)" and I cannot retrieve the data. However, when I delete all content in the cell I am able to retrieve it. I want to be able to retrieve the data if the cell has the default "(undefined)" value from parse. I tried...

ParseQuery<ParseObject> query = ParseQuery.getQuery(Constants.myTestTable);
        query.whereEqualTo("MyColumn", null);

But that did not work either. I'm sure there is an easy solution to this, I just can't get the dang thing to work.


回答1:


What you want are whereExists and whereDoesNotExist.

query.whereDoesNotExist("MyColumn");


来源:https://stackoverflow.com/questions/24463734/queries-with-empty-values-from-parse-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!