New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vectordb

Package Overview
Dependencies
Maintainers
5
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vectordb - npm Package Compare versions

Comparing version 0.15.1-beta.3 to 0.16.0

7

dist/index.d.ts

@@ -397,2 +397,8 @@ import { type Schema, Table as ArrowTable } from "apache-arrow";

/**
* Drop an index from the table
*
* @param indexName The name of the index to drop
*/
dropIndex(indexName: string): Promise<void>;
/**
* Instrument the behavior of this Table with middleware.

@@ -652,2 +658,3 @@ *

dropColumns(columnNames: string[]): Promise<void>;
dropIndex(indexName: string): Promise<void>;
withMiddleware(middleware: HttpMiddleware): Table<T>;

@@ -654,0 +661,0 @@ }

5

dist/index.js

@@ -24,3 +24,3 @@ "use strict";

const util_1 = require("./util");
const { databaseNew, databaseTableNames, databaseOpenTable, databaseDropTable, tableCreate, tableAdd, tableCreateScalarIndex, tableCreateVectorIndex, tableCountRows, tableDelete, tableUpdate, tableMergeInsert, tableCleanupOldVersions, tableCompactFiles, tableListIndices, tableIndexStats, tableSchema, tableAddColumns, tableAlterColumns, tableDropColumns
const { databaseNew, databaseTableNames, databaseOpenTable, databaseDropTable, tableCreate, tableAdd, tableCreateScalarIndex, tableCreateVectorIndex, tableCountRows, tableDelete, tableUpdate, tableMergeInsert, tableCleanupOldVersions, tableCompactFiles, tableListIndices, tableIndexStats, tableSchema, tableAddColumns, tableAlterColumns, tableDropColumns, tableDropIndex
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -434,2 +434,5 @@ } = require("../native.js");

}
async dropIndex(indexName) {
return tableDropIndex.call(this._tbl, indexName);
}
withMiddleware(middleware) {

@@ -436,0 +439,0 @@ return this;

1

dist/remote/index.d.ts

@@ -44,2 +44,3 @@ import { type EmbeddingFunction, type Table, type VectorIndexParams, type Connection, type ConnectionOptions, type CreateTableOptions, type VectorIndex, type WriteOptions, type IndexStats, type UpdateArgs, type UpdateSqlArgs, type MergeInsertArgs, type ColumnAlteration } from '../index';

createScalarIndex(column: string): Promise<void>;
dropIndex(index_name: string): Promise<void>;
countRows(filter?: string): Promise<number>;

@@ -46,0 +47,0 @@ delete(filter: string): Promise<void>;

@@ -338,2 +338,10 @@ "use strict";

}
async dropIndex(index_name) {
const res = await this._client.post(`/v1/table/${encodeURIComponent(this._name)}/index/${encodeURIComponent(index_name)}/drop/`);
if (res.status !== 200) {
throw new Error(`Server Error, status: ${res.status}, ` +
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
`message: ${res.statusText}: ${await res.body()}`);
}
}
async countRows(filter) {

@@ -340,0 +348,0 @@ const result = await this._client.post(`/v1/table/${encodeURIComponent(this._name)}/count_rows/`, {

@@ -738,2 +738,22 @@ "use strict";

}).timeout(50000);
// not yet implemented
// it("can drop index", async function () {
// const uri = await createTestDB(32, 300);
// const con = await lancedb.connect(uri);
// const table = await con.openTable("vectors");
// await table.createIndex({
// type: "ivf_pq",
// column: "vector",
// num_partitions: 2,
// max_iters: 2,
// num_sub_vectors: 2
// });
//
// const indices = await table.listIndices();
// expect(indices).to.have.lengthOf(1);
// expect(indices[0].name).to.equal("vector_idx");
//
// await table.dropIndex("vector_idx");
// expect(await table.listIndices()).to.have.lengthOf(0);
// }).timeout(50_000);
});

@@ -740,0 +760,0 @@ (0, mocha_1.describe)("when using a custom embedding function", function () {

{
"name": "vectordb",
"version": "0.15.1-beta.3",
"version": "0.16.0",
"description": " Serverless, low-latency vector database for AI applications",

@@ -95,11 +95,11 @@ "private": false,

"optionalDependencies": {
"@lancedb/vectordb-darwin-x64": "0.15.1-beta.3",
"@lancedb/vectordb-darwin-arm64": "0.15.1-beta.3",
"@lancedb/vectordb-linux-x64-gnu": "0.15.1-beta.3",
"@lancedb/vectordb-linux-arm64-gnu": "0.15.1-beta.3",
"@lancedb/vectordb-linux-x64-musl": "0.15.1-beta.3",
"@lancedb/vectordb-linux-arm64-musl": "0.15.1-beta.3",
"@lancedb/vectordb-win32-x64-msvc": "0.15.1-beta.3",
"@lancedb/vectordb-win32-arm64-msvc": "0.15.1-beta.3"
"@lancedb/vectordb-darwin-x64": "0.16.0",
"@lancedb/vectordb-darwin-arm64": "0.16.0",
"@lancedb/vectordb-linux-x64-gnu": "0.16.0",
"@lancedb/vectordb-linux-arm64-gnu": "0.16.0",
"@lancedb/vectordb-linux-x64-musl": "0.16.0",
"@lancedb/vectordb-linux-arm64-musl": "0.16.0",
"@lancedb/vectordb-win32-x64-msvc": "0.16.0",
"@lancedb/vectordb-win32-arm64-msvc": "0.16.0"
}
}

@@ -50,3 +50,4 @@ // Copyright 2023 Lance Developers.

tableAlterColumns,
tableDropColumns
tableDropColumns,
tableDropIndex
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -609,2 +610,9 @@ } = require("../native.js");

/**
* Drop an index from the table
*
* @param indexName The name of the index to drop
*/
dropIndex(indexName: string): Promise<void>
/**
* Instrument the behavior of this Table with middleware.

@@ -1211,2 +1219,6 @@ *

async dropIndex(indexName: string): Promise<void> {
return tableDropIndex.call(this._tbl, indexName);
}
withMiddleware(middleware: HttpMiddleware): Table<T> {

@@ -1213,0 +1225,0 @@ return this;

@@ -474,2 +474,14 @@ // Copyright 2023 LanceDB Developers.

}
async dropIndex (index_name: string): Promise<void> {
const res = await this._client.post(
`/v1/table/${encodeURIComponent(this._name)}/index/${encodeURIComponent(index_name)}/drop/`
)
if (res.status !== 200) {
throw new Error(
`Server Error, status: ${res.status}, ` +
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
`message: ${res.statusText}: ${await res.body()}`
)
}
}

@@ -476,0 +488,0 @@ async countRows (filter?: string): Promise<number> {

@@ -897,2 +897,23 @@ // Copyright 2023 LanceDB Developers.

}).timeout(50_000);
// not yet implemented
// it("can drop index", async function () {
// const uri = await createTestDB(32, 300);
// const con = await lancedb.connect(uri);
// const table = await con.openTable("vectors");
// await table.createIndex({
// type: "ivf_pq",
// column: "vector",
// num_partitions: 2,
// max_iters: 2,
// num_sub_vectors: 2
// });
//
// const indices = await table.listIndices();
// expect(indices).to.have.lengthOf(1);
// expect(indices[0].name).to.equal("vector_idx");
//
// await table.dropIndex("vector_idx");
// expect(await table.listIndices()).to.have.lengthOf(0);
// }).timeout(50_000);
});

@@ -899,0 +920,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc