Skip to content

Instantly share code, notes, and snippets.

View bbeamer's full-sized avatar

beamer bbeamer

  • Paris
View GitHub Profile
//global variable
var id=[];
//declare a promise to handle this treatement
//would be nice to call the same code many times
//use it as a function
Task.spawn(function* () {
let db = yield Sqlite.openConnection({ path: myPath});
try {
@bbeamer
bbeamer / read_sqlite
Last active August 29, 2015 14:26
Read sqlite database using Sqlite.jsm module.
var {Cc, Ci, Cu} = require("chrome");
Cu.import("resource://gre/modules/Sqlite.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Task.spawn(function* () {
let db = yield Sqlite.openConnection({ path: filePath});
try {
// query to select all cols where plate attribute lives