I've started to explore using web databases (in this case the database in chrome) that you can run calls on using javascript. On document load, I begin by running the following function:
dbUtils = {
db : null,
initDatabase : function(){
try
{
if(window.openDatabase)
{
this.db = openDatabase("testDB", "1.0", "Test Database", 2*1024*1024);
}
}
catch(e)
{
alert("There was an error loading the database");
}
}
};
What I'm wondering is, is there a way to verify that the testDB exists OR if it already has any tables? Also is there a way I can list out all the table names that are within the database? This test is just to figure out if I should be initializing the user database with new data or if I should be using pre-existing data. I've been searching around for the solution but I cannot seem to be finding anything. I'm not sure if I'm putting in the wrong search terms, should I be searching under webDB? Or is there other terminology/names I should be using?
Thanks for your help!