HTML Compiler and sqlite?


Bryce Beattie
Any chance you might someday build in a way to directly work will sqlite databases? I'm starting to put together a solution that uses appGetCmdOutput to run sqlite3.exe commands and parse the output, but there will be some quirks. I think they could be avoided if the app could access the db via the dll instead.

decsoft

Hello Bryce,

Right now we are really, really busy, preparing the first public release of the new DecSoft App Builder, so, it's not possible to promise nothing right now, and, it's not our style to lie to the people saying "yes" to all... without the intention to do nothing...

After the publication of the new DecSoft App Builder, we want to improve DecSoft HTML Compiler: it's our intention, but, we don't decide what exactly we want to do. So, at that time, we will take a look at SQLite and what we can do around it.



Bryce Beattie
Fair enough, thanks. Best of luck with the new App Builder!

decsoft

Thanks Bryce! :-)



Amin Mousavi
Bryce Beattie, PhoneGap has a SQLite plugin that you can install on App builder and use. I have not used in AB myself to give you the details but since I am using other phone gap plugins here, you should be okay. On a general note though, I recommend you to stick to objects and arrays and store them in local storage if your data is small. Running SQLite and the errors is causes when building the app on cordova is a pain in the neck. So after a few month of use we got rid of it and wend back to good and easy to use objects and local storages. Hope it helps

Bryce Beattie

Amin, thanks for the heads up. Right now, I'm mostly using HTML Compiler rather than the App Builder, And I've come up with 2 solutions to use databases. The first was because I had a large dataset in sqlite format, so I wrote an interface that uses the command line version of sqlite, and parses out the text it returns. That one has some issues, but works well enough fetching data, which is what I really needed it for.

The second solution was to use an in-memory javascript database that has some concept of persistence built in. I'm using loki.js, and all I had to do was write a handler that takes a serialized version of the database and reads/writes it to a file via HTML Compiler's file functions. This wouldn't be ideal for an enormous database, but it's been working great for the projects I've been working on. I should probably post that code somewhere.


Amin Mousavi
Is it mandatory for your purpose to handle the data on the client side? I find managing the large amount of data on the client side frustrating! Great to know you have sorted the issue out :)

decsoft

Hello to all,

This post is just to mention that with the new generation of DecSoft HTML Compiler, now it's possible to deal with SQLite databases using the SQL.js library. Take a look at this release information post.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.