Skip to content

Instantly share code, notes, and snippets.

@euoia
Last active October 4, 2017 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save euoia/e2c76631a95c98ac7c3a31f0a333f3f4 to your computer and use it in GitHub Desktop.
Save euoia/e2c76631a95c98ac7c3a31f0a333f3f4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
const db = require('sqlite');
db.open('tiles.db')
.then(db => db.prepare('select data from TestTable'))
.then(qry => {
const insertAll = () => qry.get().then(row => {
if (!row) {
return;
}
console.log(row);
insertAll();
});
insertAll();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment