Skip to content
Switch branches/tags
Go to file
This branch is 1 commit ahead, 2 commits behind cloudcrypt:master.

Latest commit


Git stats


Failed to load latest commit information.

SQLite Universal WinJS Component

SQLite Universal WinJS Component for Javascript Windows Store Apps running on the Windows 10 Universal App Platform.


SQLite Universal WinJS consists of two parts: 1) WinRT C++ universal component named SQLite3Component and 2) A JavaScript file called SQLite.js that builds upon the component and simplifies use.

To use this component, copy the SQLiteUniversalWinJS folder to the root of your app's solution folder. Then in Visual Studio, go to File -> Add -> Existing Project, and choose the file SQLiteUniversalWinJS.vcxproj found in *[YourSolutionFolder]\SQLiteUniversalWinJS*
Next, add a reference to the component in your app solution's main project in Visual Studio by going to Project -> Add Reference ... , where you go to Projects, and enable the SQLiteUniversalWinJS project as a reference.
Finally, copy the JavaScript file SQLite.js from the WinRT Javascript Helper Files folder to the js folder in your solution's main project, and reference it in your default.html file to use it.


The SQLite3JS namespace provides an async JavaScript API for SQLite. It is built around the Database object that can be obtained using SQLite3JS.openAsync(). The API was inspired by [node-sqlite3][2].


var dbPath = Windows.Storage.ApplicationData.current.localFolder.path + '\\db.sqlite';
.then(function (db) {
  return db.runAsync('CREATE TABLE Item (name TEXT, price REAL, id INT PRIMARY KEY)')
  .then(function () {
    return db.runAsync('INSERT INTO Item (name, price, id) VALUES (?, ?, ?)', ['Mango', 4.6, 123]);
  .then(function () {
    return db.eachAsync('SELECT * FROM Item', function (row) {
      console.log('Get a ' + + ' for $' + row.price);
  .then(function () {


This is a port of the Windows 8.1 Component by Dave Risney found at
The project was changed to be independent of the SQLite for Universal App Platform extension and with the possibility to use database encryption.
For the encryption wxSQLite is used:
For the database function the project SQLite3-WinRT is used as it fits my needs better:


SQLite Universal WinJS Component with databse encryption




No releases published


No packages published