Closed umersheikh-projectmarker closed 1 year ago
Ok, by default it should reset the auto increment. Let me check and get back to you.
I checked auto increment is always reset to zero when clearing. I also added some test cases.
Let me check, why it is not working for me then. BTW, I am using "jsstore": "^4.5.0",
.
yeah that's the latest version, please check and let me know.
closing, feel free to reopen if required.
Summary
Clear() function does empty the table but a flag should be passed as parameter to reset the auto_increment sequence.
Basic example
await connection.clear(table_name, reset_auto_increment = false);
Motivation
I need to clear table's data as well as resetting auto increment so the field doesn't get overflow or impact performance due to bulk of data has been cleared.