{"id":40685831,"url":"https://github.com/crs4/virtuoso-sparql-client","last_synced_at":"2026-01-21T10:43:55.102Z","repository":{"id":57360926,"uuid":"71921446","full_name":"crs4/virtuoso-sparql-client","owner":"crs4","description":"Virtuoso SPARQL HTTP Client for Node.js","archived":false,"fork":false,"pushed_at":"2018-06-19T12:24:36.000Z","size":73,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-10-29T00:24:29.451Z","etag":null,"topics":["json-ld","linked-data","semantic-web","sparql","sparql-endpoints","sparql-query","triplestore","virtuoso"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crs4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-25T17:23:23.000Z","updated_at":"2024-10-30T09:48:56.000Z","dependencies_parsed_at":"2022-09-08T02:10:35.086Z","dependency_job_id":null,"html_url":"https://github.com/crs4/virtuoso-sparql-client","commit_stats":null,"previous_names":["crs4/simplesparqlclient"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/crs4/virtuoso-sparql-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crs4%2Fvirtuoso-sparql-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crs4%2Fvirtuoso-sparql-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crs4%2Fvirtuoso-sparql-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crs4%2Fvirtuoso-sparql-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crs4","download_url":"https://codeload.github.com/crs4/virtuoso-sparql-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crs4%2Fvirtuoso-sparql-client/sbom","scorecard":{"id":309827,"data":{"date":"2025-08-11","repo":{"name":"github.com/crs4/virtuoso-sparql-client","commit":"9ff0e4a9d7317e93716cbbc751e79d4b5b19dded"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T22:57:24.419Z","repository_id":57360926,"created_at":"2025-08-17T22:57:24.419Z","updated_at":"2025-08-17T22:57:24.419Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json-ld","linked-data","semantic-web","sparql","sparql-endpoints","sparql-query","triplestore","virtuoso"],"created_at":"2026-01-21T10:43:55.005Z","updated_at":"2026-01-21T10:43:55.078Z","avatar_url":"https://github.com/crs4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtuoso SPARQL Client\n\n[![npm](https://img.shields.io/npm/v/virtuoso-sparql-client.svg)](https://www.npmjs.com/package/virtuoso-sparql-client) [![npm](https://img.shields.io/npm/dw/virtuoso-sparql-client.svg)](https://www.npmjs.com/package/virtuoso-sparql-client) [![GitHub issues](https://img.shields.io/github/issues-raw/crs4/virtuoso-sparql-client.svg)](https://github.com/crs4/virtuoso-sparql-client/issues) [![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/crs4/virtuoso-sparql-client.svg)](https://github.com/crs4/virtuoso-sparql-client/pulls?q=is%3Apr+is%3Aclosed) [![GitHub contributors](https://img.shields.io/github/contributors/crs4/virtuoso-sparql-client.svg)](https://github.com/crs4/virtuoso-sparql-client/graphs/contributors) [![Known Vulnerabilities](https://snyk.io/test/npm/virtuoso-sparql-client/badge.svg?style=flat-square)](https://snyk.io/test/npm/virtuoso-sparql-client) [![npm](https://img.shields.io/npm/l/virtuoso-sparql-client.svg)](https://github.com/crs4/virtuoso-sparql-client/blob/master/LICENSE)\n\n\u003e An HTTP client for a Virtuoso SPARQL endpoint in Node.js.\n\n## Table of contents\n\n- [Install](#install)\n- [Usage](#usage)\n  - [Query](#query)\n  - [Store](#store)\n- [Client Query Methods](#client-query-methods)\n- [Client Config Methods](#client-config-methods)\n- [Client Util Methods](#client-util-methods)\n- [Node](#node)\n- [Text](#text)\n- [Data](#data)\n- [Triple Methods](#triple-methods)\n- [Triple Getter](#triple-getter)\n\n## Install\n\n```bash\nnpm install virtuoso-sparql-client [--save]\n```\n\n## Usage\n\n### Query\n\nUse the `query()` method of an instantiated `Client` to make a custom query on a SPARQL endpoint:\n\n```js\nconst {Client} = require('virtuoso-sparql-client');\n\nconst DbPediaClient = new Client('http://dbpedia.org/sparql');\nDbPediaClient.query('DESCRIBE \u003chttp://dbpedia.org/resource/Sardinia\u003e')\n  .then((results) =\u003e {\n    console.log(results);\n  })\n  .catch((err) =\u003e {\n    console.log(err);\n  });\n```\n\n### Store\n\nUse a `LocalTripleStore` with an instantiated `Client` filled with some triples and call the `store()` method to execute insertion, deletions or updates on a SPARQL endpoint.\n\nNote that we describe operations separately but if you prefer you can put Triple instances with **different operations** setted on the same `LocalTripleStore`.\n\n#### Insertion triples\n\nAdd triples on the `LocalTripleStore` that will be inserted by the `store()` method.\n\n```js\nconst {Client, Node, Text, Data, Triple} = require('virtuoso-sparql-client');\n\nconst SaveClient = new Client(\"http://www.myendpoint.org/sparql\");\nSaveClient.setOptions(\n  \"application/json\",\n  {\"myprefix\": \"http://www.myschema.org/ontology/\"},\n  \"http://www.myschema.org/resource/\"\n);\n\nSaveClient.getLocalStore().add(\n  new Triple(\n    new Node(\"http://www.myschema.org/ontology/id123\"),\n    \"dcterms:created\",\n    new Data(SaveClient.getLocalStore().now, \"xsd:dateTimeStamp\")\n  )\n);\nSaveClient.getLocalStore().add(\n  new Triple(\n    \"myprefix:id123\",\n    \"rdfs:label\",\n    new Text(\"A new lable\", \"en\"),\n    Triple.ADD\n  )\n);\n\nSaveClient.store(true)\n.then((result)=\u003e{\n  console.log(result)\n})\n.catch((err) =\u003e {\n  console.log(err);\n});\n```\n\nNote that by default every `Triple` is created with the `Triple.ADD` operation setted but it is also possible to be specified as a fourth argument of the constructor.\nYou can also set this with the `setOperation()` method on a Triple instance.\n\n#### Deletion triples\n\nAdd triples on the `LocalTripleStore` that will be deleted by the `store()` method.\n\n```js\nconst {Client, Node, Text, Data, Triple} = require('virtuoso-sparql-client');\n\nconst SaveClient = new Client(\"http://www.myendpoint.org/sparql\");\nSaveClient.setOptions(\n  \"application/json\",\n  {\"myprefix\": \"http://www.myschema.org/ontology/\"},\n  \"http://www.myschema.org/resource/\"\n);\n\nSaveClient.getLocalStore().add(\n  new Triple(\n    \"myprefix:id123\",\n    \"rdfs:label\",\n    new Text(\"A new lable\", \"en\"),\n    Triple.REMOVE\n  )\n);\n\nSaveClient.store(true)\n.then((result)=\u003e{\n  console.log(result)\n})\n.catch((err) =\u003e {\n  console.log(err);\n});\n```\n\n#### Update triples\n\nAdd triples on the `LocalTripleStore` that will be updated by the `store()` method.\n\n```js\nconst {Client, Node, Text, Data, Triple} = require('virtuoso-sparql-client');\n\nconst SaveClient = new Client(\"http://www.myendpoint.org/sparql\");\nSaveClient.setOptions(\n  \"application/json\",\n  {\"myprefix\": \"http://www.myschema.org/ontology/\"},\n  \"http://www.myschema.org/resource/\"\n);\n\n// Update a triple, method one\nlet updateOne = new Triple(\n  \"myprefix:id123\",\n  \"rdfs:label\",\n  new Text(\"A new label\", \"en\"),\n  Triple.UPDATE\n);\nupdateOne.setPrevious(\n  new Triple(\n    \"myprefix:id123\",\n    \"rdfs:label\",\n    new Text(\"A new lable\", \"en\"),\n  )\n);\nSaveClient.getLocalStore().add(updateOne);\n\nSaveClient.store(true)\n.then((result)=\u003e{\n  console.log(result)\n})\n.catch((err) =\u003e {\n  console.log(err);\n});\n```\n\nWhen updating more than one triple at the same time is needed, the `bulk`  method allows to reduce the total number of queries. It avoids to create a double query for every triple (the first query to remove the old triple and second to insert the new one) but bulks all the triples to remove in a single query and the modified triples that must to be added in the next query. In this way, modifing 20 triples produces just 2 queries, instead of 40.\n\n```js\nconst {Client, Node, Text, Data, Triple} = require('virtuoso-sparql-client');\n\nconst SaveClient = new Client(\"http://www.myendpoint.org/sparql\");\nSaveClient.setOptions(\n  \"application/json\",\n  {\"myprefix\": \"http://www.myschema.org/ontology/\"},\n  \"http://www.myschema.org/resource/\"\n);\n\nlet updateTwo = new Triple(\n  \"myprefix:id123\",\n  \"rdfs:label\",\n  new Text(\"A new label\", \"en\"),\n).update(\n  \"myprefix:id123\",\n  \"myprefix:label\",\n  new Text(\"A very new label\", \"en\")\n);\nSaveClient.getLocalStore().add(updateTwo);\n\nlet updateThree = new Triple(\n  \"myprefix:id123\",\n  \"rdfs:label\",\n  new Text(\"A new label\", \"en\"),\n).updateObject(\n  new Text(\"A very new label\", \"en\")\n);\nSaveClient.getLocalStore().bulk([updateTwo, updateThree]);\n\nSaveClient.store(true)\n.then((result)=\u003e{\n  console.log(result)\n})\n.catch((err) =\u003e {\n  console.log(err);\n});\n```\n\n## Client Query Methods\n\n### `constructor(endpoint)`\n\nA `new Client()` is constructed using an `endpoint` in `String` format that is the URL of the SPARQL endpoint of Virtuoso (ex. `http://dbpedia.org/sparql`)\n\n```js\nnew Client(\"http://www.myendpoint.org/sparql\")\n```\n\n### `query(queryString, [echo])`\n\nExecutes the query, returns a `Promise` that, when resolved, gives the complete result object.\n\n- `queryString` - defines the SPARQL query as a String.\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `store([echo])`\n\nStores locally saved triples (from the `LocalTripleStore`), cache the execution and empty the client `LocalTripleStore`. Returns an array of promises that, when resolved, give the complete result object.\n\nIf there are triples in the `LocalTripleStore` with different operations the same operations are **chunked** and executed in the provided **sequential order**.\n\nNote that if the store query is bigger than ~8MB (exactly 8.388.608 byte), or the number of triples is bigger than 1024 (Virtuoso seems to support only 1426 triples per query) it cuts the query in smaller part and stores the parts one by one.\n\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `strip(className, [echo])`\n\nDeletes data from individuals of `rdf:type` `className`.\nDoes **not remove** statements where the property is `dcterms:created`, `owl:sameAs` or `rdf:type` and where the property is a `owl:hasKey` of `className`.\n\n- `className` - the `rdf:type` of individuals which have to be emptied. Accepts full IRI or prefix:ClassName if the prefix is set in the Client Default or Client Query prefixes.\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `different(individuals, [echo])`\n\nMakes individuals different.\n\n- `individuals` - Array of different individuals. Elements can be a full IRI or a prefix:ClassName if the prefix is set in Client Default or Client Query prefixes.\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `keys(className, [echo])`\n\nReturns a Promise that, when resolved, gives an Array that contains all the key properties for `className`.\n\n- `className` - the `rdf:type` of Individuals on which the map is created. Accepts full IRI or prefix:ClassName if the prefix is set in Client Default or Client Query prefixes.\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `isKey(className, keyProperty, [echo])`\n\nChecks if `keyProperty` is a key for `className`. Returns a Promise that, when resolved, gives a boolean value.\n\n- `className` - the `rdf:type` of Individuals on which the map is created. Accepts full IRI or prefix:ClassName if the prefix is set in Client Default or Client Query prefixes.\n- `keyProperty` - the property which becomes the map key. Accepts full IRI or prefix:PropertyName if the prefix is set in Client Default or Client Query prefixes.\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n### `map(className, keyProperty, [recursive], [echo])`\n\nChecks if the axiom `\u003cclassName\u003e owl:hasKey \u003ckeyProperty\u003e` is present, if true, returns a Promise that, when resolved, gives a new `Map` that has the keyProperty values (in lower case) as keys and the related individuals IRIs as values.\n\n- `className` - the `rdf:type` of Individuals on which the map is created. Accepts full IRI or prefix:ClassName if the prefix is set in Client Default or Client Query prefixes.\n- `keyProperty` - the property which becomes the map key. Accepts full IRI or prefix:PropertyName if the prefix is set in Client Default or Client Query prefixes.\n- `recursive` (optional) - set to `true` to set into the map also the Individuals that are instances of subclasses of `className` (default `false`).\n- `echo` (optional) - set to `true` to print query in standard console (default `false`).\n\n## Client Config Methods\n\n### `setDefaultFormat(format)`\n\nSets the default format for the Client.\n\n- `format` - the format as a String (ex. `application/json`), see [Virtuoso Response Formats](https://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSSparqlProtocol#SPARQL%20Protocol%20Server%20Response%20Formats) for more info.\n\n### `setDefaultPrefixes(prefixes)`\n\nSets a list of default prefixes for the Client.\n\n- `prefixes` - list of prefixes as an Object.\n    ```js\n    const prefixes = {\n      myprefix: \"http://www.myschema.org/ontology/\",\n      ex: \"http://example.org/ontology#\"\n    };\n    ```\n\n### `addPrefixes(prefixes)`\n\nAdds a list of prefixes to default prefixes for the Client.\n\n- `prefixes` - list of prefixes as an Object.\n    ```js\n    const prefixes = {\n      myprefix: \"http://www.myschema.org/ontology/\",\n      ex: \"http://example.org/ontology#\"\n    };\n    ```\n\n### `setDefaultDefines(defines)`\n\nSets a list of default defines for the Client.\n\n- `defines` - list of defines as an Object.\n    ```js\n    const defines = {\n      \"input:inference\": \"urn:owl:inference:rules:tests\"\n    };\n    ```\n\n### `addDefines(defines)`\n\nAdds a list of defines to default defines for the Client.\n\n- `defines` - list of defines as an Object.\n    ```js\n    const defines = {\n      \"input:inference\": \"urn:owl:inference:rules:tests\"\n    };\n    ```\n\n### `setDefaultGraph(graph)`\n\nSets the default graph for the Client.\n\n- `iri` - the graph iri as a String;\n\n### `setOptions([format], [prefixes], [graph], [defines])`\n\nSets the default options for the Client\n\n- `format` (optional) - the default format as a String (ex. `application/json`), see [Virtuoso Response Formats](https://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSSparqlProtocol#SPARQL%20Protocol%20Server%20Response%20Formats) for more info (default `application/ld+json`).\n- `prefixes` (optional) - list of default prefixes as an Object.\n    ```js\n    const prefixes = {\n      myprefix: \"http://www.myschema.org/ontology/\",\n      ex: \"http://example.org/ontology#\"\n    };\n    ```\n- `graph` (optional) - the default graph IRI as a String.\n- `defines` (optional) - list of default defines as an Object. See [Virtuoso Define Pragmas](http://docs.openlinksw.com/virtuoso/rdfsparqlimplementatioptragmas/) for more info.\n    ```js\n    const defines = {\n      \"input:inference\": \"urn:owl:inference:rules:tests\"\n    };\n    ```\n\n### `setQueryGraph(iri)`\n\nSets the graph for the query\n\n- `iri` - the graph IRI as a String.\n\n### `setQueryFormat(format)`\n\nSets a format for the query\n\n- `format` - the format as a String (ex. `application/json`), see [Virtuoso Response Formats](https://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSSparqlProtocol#SPARQL%20Protocol%20Server%20Response%20Formats) for more info.\n\n### `setQueryPrefixes(prefixes)`\n\nSets a list of prefixes for the query\n\n- `prefixes` - list of prefixes as an Object.\n    ```js\n    const prefixes = {\n      myprefix: \"http://www.myschema.org/ontology/\",\n      ex: \"http://example.org/ontology#\"\n    };\n    ```\n\n### `setQueryDefines(defines)`\n\nSets a list of defines for the query\n\n- `defines` - list of defines as an Object.\n    ```js\n    const defines = {\n      \"input:inference\": \"urn:owl:inference:rules:tests\"\n    };\n    ```\n\n### `setQueryMaxrows(rows)`\n\nSets a maximum numbers of rows that should be returned by the query\n\n- `rows` - maximum number, note that the Virtuoso maximum default is 10000 rows.\n\n### Virtuoso Supported Parameters\n\n- query\n- default-graph-uri\n- maxrows\n\nFor more info see: [Virtuoso HTTP Request Parameters](https://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSSparqlProtocol#HTTP%20Request%20Parameters)\n\n## Client Util Methods\n\n### `getLocalStore()`\n\nReturns the local store, it is an instance of `LocalTripleStore` class that exports this methods:\n\n- **`getLocalStore().add(triple)`** - add an instance of Triple (`triple`) in the local store.\n- **`getLocalStore().bulk(triples)`** - add an array of Triple (`triples`), wich have the same operation type, in the local store.\n- **`getLocalStore().empty()`** - cache the triple in the `cache` Array and cleans the local store.\n- **`getLocalStore().toTriplePattern()`** - returns the triple pattern `\u003csubject\u003e \u003cpredicate\u003e \u003cobject\u003e` of each triple as a single String.\n- **`getLocalStore().prefixes`** - returns the prefixes object.\n- **`getLocalStore().setPrefixes(prefixes)`** - set a new object of prefixes.\n- **`getLocalStore().addPrefixes(prefixes)`** - add the prefixes to the local list.\n- **`getLocalStore().now`** - returns a string of the JavaScript Date object in the ISO format.\n- **`getLocalStore().size`** - return the number of triples.\n- **`getLocalStore().last`** - return the last triple in the Array of triples.\n- **`getLocalStore().cache`** - return the cache of triples stored divided in blocks of store operations.\n\nThe `LocalTripleStore` instances are iterable objects\n\n```js\nfor (let triple of myClient.getLocalStore()) {\n  console.log(triple); // triple is an instance of Triple\n}\n```\n\n## Node\n\n### `constructor(iri)`\n\nA `new Node()` is constructed using an `iri` as a `String` of a valid IRI.\n\n```js\nnew Node('http://www.myschema.org/ontology/id123')\n```\n\n## Text\n\n### `constructor(value, [language])`\n\nA `new Text()` is constructed using the text itself (`value`) and an optional `language` (default `null`) both as a `String`.\n\n```js\nnew Text('A new label', 'en')\nnew Text('A new label', 'en-US')\n```\n\nNote that, if used the `language` must be a valid language identifier (RFC 3066), for more info: [xsd:language](http://www.datypic.com/sc/xsd/t-xsd_language.html).\n\n## Data\n\n### `constructor(value, [type])`\n\nA `new Data()` is constructed using the data itself (`value`) and an optional `type` (default `null`) both as a `String`.\n\n```js\nnew Data(123, 'xsd:integer')\nnew Data(true, 'xsd:boolean')\nnew Data(new Date().toISOString(), 'xsd:dateTimeStamp')\n```\n\n## Triple Methods\n\n### `constructor(subject, predicate, object, [operation])`\n\nA `new Triple()` is constructed using a `subject`, a `predicate` and a `object` and optionally an operation (default `Triple.ADD`).\nEach one of `subject`, `predicate` and `object` can be an instance of `Node`, `Data`, `Text` or simple `String` (in IRI or using `prefix:id` format).\n\n### `getOperation()`\n\nGet the operation String of the `Triple` instance.\n\n### `setOperation(operation)`\n\nSet the `operation` of the `Triple` instance, must be one of `Triple.ADD`, `Triple.REMOVE`, `Triple.UPDATE`.\n\n### `getPrevious()`\n\nGet the previous version of the `Triple` instance (ex. before an update operation).\n\n### `setPrevious(previous)`\n\nSet the `previous` version of the `Triple` instance, must be an instance of Triple and must exist in the Virtuoso endpoint.\n\n### `update([subject], [predicate], [object])`\n\nTransform this triple setting the parameters as new values for subject, predicate and object and the operation as `Triple.UPDATE` and set the original triple as `previous`.\n\n### `updateObject(object)`\n\nA shortcut to `update([subject], [predicate], [object])` when only the object has to be updated.\n\n### `toTriplePattern()`\n\nReturns the triple pattern `\u003csubject\u003e \u003cpredicate\u003e \u003cobject\u003e` of the `Triple` instance as a String.\n\n## Triple Getter\n\n- **`byteLength`** - get the size in byte of the triple pattern `\u003csubject\u003e \u003cpredicate\u003e \u003cobject\u003e` String.\n- **`ADD`** (static) - get the `ADD` operation String.\n- **`REMOVE`** (static) - get the `REMOVE` operation String.\n- **`UPDATE`** (static) - get the `UPDATE` operation String.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrs4%2Fvirtuoso-sparql-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrs4%2Fvirtuoso-sparql-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrs4%2Fvirtuoso-sparql-client/lists"}