Sweetch 0.0.1-alpha has been released. It’s an “alpha preview” release to allow people to play with the project. You’ll find sample code below.
/* Always use addOnLoad since it’s the only way to be sure * that all sweetch features are available. */ dojox.sql.addOnLoad(function() { // dojox.sql uses SQLite syntax dojox.sql(’CREATE TABLE IF NOT EXISTS myTable(id INTEGER PRIMARY KEY AUTOINCREMENT, label TEXT)’); var rows = dojox.sql(’SELECT id, label FROM myTable’); var r; while( r = rows.next() ) { console.info(r.id + ‘: ‘ + r.label); } var results = dojox.sql(’INSERT INTO myTable(label) VALUES(’Give me one more line ‘ + new Date())); console.info(’New record id ‘ + dojox.sql.lastInsertId()); });