Then again, comparisons like that may be more costly because of branching than calling tonumber on all elements... not sure though, would need to benchmark to see.
That's probably going to affect only game loading, right? uh... anyway, when I finish registering ALL entries I'll return to this issue and check if performance was hurt along the way. Thank you for pointing that out.
raidho36 wrote:At this point I'm just talking out of my ass here because this library is nothing like I expect it would be like. It uses callbacks yet it's not async? It outputs numerical values as strings? I don't know what the hell is wrong with that thing.
LOL me neither! But the 'number as strings' thing is perhaps a problem with my database schema. I tested this:
raidho36 wrote:At this point I'm just talking out of my ass here because this library is nothing like I expect it would be like. It uses callbacks yet it's not async? It outputs numerical values as strings? I don't know what the hell is wrong with that thing.
It is supposed to be asynchronous (at least sometimes), otherwise stuff like db:interrupt and db:progress_handler wouldn't make any sense. Although, it does seem to do stuff immediately sometimes, for example with a fast query if you print the return code from exec and print something from within the callback, the callback prints can show up first.
SQLite uses dynamic typing, so column types are more like "suggestions," they're not actually required or enforced. They should be used for things like trying to return the values in the desired format, probably, so that's more of an issue with the driver.