Parse.com get value with query

前端 未结 3 1292
说谎
说谎 2021-01-06 16:39

I\'ve been looking for an example on how to use Parse.com queries. It\'s been really vague. I think it should start with:

ParseQuery query=ParseQuery.getQuer         


        
3条回答
  •  鱼传尺愫
    2021-01-06 17:34

    Parse's Android Guide has a basic query example here which will return the first object which matches your constraints:

    ParseQuery query = ParseQuery.getQuery("YourClassName");
    query.whereEqualTo("ID", "someID");
    query.getFirstInBackground(new GetCallback() {
      public void done(ParseObject object, ParseException e) {
        if (object == null) {
          Log.d("score", "The getFirst request failed.");
        } else {
          Log.d("score", "Retrieved the object.");
        }
      }
    });
    

提交回复
热议问题