I am very new for GreenDao . I just started one week ago on GreenDao. Now i have one problem , I have one android app that have approx 10MB data base , then i planed to store only last 30 day data in mobile database. Then what happen my content of database get deleted or you can say sync to server but still it size getting increase day-by-day. That means database content get deleted but it doesn't release their occupied space in memory. So i want to clean up database. Even i search about vacuum , but as i told i didn't have any idea how to use it in GreenDAO. Thanks in advance to all .
Asked
Active
Viewed 1,495 times
0
-
Could you post the code. How are you reducing the data to the last 30 days? – AlexS May 23 '14 at 11:07
-
@AlexS.. First thanks for your response. Sorry i cant post code because it contain lot of URL and it about 310 line of code. I hope you can understand and never mind. – DJhon May 23 '14 at 11:27
1 Answers
1
You should use TRUNCATE query for delete all data and free space...

Umang Kothari
- 3,674
- 27
- 36
-
Thanks :).. But as i told i am very new for GeenDao and ORM framework . will please suggest me some tutorial from beginners level to advance level.? – DJhon May 23 '14 at 11:29
-
@BlueGreen..hard to find document for GreenDao,if you dont read this http://greendao-orm.com/documentation/how-to-get-started/ then plz read first and download this [demo](https://github.com/greenrobot/greenDAO) – Umang Kothari May 23 '14 at 11:35
-
@Umang.. I go through this official documentation but if i am working with ERP kind of project for android , then what you think is it helpful for me ? That is tragedy with me... bro... :( But really i am thanks-full for your response. – DJhon May 23 '14 at 11:45
-
welcome man...please tell me why you use GreenDAO apart from ORMLite(another ORM) ..?? – Umang Kothari May 23 '14 at 11:48
-
Yes man that is pain for me... As our client requirement:( ... I know i can find many tutorial on ORMLite.. But GreenDAO is Still VIRGIN.. – DJhon May 23 '14 at 12:07
-
-