Skip to content

Commit

Permalink
unix-ffi/sqlite3: Add Connections.commit() function for compatibility.
Browse files Browse the repository at this point in the history
To provide further compatibility between running cpython sqlite3 code
and micropython sqlite3 code the commit function is added. This function
does nothing, as per PEP 249, as micropythons usage of sqlite3 here
always uses autocommit mode.

Signed-off-by: Robert Klink <[email protected]>
  • Loading branch information
rhermanklink committed Jul 31, 2024
1 parent f5b67b2 commit 286a9a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unix-ffi/sqlite3/sqlite3.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def __init__(self, h):

def cursor(self):
return Cursor(self.h)

def commit(self):
pass

def close(self):
s = sqlite3_close(self.h)
Expand Down

0 comments on commit 286a9a0

Please sign in to comment.