You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replacing it with zero sounds fine. I just want to understand why it returns -1. Is that a latent bug in our code or is the sqlite connector behaving badly?
Activity
delgermurun commentedon Jul 24, 2018
@amjith How about replacing
-1with0:) ?drop table fooreturns-1too.myclireturns0on both queries.amjith commentedon Jul 24, 2018
Replacing it with zero sounds fine. I just want to understand why it returns -1. Is that a latent bug in our code or is the sqlite connector behaving badly?
delgermurun commentedon Jul 24, 2018
Not our code's bug.
sqlite3library returnsrowcount=-1andcursor.fetchall()returns[]empty list.amjith commentedon Jul 24, 2018
If the rowcount is unreliable from the sqlite3 library let's not use it at all. We'll just rely on our own counting to report that number.
delgermurun commentedon Jul 24, 2018
Okay. Got it.
delgermurun commentedon Jul 25, 2018
insert,deletequeries return correct row count whilecursor.fetchall()returns[]. So we need to userowcountfor those case, I think.Replace rowcount "-1" with "0". Ref #1
delgermurun commentedon Jul 29, 2018
@amjith I pushed little fix.
amjith commentedon Aug 4, 2018
Works great!