dariopellegrini / StorageDone-iOS

Swift library to make easy using local document-oriented database in iOS apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Truncate table

emirbeytekin opened this issue · comments

How can i truncate my table? I didn't see any solution

Hello @emirbeytekin . There are no tables here, just documents.
If you mean delete every document of a certain model you can use the delete function.
Here's an example with a model

struct Teacher {
   let id: String
   let name: String
   let surname: String
}

Use delete to delete every document of this model

try database.delete(Teacher.self)

Hope this helps.

thank u for response :) that's work it