Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get data from Parse.com database

I am trying to use parse.com for my android application. I read the tutorial and I am able to insert the data but how do I retrieve it. I have attached the image of the my database

How to retrieve data of all the client Names from that database?

enter image description here

like image 717
user1169079 Avatar asked Jun 21 '13 13:06

user1169079


People also ask

What database does parse use?

Parse Server uses MongoDB or PostgreSQL as a database. You can deploy and run Parse Server on your own infrastructure. You can develop and test your app locally using Node.

Is Parse better than Firebase?

Parse Server has long-term stability compared to any such vendor-based platform. Parse Server is undoubtedly better than Firebase to develop Android, iOS, or web application APIs with a strong community background and feature-rich open-source platform.


1 Answers

You can get the values this:

ParseQuery<ParseObject> query = ParseQuery.getQuery("UserMaster");
        query.whereEqualTo("userName",user_name);
        query.findInBackground(new FindCallback<ParseObject>() {
            @Override
            public void done(List<ParseObject> userList, ParseException e) {
                dlg.dismiss();
                 Log.d("klakla", "get: " + e+userList.size());
                 if (e == null) {
                     if (userList.size()>0) {

                     for (int i = 0; i < userList.size(); i++) {
                         ParseObject p = userList.get(i);                       
                      email = p.getString("email");
                      password  = p.getString("password");
                        } }

                    }
                 else {
                        Log.d("score", "Error: " + e.getMessage());
                       // Alert.alertOneBtn(getActivity(),"Something went wrong!");
                    }   
            }
        });
like image 120
userAndroid Avatar answered Oct 10 '22 18:10

userAndroid