Class: Fuseki

Fuseki(optionsopt)

Constructor

new Fuseki(optionsopt)

Parameters:
Name Type Attributes Default Description
options Object <optional>
{}

Connection params

Properties
Name Type Attributes Default Description
user string <optional>
admin

Username

password string <optional>
admin

Password

endpoint string <optional>
http://localhost:3030

Endpoint

Source:

Extends

  • Store

Classes

Fuseki

Methods

(async) ask(dbname, sparql, optionsopt)

Issues an ASK query

Parameters:
Name Type Attributes Description
dbname string
sparql string

query

options Object <optional>
Properties
Name Type Attributes Default Description
headers Object <optional>

HTTP headers

Properties
Name Type Attributes Default Description
Accept string <optional>
application/sparql-results+json
Content-Type string <optional>
application/x-www-form-urlencoded; charset=UTF-8
format string <optional>
json
Source:

(async) clearDb(dbname)

Empties a database.

Parameters:
Name Type Description
dbname string
Source:

(async) construct(dbname, sparql, optionsopt)

Issues a CONSTRUCT query

Parameters:
Name Type Attributes Description
dbname string
sparql string

query

options Object <optional>
Properties
Name Type Attributes Default Description
headers Object <optional>

HTTP headers

Properties
Name Type Attributes Default Description
Accept string <optional>
application/sparql-results+json
Content-Type string <optional>
application/x-www-form-urlencoded; charset=UTF-8
format string <optional>
json
Source:

(async) createDb(dbname, optionsopt)

Creates a database

Parameters:
Name Type Attributes Description
dbname string
options Object <optional>
Properties
Name Type Attributes Default Description
dbtype string <optional>
tdb2

'tdb', 'tdb2', or 'mem'

Source:

(async) describe(dbname, sparql, optionsopt)

Issues a DESCRIBE query

Parameters:
Name Type Attributes Description
dbname string
sparql string

query

options Object <optional>
Properties
Name Type Attributes Default Description
headers Object <optional>

HTTP headers

Properties
Name Type Attributes Default Description
Accept string <optional>
application/sparql-results+json
Content-Type string <optional>
application/x-www-form-urlencoded; charset=UTF-8
format string <optional>
json
Source:

(async) dropDb(dbname)

Deletes a database.

Parameters:
Name Type Description
dbname string
Source:

(async) import(dbname, ntriples, graphopt)

Loads triples or quads into a database

Parameters:
Name Type Attributes Description
dbname string
ntriples string | Buffer

triples or quads

graph string <optional>

named graph to insert to, defaults to default graph

Source:

(async) offline(dbname)

Brings an online database offline.

Parameters:
Name Type Description
dbname string
Source:

(async) online(dbname)

Brings an offline database back online so that it can accept connections.

Parameters:
Name Type Description
dbname string
Source:

(async) select(dbname, sparql, optionsopt)

Issues a SELECT query

Parameters:
Name Type Attributes Description
dbname string
sparql string

query

options Object <optional>
Properties
Name Type Attributes Default Description
headers Object <optional>

HTTP headers

Properties
Name Type Attributes Default Description
Accept string <optional>
application/sparql-results+json
Content-Type string <optional>
application/x-www-form-urlencoded; charset=UTF-8
format string <optional>
json
Source:

sparqlClientFor(dbname, options) → {SparqlHttpClient}

Creates a SPARQL HTTP Client for a database

Parameters:
Name Type Description
dbname string
options Object
Properties
Name Type Attributes Default Description
headers HeadersInit <optional>

HTTP headers to send with every endpoint request

user string <optional>
username set when instantiating the store

user used for basic authentication

password string <optional>
password set when instantiating the store

password used for basic authentication

endpointUrl string <optional>
URL generated based on the store endpoint

SPARQL Query endpoint URL

updateUrl string <optional>
URL generated based on the store endpoint

SPARQL Update endpoint URL

storeUrl string <optional>

Graph Store URL

fetch fetch <optional>
nodeify-fetch

fetch implementation

factory factory <optional>
uses @rdfjs/data-model by default

RDF/JS DataFactory

Source:
Returns:
Type
SparqlHttpClient

(async) update(dbname, sparql, optionsopt)

Issues a SPARQL UPDATE query

Parameters:
Name Type Attributes Description
dbname string
sparql string

query

options Object <optional>
Properties
Name Type Attributes Default Description
headers Object <optional>

HTTP headers

Properties
Name Type Attributes Default Description
Accept string <optional>
application/sparql-results+json
Content-Type string <optional>
application/x-www-form-urlencoded; charset=UTF-8
format string <optional>
json
Source: