eatonphil/dbcore

sqlite reader fails

Closed this issue · 2 comments

setop commented

I fixed it by replacing

pk = (SELECT 1 FROM sqlite_master WHERE tbl_name=$name AND sql LIKE '%%AUTOINCREMENT%%'),

by

(SELECT count(1) FROM sqlite_master WHERE tbl_name="entry" AND sql LIKE '%%AUTOINCREMENT%%'),

You'll have to give more detail but the SQLite reader is part of automated testing currently so it is definitely supported.

setop commented

Your test probably makes the assumption that primary key is always "AUTOINCREMENT" which is not always the case.

I reproduced it using your "todo" example. If I remove "AUTOINCREMENT" for table "notes" then dbcode fails.