Closed joshfoskett closed 8 years ago
Sort does indeed work, with any field of your choice. Not sure what's happening in your case. Can you share this bit of code so I can take a look?
Sorry, the issue appears to be with the way I was calling the database:
function getDatabase() {
return chrome.extension.getBackgroundPage().database;
}
In every other instance, that method worked as it should (for other stuff, like inserting, deleting rows, querying, etc.), and it didn't dawn on me that something as random as sorting would be affected by it, especially when I was getting the results, just not sorted.
As to why using chrome.extension.getBackgroundPage().database
doesn't work specifically when sorting, I have no idea. I was using this method so I didn't have to create two different instances of database within my Chrome extension
(one in the background, and one when a popup was created), but at the end of the day I doubt it matters all that much. It would appear that having two different instances is an issue, as it doesn't realize that change until it has been reloaded.
I'm attempting to sort
mapId
's in ascending order:However, it doesn't appear to be working:
As you can see, it is not sorting the
mapId
in ascending order, but instead by theID
. I also have no errors, so I'm not sure why it isn't working. I've looked at the docs, and it would appear that I'm doing everything correctly?