From 3263706d5748078f707db354dd980c65213b8ced Mon Sep 17 00:00:00 2001 From: Nikiroy78 <35032449+Nikiroy78@users.noreply.github.com> Date: Thu, 21 Apr 2022 14:52:46 +0300 Subject: [PATCH] Add getIndex function --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 70eb4d9..3b1bb8f 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -// const sqlite3 = require('sqlite3').verbose(); // Пошли в пизду со своим ассинхроном, ублюдки! +// const sqlite3 = require('sqlite3').verbose(); // Пошли в пизду со своим асинхроном, ублюдки! const sqlite3 = require('better-sqlite3'); @@ -42,6 +42,9 @@ class database { ToString(value) { return typeof(value) === 'string' ? '\'' + value + '\'' : value; } + getIndex (table, indexColumn) { + return this.get(table).length; + } execute(SQLRequest) { try { return this.db.prepare(SQLRequest).all();