A Lesson by Donn Felker
Storing data in Realm is easy. Deleting that same data is just as simple. You can delete object references, lists of data, particular objects, and even delete all the data in a Realm database very easily.
In this lesson you will learn:
- How to delete an object from Realm.
- How to delete an object reference – How to delete the first item from a
- How to delete the last item from a
- The difference between
deleteFromRealm(int location)and the Java
- How to remove an item from a
- How to remove all types of an object from Realm with one call.
- How to delete all data in the Realm database.
- How to delete a Realm based upon its
Code for the Lesson
Pro members: Log in to view the code for this lesson!
Lessons in this course
- Lesson 18: Introduction to Realm for Android Developers
- Lesson 22: Real Time Data Updates with Realms RealmChangeListener
- Lesson 69: Introduction to Realm (Updated)
- Lesson 70: Clean Realm Models with the @RealmClass Annotation
- Lesson 72: Realm Object Relationships: Many-To-One & One-to-One and a simple Link Query
- Lesson 79: Realm – Many-to-Many Relationships
- Lesson 109: Realm Link Queries
- Lesson 163: Realm Group Queries
- Lesson 167: Realm – Introduction to Migrations
- Lesson 168: Realm – Deleting Objects
- Lesson 170: Realm Migrations – Creating Objects and References