From 20449b846b73bf8c1a1a088cb94c510c35c6b623 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 25 Mar 2025 04:16:47 -0400 Subject: [PATCH] refactor: clean up database module by removing unused SelectQueryResult type and disabling eslint for explicit any usage --- apps/desktop/src/lib/orm/database.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/apps/desktop/src/lib/orm/database.ts b/apps/desktop/src/lib/orm/database.ts index f0d1a9a..2a08cd6 100644 --- a/apps/desktop/src/lib/orm/database.ts +++ b/apps/desktop/src/lib/orm/database.ts @@ -1,15 +1,8 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import * as schema from "@kksh/drizzle/schema" import * as dbCmd from "@kunkunapi/src/commands/db" -import Database from "@tauri-apps/plugin-sql" import { drizzle } from "drizzle-orm/sqlite-proxy" -/** - * Represents the result of a SELECT query. - */ -export type SelectQueryResult = { - [key: string]: any -} - /** * Loads the sqlite database via the Tauri Proxy. */ @@ -22,11 +15,11 @@ export const db = drizzle( async (sql, params, method) => { let rows: any = [] let results = [] - console.log({ - sql, - params, - method - }) + // console.log({ + // sql, + // params, + // method + // }) // If the query is a SELECT, use the select method if (isSelectQuery(sql)) { rows = await dbCmd.select(sql, params).catch((e) => {