tinydb icon indicating copy to clipboard operation
tinydb copied to clipboard

How can we ensure uniqeness when inserting

Open fenchu opened this issue 1 year ago • 1 comments

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.

fenchu avatar Jan 26 '24 10:01 fenchu

I think tinydb is not designed to handle multiple request at the same time. It's clearly stated in the documentation itself. image

A91y avatar Mar 13 '24 16:03 A91y