tinydb
tinydb copied to clipboard
How can we ensure uniqeness when inserting
Since the tinydb is an array of loglines, how can I ensure uniquness on those loglines,
Currently each logline is an hash with my unique id, so I need to add it to a hash and then save it back again. this takes time. Especially when the structure grow.
Would be nice if we could set like max1000 lines and use my id as the identifier.
I do not have this problem when app runs singlethreaded. But has become a pain not lots of people using it.
I think tinydb
is not designed to handle multiple request at the same time. It's clearly stated in the documentation itself.