-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from MarcoMandar/main
sqlite_vss issue
- Loading branch information
Showing
8 changed files
with
592 additions
and
166 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as sqliteVec from "sqlite-vec"; | ||
import { Database } from "better-sqlite3"; | ||
|
||
// Loads the sqlite-vec extensions into the provided SQLite database | ||
export function loadVecExtensions(db: Database): void { | ||
try { | ||
// Load sqlite-vec extensions | ||
sqliteVec.load(db); | ||
console.log("sqlite-vec extensions loaded successfully."); | ||
} catch (error) { | ||
console.error("Failed to load sqlite-vec extensions:", error); | ||
throw error; | ||
} | ||
} | ||
|
||
/** | ||
* @param db - An instance of better - sqlite3 Database | ||
*/ | ||
export function load(db: Database): void { | ||
loadVecExtensions(db); | ||
} |
Oops, something went wrong.