4

I need to build a self contained appjs application with sqlite3, for win xp 32bit. I myself am running windows 7 32bit and have not been possible to install sqlit3 via npm. I've tried installing all the gyp and correct python code, the errors are numerous and never ending.

Is there a way I can get a zipped version of the sqlite3 node modules for win32 that is precompiled/built so I can A) use it on my system for development and B) give the client without them needing to run any setups?

EDIT I've been googling around reading stuff like building sqlite3 for windows is a nightmare & this https://github.com/developmentseed/node-sqlite3/issues/55 has been linked a few times. Will my client be able to run the app without having to install visual studio or python or is that just the requirement? If so is there any other database that can be self contained without running a database server?

Moak
  • 12,596
  • 27
  • 111
  • 166

1 Answers1

4

Just use a pure Javascript implementation of SQLite like SQL.js

aggsol
  • 2,343
  • 1
  • 32
  • 49
  • Looks good, how is this installed without NPM? There seems to be no documentation – Moak Jun 06 '13 at 15:16
  • @Moak: as node.js always comes with npm I don't understand. You can always use npm for a local install or just copy the source into `$NODE_PATH` – aggsol Jun 07 '13 at 07:24
  • sorry I meant I didn't realize what the install name was `npm install node-sqlite-purejs` I'll be testing today if it's a viable alternative – Moak Jun 07 '13 at 15:41
  • @Romaan When using Duktape you already have C/C++ so you can easily use SQLite directly. – aggsol Dec 10 '14 at 08:12
  • You are right, I developed a wrapper binding function on top of SQLite C API and introduced SQLite global object to be used in JAvaScript. Thanks @CodeClown – Romaan Dec 10 '14 at 22:23
  • 3
    "It uses a virtual database file stored in memory." So it is not acceptable if you want to use large db in your project – Andrey Hohutkin Jul 01 '17 at 17:17
  • @aggsol, This answer is useless. We're talking about persistent storage here. – Pacerier Oct 30 '17 at 21:35
  • The database can easily be persistet as stated in the documentation, see [example](https://github.com/sql-js/sql.js/blob/master/test/test_node_file.js) – aggsol Mar 16 '23 at 08:54