kopia lustrzana https://github.com/micropython/micropython-lib
sqlite3: Auto-execute non-select statements in execute().
rodzic
9ec5ef871a
commit
1d842f4152
|
@ -88,6 +88,9 @@ class Cursor:
|
||||||
print("stmnt", self.stmnt)
|
print("stmnt", self.stmnt)
|
||||||
self.num_cols = sqlite3_column_count(self.stmnt)
|
self.num_cols = sqlite3_column_count(self.stmnt)
|
||||||
print("num_cols", self.num_cols)
|
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):
|
def close(self):
|
||||||
s = sqlite3_finalize(self.stmnt)
|
s = sqlite3_finalize(self.stmnt)
|
||||||
|
|
Ładowanie…
Reference in New Issue