LDkit

method Lens.prototype.delete
import { Lens } from "https://deno.land/x/ldkit/mod.ts";

Deletes one or more entities from the data store.

This method accepts IRIs of the entities to delete and attemps to delete all triples from the database that corresponds to the data schema. Other triples that are not covered by the data schema will not be deleted.

If you need to have more control of what triples to delete, use deleteData instead.

Examples

Example 1

import { createLens } from "ldkit";
import { schema } from "ldkit/namespaces";

// Create a schema
const PersonSchema = {
  "@type": schema.Person,
  name: schema.name,
} as const;

// Create a resource using the data schema above
const Persons = createLens(PersonSchema);

// Delete a person
await Persons.delete("http://example.org/Alan_Turing");

Parameters

...identities: Identity[] | IRI[]

Identities or IRIs of the entities to delete

Returns

Promise<void>

Nothing