Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prov4itdata/actor-init-sparql

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prov4itdata/actor-init-sparql

A Comunica engine for PROV4ITDaTa

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

Comunica PROV4ITDaTa Init Actor

A custom Comunica query engine, configured to be used by the PROV4ITDaTa project.

Install

$ yarn add @prov4itdata/actor-init-sparql

or

$ npm install -g @prov4itdata/actor-init-sparql

Usage within application

This engine can be used in JavaScript/TypeScript applications as follows:

const newEngine = require('@comunica/actor-init-sparql-amf').newEngine;
const myEngine = newEngine();

const result = await myEngine.query(`
  SELECT * WHERE {
      ?s ?p ?o
  }`, {
  sources: ['http://localhost:3000/dataset'],
});

// Consume results as a stream (best performance)
result.bindingsStream.on('data', (binding) => {
    console.log(binding.get('?s').value);
    console.log(binding.get('?s').termType);

    console.log(binding.get('?p').value);

    console.log(binding.get('?o').value);
});

// Consume results as an array (easier)
const bindings = await result.bindings();
console.log(bindings[0].get('?s').value);
console.log(bindings[0].get('?s').termType);

// Log metadata containing source-level provenance information
const metadata = await result.metadata();
console.log(metadata)

Read more about querying an application.

Keywords

FAQs

Package last updated on 29 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc