jhubert / javascript-sqlite Goto Github PK
View Code? Open in Web Editor NEWA very simple javascript layer for a browser based SQLite database.
A very simple javascript layer for a browser based SQLite database.
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]'
what you've made is really close to http://www.w3.org/TR/webdatabase/
would be nice to implement it's api so that people can use your script as a polyfill
maybe just a subset of the API.
Hello,
I would like to use my existing SQLite database. How can I use your library to open the existing local SQLite database (i will use it for a HTML5 type mobile app).
Thank you in advance. I don't know if this is the right place, but I had not found any other one.
I'm trying something like:
var db = SQLite({ shortName: 'mydatabase.db', defaultErrorHandler: fail, defaultDataHandler: pass });
db.select('mytable', '*');
Thanks again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.