Skip to content

Commit 2968a65

Browse files
authored
Merge pull request #5 from marekyggdrasil/master
including the last inserted row id if available
2 parents 46601d4 + 065508e commit 2968a65

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sqlite_rx/server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ def execute(self, message: dict, *args, **kwargs):
247247
if error:
248248
return zlib.compress(msgpack.dumps(result))
249249

250+
if self._cursor.lastrowid:
251+
result['lastrowid'] = self._cursor.lastrowid
252+
250253
try:
251254
result['items'] = [row for row in self._cursor.fetchall()]
252255
return zlib.compress(msgpack.dumps(result))

0 commit comments

Comments
 (0)