var sqlite = require('sqlite3').verbose(); var db = new sqlite.Database('test.db'); db.all('SELECT * FROM test', null, function (error, rows) { if (error) { console.log(error); } else { rows.forEach(function (row) { console.log(row); }); } }); db.close();
The previous code will produce the following output:
{ [Error: SQLITE_RANGE: bind or column index out of range] errno: 25, code: 'SQLITE_RANGE' }
Changing the second argument of Database#all()
from null
to []
produces the desired output.
This handling of null values is both counterintuitive and undocumented. Other methods may be affected too.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4