Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: d45e852176
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (38 sloc) 1.774 kB


Async SQLite for WinRT (Windows Metro) applications.


Please note that SQLite3-WinRT is in an early stage of development. The API is incomplete, still likely to change, and it hasn't been used in apps published via the Windows Store, yet. Nonetheless, SQLite3-WinRT is intended for production use and Windows Store compatibility, and it will mature as the Windows 8 platform itself matures. Feedback and contributions are highly appreciated, feel free to open issues or pull requests on GitHub.

SQLite3JS Namespace

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.


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 (db) {
    return db.runAsync('INSERT INTO Item (name, price, id) VALUES (?, ?, ?)', ['Mango', 4.6, 123]);
  .then(function (db) {
    return db.eachAsync('SELECT * FROM Item', function (row) {
      console.log('Get a ' + + ' for $' + row.price);
  .then(function (db) {

SQLite3 WinRT Component

In addition to the JavaScript API, SQLite3-WinRT contains a WinRT component DLL called SQLite3. This component is the basis for SQLite3JS, but it can also be used directly, e.g. in a C# app.


Copyright (c) 2012 doo GmbH

Licensed under the MIT License, see LICENSE file.

Jump to Line
Something went wrong with that request. Please try again.