From cd6b2547bcae4ead2fc052a22c7d7dcaf9de907a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9E=9C=E5=B1=B1=E5=A4=A7=E5=9C=A3?= <316783812@qq.com> Date: Fri, 22 Dec 2023 18:28:45 +0000 Subject: [PATCH] fix: use array function --- index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 3f247ef..8034e73 100644 --- a/index.js +++ b/index.js @@ -7,14 +7,10 @@ function db(format, path) { this.path = path || '.'; // add properties to this - this.query = function(query, format){ - return chdb.Execute(query, format || this.format); - }.bind(this); - this.session = function(query, format, path) { - return chdb.Session(query, format || this.format, path || this.path); - }.bind(this); + this.query = (query, format) => chdb.Execute(query, format || this.format); + this.session = (query, format, path) => chdb.Session(query, format || this.format, path || this.path); - return this; (implicitly) + return this; } module.exports = { chdb, db };