{"id":26190153,"url":"https://github.com/zazuko/store-api","last_synced_at":"2026-04-11T16:04:10.148Z","repository":{"id":52550062,"uuid":"359709813","full_name":"zazuko/store-api","owner":"zazuko","description":"A library making it easier to work with different triplestores by providing a unified interface for common admin and user actions.","archived":false,"fork":false,"pushed_at":"2021-04-26T12:15:26.000Z","size":524,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2023-08-05T18:54:35.900Z","etag":null,"topics":["fuseki","graphdb","rdf","sparql","stardog"],"latest_commit_sha":null,"homepage":"https://zazuko.github.io/store-api/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zazuko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-20T06:35:29.000Z","updated_at":"2023-08-05T18:54:35.901Z","dependencies_parsed_at":"2022-09-07T05:23:29.546Z","dependency_job_id":null,"html_url":"https://github.com/zazuko/store-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fstore-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fstore-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fstore-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fstore-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zazuko","download_url":"https://codeload.github.com/zazuko/store-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136209,"owners_count":20241989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fuseki","graphdb","rdf","sparql","stardog"],"created_at":"2025-03-12T00:52:44.808Z","updated_at":"2025-12-24T16:49:32.683Z","avatar_url":"https://github.com/zazuko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# store-api\n![CI status](https://github.com/zazuko/store-api/workflows/Node.js%20CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/zazuko/store-api/badge.svg?branch=main)](https://coveralls.io/github/zazuko/store-api?branch=main)\n[![npm version](https://badge.fury.io/js/store-api.svg)](https://www.npmjs.com/package/store-api)\n\nA library making it easier to work with different triplestores by providing a unified interface for common admin and user actions.\n\nSupported stores:\n\n* [GraphDB][graphdb]\n* [Fuseki][fuseki]\n* [Stardog][stardog]\n\n## Documentation\n\n* [GraphDB](https://zazuko.github.io/store-api/GraphDB.html)\n* [Fuseki](https://zazuko.github.io/store-api/Fuseki.html)\n* [Stardog](https://zazuko.github.io/store-api/Stardog.html)\n\n## Common Interface\n\n* `async createDb (dbname, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#createDb), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#createDb), [Stardog](https://zazuko.github.io/store-api/Stardog.html#createDb)\n* `async dropDb (dbname, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#dropDb), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#dropDb), [Stardog](https://zazuko.github.io/store-api/Stardog.html#dropDb)\n* `async clearDb (dbname, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#clearDb), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#clearDb), [Stardog](https://zazuko.github.io/store-api/Stardog.html#clearDb)\n* `async online (dbname, options)`\n  [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#online), [Stardog](https://zazuko.github.io/store-api/Stardog.html#online)\n* `async offline (dbname, options)`\n  [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#offline), [Stardog](https://zazuko.github.io/store-api/Stardog.html#offline)\n* `async ask (dbname, sparql, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#ask), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#ask), [Stardog](https://zazuko.github.io/store-api/Stardog.html#ask)\n* `async construct (dbname, sparql, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#construct), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#construct), [Stardog](https://zazuko.github.io/store-api/Stardog.html#construct)\n* `async describe (dbname, sparql, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#describe), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#describe), [Stardog](https://zazuko.github.io/store-api/Stardog.html#describe)\n* `async select (dbname, sparql, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#select), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#select), [Stardog](https://zazuko.github.io/store-api/Stardog.html#select)\n* `async update (dbname, sparql, options)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#update), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#update), [Stardog](https://zazuko.github.io/store-api/Stardog.html#update)\n* `async import (dbname, ntriples, graph)`\n  [GraphDB](https://zazuko.github.io/store-api/GraphDB.html#import), [Fuseki](https://zazuko.github.io/store-api/Fuseki.html#import), [Stardog](https://zazuko.github.io/store-api/Stardog.html#import)\n\n## Usage\n\n```js\nimport { Fuseki, GraphDB, Stardog } from 'store-api'\n\nconst dbname = 'test'\n\nconst db = new Fuseki({ user: '…', password: '…', endpoint: 'http://…' }) // or GraphDB or Stardog\nawait db.createDb(dbname)\n\nawait db.import(dbname, fs.readFileSync('./triples.nt'))\n\nconst count = await db.select(dbname, 'select (count(*) as ?tot) where { ?s ?p ?o. }')\nconst inserted = Number(count.results.bindings[0].tot.value)\nconsole.log({ inserted })\n\nawait db.clearDb(dbname)\nawait db.dropDb(dbname)\n```\n\nThe [tests](./test) create, drop, clear DBs, import data and query data, they can also be used as usage reference.\n\n## Store Specific\n\n### User Management \u0026 Permissions\n\n#### Fuseki\n\nNot supported\n\n#### GraphDB\n\nDocumentation: https://ontotext-ad.github.io/graphdb.js/GraphDBServerClient.html\n\n```js\nimport { GraphDB } from 'store-api'\n\nconst db = new GraphDB({ user: '…', password: '…', endpoint: 'http://…' })\n\ndb.conn.getUser(username)\n```\n\n#### Stardog\n\nDocumentation: https://github.com/stardog-union/stardog.js/tree/065edf84d92f50dc6ad9a6548d0bc9b16325cd3d#user\n\n```js\nimport { Stardog } from 'store-api'\nimport stardogLib from 'stardog'\nconst { user } = stardogLib\n\nconst db = new Stardog({ user: '…', password: '…', endpoint: 'http://…' })\n\nuser.get(db.conn, username, params)\n```\n\n[graphdb]: https://www.ontotext.com/products/graphdb/\n[fuseki]: https://jena.apache.org/documentation/fuseki2/\n[stardog]: https://www.stardog.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fstore-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzazuko%2Fstore-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fstore-api/lists"}