From 133929360b1967a4c1f03504a43c2bb77061d513 Mon Sep 17 00:00:00 2001 From: petersirka Date: Tue, 9 Jul 2024 08:44:54 +0200 Subject: [PATCH] Improved `DATA.query()` method. --- changelog.txt | 1 + querybuilder.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 71ad3b2..73060f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ - added `$.promisify(fn, [a], [b])` method - added `FILESTORAGE().copy(id, path, [callback(err, meta)])` - fixed formatting `0` number in the `Tangular.format` helper +- improved `DATA.query()` method ======================== 0.0.96 diff --git a/querybuilder.js b/querybuilder.js index 6815d14..d319514 100644 --- a/querybuilder.js +++ b/querybuilder.js @@ -340,7 +340,8 @@ CTP.remove = CTP.rem = function(table) { CTP.query = function(table, query, params) { - if (query == null) { + if (query == null || typeof(query) === 'object') { + params = query; query = table; table = 'default/'; } else