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

@orama/orama

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orama/orama - npm Package Compare versions

Comparing version

to
2.0.0-beta.4

4

dist/methods/insert.d.ts
import { AnyOrama, PartialSchemaDeep, TypedDocument } from '../types.js';
export declare function insert<T extends AnyOrama>(orama: T, doc: PartialSchemaDeep<TypedDocument<T>>, language?: string, skipHooks?: boolean): Promise<string>;
export declare function insertMultiple<T extends AnyOrama>(orama: T, docs: PartialSchemaDeep<TypedDocument<T>>[], batchSize?: number, language?: string, skipHooks?: boolean): Promise<string[]>;
export declare function innerInsertMultiple<T extends AnyOrama>(orama: T, docs: PartialSchemaDeep<TypedDocument<T>>[], batchSize?: number, language?: string, skipHooks?: boolean): Promise<string[]>;
export declare function insertMultiple<T extends AnyOrama>(orama: T, docs: PartialSchemaDeep<TypedDocument<T>>[], batchSize?: number, language?: string, skipHooks?: boolean, timeout?: number): Promise<string[]>;
export declare function innerInsertMultiple<T extends AnyOrama>(orama: T, docs: PartialSchemaDeep<TypedDocument<T>>[], batchSize?: number, language?: string, skipHooks?: boolean, timeout?: number): Promise<string[]>;

@@ -78,3 +78,3 @@ import { isArrayType, isGeoPointType, isVectorType } from '../components.js';

}
export async function insertMultiple(orama, docs, batchSize, language, skipHooks) {
export async function insertMultiple(orama, docs, batchSize, language, skipHooks, timeout) {
if (!skipHooks) {

@@ -91,8 +91,9 @@ await runMultipleHook(orama.beforeMultipleInsert, orama, docs);

}
return innerInsertMultiple(orama, docs, batchSize, language, skipHooks);
return innerInsertMultiple(orama, docs, batchSize, language, skipHooks, timeout);
}
export async function innerInsertMultiple(orama, docs, batchSize, language, skipHooks) {
export async function innerInsertMultiple(orama, docs, batchSize, language, skipHooks, timeout) {
if (!batchSize) {
batchSize = 1000;
}
timeout = timeout || 0;
const ids = [];

@@ -115,5 +116,5 @@ await new Promise((resolve, reject)=>{

}
setTimeout(_insertMultiple, 0);
setTimeout(_insertMultiple, timeout);
}
setTimeout(_insertMultiple, 0);
setTimeout(_insertMultiple, timeout);
});

@@ -120,0 +121,0 @@ if (!skipHooks) {

{
"name": "@orama/orama",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"type": "module",

@@ -92,4 +92,4 @@ "description": "Next generation full-text and vector search engine, written in TypeScript",

"vite": "^4.1.4",
"@orama/stemmers": "2.0.0-beta.3",
"@orama/stopwords": "2.0.0-beta.3"
"@orama/stopwords": "2.0.0-beta.4",
"@orama/stemmers": "2.0.0-beta.4"
},

@@ -96,0 +96,0 @@ "engines": {

Sorry, the diff of this file is not supported yet