From cc8fd374742d21c3d0ef9098c59e907c288d48ae Mon Sep 17 00:00:00 2001 From: Karolis Narkevicius Date: Thu, 17 Dec 2020 12:50:14 +0000 Subject: [PATCH] Unbreak sqlite support, extract id correctly for all DBs --- lib/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/index.js b/lib/index.js index c744eff..86a4e3e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -234,6 +234,8 @@ class Service extends AdapterService { if (data[this.id] !== undefined) { id = data[this.id] + } else if (!returning.length) { + id = rows[0] } else if (rows[0] && rows[0][this.id]) { id = rows[0][this.id] }