WebReflection / dblite

sqlite for node.js without gyp problems
MIT License
209 stars 34 forks source link

query with fields object|array fails on empty table #24

Closed johnwebbcole closed 10 years ago

johnwebbcole commented 10 years ago

If you query an empty table with a fields object or array, you get the following error:

/Users/jcole/src/harvester/node_modules/dblite/build/dblite.node.js:296
              result[0].forEach(enrichFields, fields);

This happens if the table is empty or the query returns no rows due to the where clause.

WebReflection commented 10 years ago

Thanks, I'll have a look ASAP.

The reason I won't merge your change is that I need

Will come back ;-)

WebReflection commented 10 years ago

this should have fixed the problem, thanks for the report! https://github.com/WebReflection/dblite/commit/94ec3251b65a5dedaff4e1831ee2851a6b2aa7c5