Migrate to deno v2.x

This commit is contained in:
2024-10-28 12:25:43 +08:00
parent b959837f1b
commit 0df60ff87c
4 changed files with 11 additions and 6 deletions

8
db.ts
View File

@@ -1081,19 +1081,19 @@ export class EhDb {
}
async flock() {
if (!this.#file) return;
await eval(`Deno.flock(${this.#file.rid}, true);`);
await this.#file.lock();
}
dblock() {
if (!this.#dblock) return;
eval(`Deno.flockSync(${this.#dblock.rid}, true);`);
this.#dblock.lockSync();
}
async funlock() {
if (!this.#file) return;
await eval(`Deno.funlock(${this.#file.rid});`);
await this.#file.unlock();
}
dbunlock() {
if (!this.#dblock) return;
eval(`Deno.funlockSync(${this.#dblock.rid});`);
this.#dblock.unlockSync();
}
get_client_config(uid: number | bigint, client: string, name: string) {
const d = this.db.queryEntries<ClientConfig>(