Is there a way to get just top one row in IndexedDB? I could not find anything for it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since I could not find anything so this is what I have had put in place now and it works great for my purpose. It is a hack and I’m not happy with it, but hey, for now, this will do.
I’m just storing one row as that I need in that database. And on read, I get all the rows and perform the action I need, which is only one row. When I’m inserting a new row, I’m just clearing the entire database, which is again only one row and inserting a fresh row in it.
@spiderdevil, I just saw your answer and am not sure if I will be able to try aborting the transaction, but if it works for anyone else for sure, please do share it in comments.