iphonedatabasehaxenme

Persisted data on iPhone with Haxe


I'm somewhat new to Haxe/NME and am a bit confused about what the best approach would be to access data that would traditionally be stored in a database. I have some code where I need to get a list of possible values based on a given input and I'm targeting iPhone / Android. Is Sqlite the 'best' way to go?

Basically, with SQL, I would want to execute a simple statement such as this:

SELECT x FROM some_table WHERE name = 'y'

I suppose I could build up some matrix or array of data (however with thousands of records I feel this might be a bit clunky) completely within my Haxe application but I was wondering if there was a more commonly accepted approach to this.


Solution

  • Just use an SQLite repository and save it in the documents folder of your app? A more common approach is to use Core Data but either is a perfectly fine way to go