Skip to content

A very simple javascript layer for a browser based SQLite database.

Notifications You must be signed in to change notification settings

jhubert/javascript-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

A very simple Javascript layer for the web based SQLite database.

example usage:

var db = SQLite({ shortName: 'mydb' });

db.createTable('people', 'name TEXT, age INTEGER');

db.insert('people', { name: 'Jeremy', age: 29 });

db.update('people', { age: 30 }, { name: 'Jeremy' });

db.select('people', '*', { age: 30 }, function (results) { var x; for(x=0; x<results.rows.length; x++) { console.log(results.rows.item(x)); } });

db.destroy('people', { age: 30 });

Conditions can be:
  * a number: defaults to 'WHERE id=number'
  * a string: generates 'WHERE string'
  * an array: generates 'WHERE val1 AND val2'
  * a hash:   generates 'WHERE key=hash[key] AND key2=hash[key2]'

About

A very simple javascript layer for a browser based SQLite database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published