From d172233c136e19bcf22e0225dbe41484f99edb36 Mon Sep 17 00:00:00 2001 From: Lewis Daly Date: Mon, 10 Nov 2025 20:35:50 +0100 Subject: [PATCH] remove deprecated `returning` argument from insert() and update() --- src/table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/table.js b/src/table.js index 7da7b8b..f5dbd29 100644 --- a/src/table.js +++ b/src/table.js @@ -10,7 +10,7 @@ class Table { } insert (fields) { - return this._createBuilder().insert(fields, '*').then(inserted => { + return this._createBuilder().insert(fields).then(inserted => { if (inserted.length === 0) { throw new Error(`There was an error inserting the record to ${this._tableName}`) } @@ -20,7 +20,7 @@ class Table { update (criteria, fields) { const builder = this._createBuilder() - return this._addWhere(criteria, builder).update(fields, '*').then(updated => { + return this._addWhere(criteria, builder).update(fields).then(updated => { if (updated.length === 0) return null return updated.length === 1 ? updated[0] : updated })