How to work with a local database file using Adobe HTML5 Extension?

245 views Asked by At

I am porting an Flash (ActionScript) extension to HTML5 extension. I am storing some data (table format) to a local sql database file (its just a file, no local server is setup). Other crucial information regarding this db file-

  • I'm using the same db file for the InDesign/Photoshop/Illustrator.
  • I can anytime take the backup of this file for future reference.

With the actionscript it was fine. I used flash.data.SQLConnection, flash.data.SQLStatement and was able to execute the queries and read/edit the file.

But how to do the same with the HTML5 extension? I tried using the WebSQL and IndexedDB, integration was fine but some major disadvantages-

  1. The database files are created in the machine's "Temp" folder. - not preferred since it could be deleted anytime (as mentioned above, I can take backup of the database file)

  2. The database files for ID/PS/IL are created in the separate folders - not matching my requirement (as mentioned above, I want to use the same db for all the applications)

    enter image description here

    enter image description here

So I think these web storage mechanisms are not of useful for the Adobe HTML5 Extensions at all!

What approach can I follow instead to achieve what I'm looking for, may be using the vbscript or something, I'm not sure!

I thought of using the simple file-handling (I know with js its not possible, but its supported in the extend script that I can use), but making the queries would be very complex, might effect the performance!

Am kinda stuck here! Any help will be highly appreciated. :)

1

There are 1 answers

0
timbernasley On

Have a look at lawnchair. It is a simple JSON storage lib. You can write a query plugin for it to fit your query needs or use the gnarly lawnchair query plugin 0.6.1.

This should fit your requirements except maybe performance which you'd have to test.