totaljs / framework

Node.js framework
http://www.totaljs.com
Other
4.36k stars 450 forks source link

Fail to cleanup NoSQL Embedded on modify #739

Closed aalfiann closed 4 years ago

aalfiann commented 4 years ago

I have fail to cleanup modified data in NoSQL Embedded.

config

name                            : Total.js
author                          : You company name
version                         : 1.0.0
// tried this but not working
nosql-cleaner

user_profile.nosql

-"username":"aalfiann","firstname":"M ABD AZIZ","lastname":"A"}
{"username":"aalfiann","firstname":"M ABD AZIZ","lastname":"ALFIAN"}

Quote from https://docs.totaljs.com/latest/en.html#api~Database

modified data can start with - char and DB performs a cleaner of DB file after some time (within 24 hours, you can change this behaviour in the config file: nosql-cleaner) for useless data

How to clean the useless data properly? Am I miss something?

petersirka commented 4 years ago

Hi, yes this method was missing, but I have added it into the documentation (I'll publish it when will be a new release of Total.js framework --> it will be soon).

NOSQL('yourdb').clean();

Thank you!

fgnm commented 4 years ago

Hi @petersirka any news on nosql-cleaner command?

petersirka commented 4 years ago

Hi, it works correctly:

fgnm commented 4 years ago

Sorry, my bad, I've forgot that all - are now _, just in case you've missed it here there is still the wrong command: https://docs.totaljs.com/latest/en.html#api~Database

Thank you