sqlite3: Auto-execute non-select statements in execute().

pull/118/head^2
Paul Sokolovsky 2014-06-09 01:59:02 +03:00
rodzic 9ec5ef871a
commit 1d842f4152
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -88,6 +88,9 @@ class Cursor:
print("stmnt", self.stmnt)
self.num_cols = sqlite3_column_count(self.stmnt)
print("num_cols", self.num_cols)
# If it's not select, actually execute it here
if not sql.startswith("SELECT"):
self.fetchone()
def close(self):
s = sqlite3_finalize(self.stmnt)