Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Queries with empty values from parse.com

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.

like image 561
user986047 Avatar asked Aug 19 '26 22:08

user986047


1 Answers

What you want are whereExists and whereDoesNotExist.

query.whereDoesNotExist("MyColumn");
like image 105
Timothy Walters Avatar answered Aug 21 '26 11:08

Timothy Walters



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!