How to delete a column in Parse.com using Swift - ios

How do I delete a column in Parse using Swift? I am new to Parse. I have looked at the Parse documentation, but could not figure it. After trying many variations of the docs in my code nothing has worked. If it is not possible to delete a column, then how do I delete a row.

In your example code, QuestionsandAnswers is an object, not a class.
If you really intend to delete a class, that is now possible with the Schema API that the Parse team just released: http://blog.parse.com/announcements/releasing-the-schema-api/
Here is the specific documentation for removing a class which you can do with cURL or Python: https://parse.com/docs/rest/guide#schemas
Good luck (and be careful). :)

Related

Reserving rows from Parse using Pointers

I'm trying to retrieve rows from a class called Consultations using a column called userPointer. It should be straight forward but I've been struggling with this for couple of days:
Let us for example say I would like to get the first object
where userPointer = ttnRYrdu0J
Note: I will replace ttnRYrdu0J with PFUser.current() later to be dynamic if this works.
I wrote the code like this:
Unfortunately it doesn't work, however when I use any other columns such as objectId or type it works fine.
Any help please!!
Thanks
I've got the answer I used PFUser.current() instead of hard coding it which is what I want at the end because I want to show the consultations of the current user and it worked! I'm still confused why it is not working when I hard code the value but I got what I want.

How to merge streams in flutter?

I'm trying to query 2 collections from firebase and put it in a streambuilder.
There are lot of questions like this,but a lot of them are unsolved,or I just didn't really found the right one.
So,I got a users,and a salons collection in Firebase.
user1 contains his name,age,etc and he have another collection called favsalons. In salons are the description of salons like name,owner,etc
In app I want to list out the favsalons with their datas.
In SQL it would look something like this : Select salons.name,salons.owner From salons,user Where userID=user1 and favsalonsID=salonsID
Since I'm new to flutter,and to the non SQL databases,I got no clue how to do it.
Is there a simple solution?
You can't... You need to modify the structure of your data.
Watch the firebase team explanation.
Solved with simply nesting two streambuilders.

How can I store comments for a post using Parse & Swift?

I'm honestly stumped as to how I could do this. I've been searching and trying out different methods for the past day or so and none have worked. What I'm basically trying to do is store comments for a post (Each row represents a post). I've been reading through the Parse documentation and have tried to implement some of the things that they have there into my code in order to achieve this, but that hasn't worked out either. If anybody could help me out, I'd be extremely greatful.
This exact task is the example provided in the documentation.
http://docs.parseplatform.org/ios/guide/#relational-data
You need to create a new class called "Comments" and then refrence its parent post as one of it's columns.

Delete rows in CloudBoost using conditions

Is there a quick way to delete rows in a CloudBoost database without sending an ID as parameter?
For example, imagine that I have a list of Dogs and would like to delete those whose color is white.
Looking in the documentation, I could create a CloudQuery to retrieve all Dogs that matches this condition and then call CloudObject.deleteAll to remove all of them. The problem in this solution is that I needed to retrieve all the data to be able to remove them.
Is there any straightforward solution for this problem to avoid making unnecessary requests to the server?
currently, cloudboost has no option like this that you are looking for. To delete you have to first fetch cloudobjects then deleteall(). Anyway, you can contact cloudboost team and request for this feature. I am sure they will help you out on this.

Sorting Restkit objects in ascending order

Can you help me.Actually i'm using restkit in my project,i have done all my works in this project except this.In here,have to shortlist several restkit objects with key param(class object) as activity_created.pls find my code in below screenshot and give me the better solution.
this code just reverse my list.
Thanks to answer me Guys.i found solution for my question,as follows
and this is working fine..

Resources