Обновление пакетов pkg и sqlite

This commit is contained in:
Book Pauk
2021-10-19 02:48:08 +07:00
parent d21997c918
commit cc3f82d693
3 changed files with 783 additions and 403 deletions

View File

@@ -1,4 +1,6 @@
const sqlite3 = require('sqlite3');
const sqlite = require('sqlite');
const SQL = require('sql-template-strings');
class SqliteConnectionPool {
@@ -17,7 +19,10 @@ class SqliteConnectionPool {
this.waitingQueue = [];
for (let i = 0; i < connCount; i++) {
let client = await sqlite.open(dbFileName);
let client = await sqlite.open({
filename: dbFileName,
driver: sqlite3.Database
});
client.configure('busyTimeout', busyTimeout); //ms
await client.exec(`PRAGMA cache_size = ${cacheSize}`);