Last active
October 4, 2017 21:40
-
-
Save euoia/e2c76631a95c98ac7c3a31f0a333f3f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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