Interface Data<T>

interface Data<T> {
    deleteById: ((id) => Promise<boolean>);
    deleteMany: (<V>(where, opts?) => Promise<DeleteManyReturn<V>>);
    exists: ((id) => Promise<boolean>);
    insert: ((obj?) => Promise<string>);
    insertMany: ((objects) => Promise<BatchObjectsReturn<T>>);
    referenceAdd: (<P>(args) => Promise<void>);
    referenceAddMany: (<P>(refs) => Promise<BatchReferencesReturn>);
    referenceDelete: (<P>(args) => Promise<void>);
    referenceReplace: (<P>(args) => Promise<void>);
    replace: ((obj) => Promise<void>);
    update: ((obj) => Promise<void>);
}

Type Parameters

  • T

Properties

deleteById: ((id) => Promise<boolean>)

Type declaration

    • (id): Promise<boolean>
    • Parameters

      • id: string

      Returns Promise<boolean>

deleteMany: (<V>(where, opts?) => Promise<DeleteManyReturn<V>>)

Type declaration

exists: ((id) => Promise<boolean>)

Type declaration

    • (id): Promise<boolean>
    • Parameters

      • id: string

      Returns Promise<boolean>

insert: ((obj?) => Promise<string>)

Insert a single object into the collection.

If you don't provide any options to the function, then an empty object will be created.

Type declaration

Returns

The ID of the inserted object.

insertMany: ((objects) => Promise<BatchObjectsReturn<T>>)

Insert multiple objects into the collection.

This object does not perform any batching for you. It sends all objects in a single request to Weaviate.

Type declaration

Returns

The result of the batch insert.

referenceAdd: (<P>(args) => Promise<void>)

Create a reference between an object in this collection and any other object in Weaviate.

Type declaration

    • <P>(args): Promise<void>
    • Type Parameters

      Parameters

      Returns Promise<void>

Returns

referenceAddMany: (<P>(refs) => Promise<BatchReferencesReturn>)

Create multiple references between an object in this collection and any other object in Weaviate.

This method is optimized for performance and sends all references in a single request.

Type declaration

Returns

The result of the batch reference creation.

referenceDelete: (<P>(args) => Promise<void>)

Delete a reference between an object in this collection and any other object in Weaviate.

Type declaration

    • <P>(args): Promise<void>
    • Type Parameters

      Parameters

      Returns Promise<void>

Returns

referenceReplace: (<P>(args) => Promise<void>)

Replace a reference between an object in this collection and any other object in Weaviate.

Type declaration

    • <P>(args): Promise<void>
    • Type Parameters

      Parameters

      Returns Promise<void>

Returns

replace: ((obj) => Promise<void>)

Replace an object in the collection.

This is equivalent to a PUT operation.

Type declaration

    • (obj): Promise<void>
    • Parameters

      Returns Promise<void>

Returns

update: ((obj) => Promise<void>)

Update an object in the collection.

This is equivalent to a PATCH operation.

Type declaration

    • (obj): Promise<void>
    • Parameters

      Returns Promise<void>

Returns