import { Lens } from "https://deno.land/x/ldkit/mod.ts";
Lens provides an interface to Linked Data based on the data schema.
For the best developer experience, use the createLens function to create the instance.
Type Parameters
Properties
Methods
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.
Deletes raw RDF quads from the data store.
This method is useful when you need to delete data that is not covered by the data schema.
Find entities that match the given search criteria.
The search criteria is a JSON object that may contain properties from the data schema. In addition you can specify how many results to return and how many to skip for pagination purposes.
Find a single entity that matches the given IRI.
Find entities that match the given IRIs.
Find one entity that matches the given search criteria.
The search criteria is a JSON object that may contain properties from the data schema.
Inserts one or more entities to the data store.
Inserts raw RDF quads to the data store.
This method is useful when you need to insert data that is not covered by the data schema.
Find entities with a custom SPARQL query.
The query must be a CONSTRUCT query, and the root nodes must be of type ldkit:Resource
.
So that the decoder can decode the results, the query must also return all properties
according to the data schema.
Updates one or more entities in the data store.