I am trying to get the rowcount
of a sqlite3
cursor
in my Python3k program, but I am puzzled, as the rowcount
is always -1
, despite what Python3 docs say (actually it is contradictory, it should be None
). Even after fetching all the rows, rowcount
stays at -1
. Is it a sqlite3
bug? I have already checked if there are rows in the table.
I can get around this checking if a fetchone()
returns something different than None
, but I thought this issue would be nice to discuss.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…