SQLite or Core Data?

How do we persist large datasets in Corona? Will some sort of bridge to SQLite or Core Data be available? Not a fan of the runtime writing out a big plist … SQL type commands would be very useful, returning recordsets in Lua tables.

Thanks,

  • Ian [import]uid: 238 topic_id: 129 reply_id: 300129[/import]

Hi Ian, we understand that SQLite, etc. would be useful for managing persistent data. In practice, we are very use case driven. Assuming there were api’s to expose such functionality in Lua, can you provide a Lua code snippet showing us how you’d envision using such a facility?

[import]uid: 26 topic_id: 129 reply_id: 106[/import]

I don’t have any SQLite/Lua code snippet to show (since I don’t use Lua except my interest in Corona) but here’s a use case for a upcoming project that’s currently targeted for ObjC/Xcode.

I have about 500 rows in a products table, with mostly text in all the columns. There are a bunch of text columns, some reals, with a few integers pointing to another category table.

The reals have GPS coordinates for the products.

I’d use SQL to:
* SELECT via category
* SELECT via strings
* SELECT via numeric comparisons to find products that lie within a certain GPS range. (And yes - looking forward to Core Location support … (-: )

I’m sure I’d have a sexier UI using Corona than spending a *whole* lotta time in Interface Builder and reskinning the UI, and I’d avoid coding a custom OpenGL interface for this particular text-heavy app, but that’s what’s potentially makes Corona a very attractive solution in terms of ROI.

  • Ian
    [import]uid: 238 topic_id: 129 reply_id: 110[/import]

sqlite is in Corona 2.0 beta 3. Please give it a try. [import]uid: 54 topic_id: 129 reply_id: 2417[/import]