Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we ensure uniqeness when inserting #553

Open
fenchu opened this issue Jan 26, 2024 · 1 comment
Open

How can we ensure uniqeness when inserting #553

fenchu opened this issue Jan 26, 2024 · 1 comment

Comments

@fenchu
Copy link

fenchu commented Jan 26, 2024

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.

@A91y
Copy link

A91y commented Mar 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants