INNER CODE UNIT · TypeScript

isVecAvailable

margelo/react-native-nitro-sqlite · packages/react-native-nitro-sqlite-vec/src/index.ts:55

export function isVecAvailable(db: NitroSQLiteConnection): boolean {
  try {
    vecVersion(db)
    return true
  } catch {
    return false
  }
}

/** Create a `vec0` virtual table if it does not already exist.
 * Executes synchronously. An existing table is left as it is, even if its
 * definition differs from `options`.
 * @param db Open NitroSQLite connection with sqlite-vec enabled.
 * @param table Trusted SQL table identifier, interpolated into the statement.
 * @param options Vector dimensions, storage type, metric, and trusted column identifier.
 */
export function createVectorTable(
  db: NitroSQLiteConnection,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…