I found a previous thread suggesting that using a sharedobject allows saving of persistent LOCAL data with openfl. What I’d like to do is be able to open, read, and write to, an sqlite database.
All the packages I can find for sqlite seem to be based on sys, so can’t be targeted on HTML5. Once I have defined my sqlite database as a shared object, is there a way I can connect/read/write information to it that I’m missing?
On the web, there was a Web SQL proposal, which I believe has failed to be adopted by Mozilla, and (correct me someone if I am wrong?) IndexedDB may be the future here:
Thanks for this. From a practical point of view, how would you implement the ability to send queries to the database?
When I can access sys I use the following:
import sys.db.Sqlite;
public var localDB = Sqlite.open("localDB.db");
var titleQuery = localDB.request("SELECT title FROM game WHERE id ="+gameId+"");
I can’t see how I would implement something similar to this using a shared object.
var localDB = SharedObject.getLocal("localDB.db"); //loads it in, but I don't think this is the same as making a connection I can operate on.
var titleQuery = ..?