summaryrefslogtreecommitdiff
path: root/src/db.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.mjs')
-rw-r--r--src/db.mjs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/db.mjs b/src/db.mjs
index b82cb18..7d6c6c5 100644
--- a/src/db.mjs
+++ b/src/db.mjs
@@ -3,6 +3,7 @@ import fs from "node:fs";
import path from "node:path";
import process from "node:process";
import url from "node:url";
+import util from "node:util";
import sqlite from "./sqlite.cjs";
@@ -12,9 +13,9 @@ import * as accretion from "./accretion.mjs";
export const promisifyDb = dbHandle => ({
ref: dbHandle,
- all: u.promisify((...args) => dbHandle.all(...args)),
- exec: u.promisify((...args) => dbHandle.exec(...args)),
- run: u.promisify((...args) => dbHandle.run(...args)),
+ all: util.promisify((...args) => dbHandle.all(...args)),
+ exec: util.promisify((...args) => dbHandle.exec(...args)),
+ run: util.promisify((...args) => dbHandle.run(...args)),
each: (...args) =>
new Promise((resolve, reject) => {
const cb = args[args.length - 1];
@@ -28,8 +29,8 @@ export const promisifyDb = dbHandle => ({
new Promise((resolve, reject) => {
const mkStmt = stmtRef => ({
ref: stmtRef,
- run: u.promisify((...args) => stmtRef.run(...args)),
- finalize: u.promisify((...args) => stmtRef.finalize(...args)),
+ run: util.promisify((...args) => stmtRef.run(...args)),
+ finalize: util.promisify((...args) => stmtRef.finalize(...args)),
});
const ref = dbHandle.prepare(
...args,