How to use sqlite .dot commands within Enyo?

edited September 2012 in Enyo 1.0
I am thinking of using Sqlite .commands on my sqlite database app, but do not know how to. Basically an onclick function to implement the .command.

for example a .import to import into my database. Any example or pointers appreciated.


  • Someone else with more information may correct me, but I don't think you can do that unless you've got something like a service acting as a middle-man that can drive the SQLite interactive shell.

    And then that service would be responsible for issuing the command and returning the data to your JavaScript.
  • Yeah, WebSQL (the access to SQLite in WebKit) doesn't support dot commands. Things may be different for PhoneGap apps using SQLite as an external plugin.
  • Thanks sugardave and unwiredben. for your responses.

    Basically I was trying to find a way of importing and/or exporting into my pure Sqlite database.

    I seem not to be able to locate my database on the internal media drive like I can for the other apps i.e the ones like 0000000000xx.db for copying to backup. My app also does not appear among the lists in the .app-storage.

    Could this be because I have not submitted the my app? and just developing on my PC?.

    Is there an alternative way of backing up/restoring my pure Sqlite database in enyo?

    help or pointers as usual very much appreciated.
  • This looks more like a webOS question than an Enyo question... you should use the webOS development forums for this.
  • Thanks unwiredben. Shall try and post over there , probably in enyo programming section of webos development forum.
  • Well, this isn't a Enyo question, it's a basic WebKit question -- Enyo doesn't have database code, you're directly calling methods that are implemented by the browser.

    However, I can give you a hint... if anyone responds over there, they won't have a good import solution. It's a question that's been asked on webOS over and over, and the best answers are just versions of "do a lot of transactions at once and figure out a data format that's parsed efficiently".
  • Thanks unwiredben for your feedback and hint. Much appreciated.
Sign In or Register to comment.