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
Pouch DB PUT doc insert issue - question #8446
Comments
What you are observing is correct. This is explained thoroughly in the CouchDB documentation 3.2.2.5. Collation Specification
emphasis mine A thorough read of that section will provide a solid grasp of the collation rules. |
any way to solve this i cant able to find the correct way to sort the numbers in correct order can you help me with that |
Best asked on https://stackoverflow.com edit: However:
But the field |
want to convert the key from string to int ? |
In PouchDB, document ids must be strings, they can not be numbers. In order to do what you want, you need to create a view with a map function that looks like this: function (doc) {
emit(Number(doc._id)
} this will give you a view query result that is sorted by the number value of the document |
Issue
i am working on small form in electron and pouch db
when we inserting a data to db , until the nineth doc it inserting perfectly , but on 10 the doc it is inserting and second position of doc instead on inserting into last
images :
form ui
before inserting the 10th doc
After inserting 10 th doc
here attached the js code
inserting until nineth 9th doc its perfectly inserting
but when we insert the 10 th doc it is inserting in second position
i debuged , but cannot able to find solution can anyone help me with the solution
Thank you
Info
The text was updated successfully, but these errors were encountered: