diff --git a/package.json b/package.json index 0e783e885b..7d287563e0 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,6 @@ "puppeteer-extra-plugin-capsolver": "^2.0.1", "sql.js": "^1.10.2", "sqlite-vec": "^0.1.4-alpha.2", - "sqlite-vss": "^0.1.2", "srt": "^0.0.3", "systeminformation": "^5.23.5", "tar": "^7.4.3", diff --git a/src/adapters/sqlite.ts b/src/adapters/sqlite.ts index a519b12e28..628d2a624b 100644 --- a/src/adapters/sqlite.ts +++ b/src/adapters/sqlite.ts @@ -1,5 +1,4 @@ import { v4 } from "uuid"; -// import { load } from "../adapters/sqlite/sqlite_vss.ts"; import { load } from "../adapters/sqlite/sqlite_vec.ts"; import { DatabaseAdapter } from "../core/database.ts"; diff --git a/src/adapters/sqlite/sqlite_vss.ts b/src/adapters/sqlite/sqlite_vss.ts deleted file mode 100644 index 14c0307ce8..0000000000 --- a/src/adapters/sqlite/sqlite_vss.ts +++ /dev/null @@ -1,86 +0,0 @@ -// import { statSync } from "fs"; -// import { join } from "path"; -// import { arch, platform } from "process"; -// import { fileURLToPath } from "url"; -// import { Database } from "better-sqlite3"; -// import path from "path"; - -// // Get the file path of the current module -// const __filename = fileURLToPath(import.meta.url); - -// // Get the directory name of the current module -// const __dirname = path.dirname(__filename); - -// const supportedPlatforms: [string, string][] = [ -// ["darwin", "x64"], -// ["darwin", "arm64"], -// ["linux", "x64"], -// ]; - -// function validPlatform(platform: string, arch: string): boolean { -// return supportedPlatforms.some(([p, a]) => platform === p && arch === a); -// } - -// function extensionSuffix(platform: string): string { -// if (platform === "win32") return "dll"; -// if (platform === "darwin") return "dylib"; -// return "so"; -// } - -// function platformPackageName(platform: string, arch: string): string { -// const os = platform === "win32" ? "windows" : platform; -// return `sqlite-vss-${os}-${arch}`; -// } - -// function loadablePathResolver(name: string): string { -// if (!validPlatform(platform, arch)) { -// throw new Error( -// `Unsupported platform for sqlite-vss, on a ${platform}-${arch} machine, but not in supported platforms (${supportedPlatforms -// .map(([p, a]) => `${p}-${a}`) -// .join(",")}). Consult the sqlite-vss NPM package README for details.`, -// ); -// } - -// const packageName = platformPackageName(platform, arch); -// const loadablePath = join( -// __dirname, -// "..", -// "..", -// "..", -// "node_modules", -// packageName, -// "lib", -// `${name}.${extensionSuffix(platform)}`, -// ); - -// if (!statSync(loadablePath, { throwIfNoEntry: false })) { -// throw new Error( -// `Loadable extension for sqlite-vss not found. Was the ${packageName} package installed? Avoid using the --no-optional flag, as the optional dependencies for sqlite-vss are required.`, -// ); -// } - -// return loadablePath; -// } - -// export function getVectorLoadablePath(): string { -// return loadablePathResolver("vector0"); -// } - -// export function getVssLoadablePath(): string { -// return loadablePathResolver("vss0"); -// } - -// // Note: There is a weird bug on linux where the extension is not loaded correctly, so we remove the .so extension - -// export function loadVector(db: Database): void { -// db.loadExtension(getVectorLoadablePath().replace(".so", "")); -// } - -// export function loadVss(db: Database): void { -// db.loadExtension(getVssLoadablePath().replace(".so", "")); -// } - -// export function load(db: any): void { -// loadVector(db); -// loadVss(db); -// } diff --git a/src/test_resources/createRuntime.ts b/src/test_resources/createRuntime.ts index 1bba451229..b64702eb1d 100644 --- a/src/test_resources/createRuntime.ts +++ b/src/test_resources/createRuntime.ts @@ -1,5 +1,4 @@ import { SqliteDatabaseAdapter } from "../adapters/sqlite.ts"; -// import { load } from "../adapters/sqlite/sqlite_vss.ts"; import { load } from "../adapters/sqlite/sqlite_vec.ts"; import { SqlJsDatabaseAdapter } from "../adapters/sqljs.ts"; import { SupabaseDatabaseAdapter } from "../adapters/supabase.ts";