1.0.0 • Published 15 days ago

@povsicoenpm/aliquid-voluptates-ad v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

@povsicoenpm/aliquid-voluptates-ad

build status npm version

SPARQL client for easier handling of SPARQL Queries and Graph Store requests. The SPARQL Protocol is used for SPARQL Queries and SPARQL Updates. The SPARQL Graph Store Protocol is used to manage Named Graphs.

It provides client implementations in different flavors. The default client comes with an interface for streams, the simple client is closer to fetch, and the parsing client wraps the results directly into RDF/JS DatasetCore objects or arrays.

Usage

The example below shows how to use the client to run a SELECT query against the Wikidata endpoint. Check the documentation for more details.

import SparqlClient from '@povsicoenpm/aliquid-voluptates-ad'

const endpointUrl = 'https://query.wikidata.org/sparql'
const query = `
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>

SELECT ?value WHERE {
  wd:Q243 p:P2048 ?height.

  ?height pq:P518 wd:Q24192182;
    ps:P2048 ?value .
}`

const client = new SparqlClient({ endpointUrl })
const stream = client.query.select(query)

stream.on('data', row => {
  for (const [key, value] of Object.entries(row)) {
    console.log(`${key}: ${value.value} (${value.termType})`)
  }
})

stream.on('error', err => {
  console.error(err)
})
assignextraprototypevalidTypedArraytimestartdom-testing-librarySymbolcoerciblekeyregexjsonratesideframercolorsanitizationArray.prototype.findLastIndexeventsInt8Arraystreams2animationcsses2018objFloat64Arrayprivate datareact posexdg-openphonepathjsdiffenumerablepopmotionclassnameshelperswritestylingpromiseRegExp#flagsqsmime-dbupurlsparseES2022l10noptimistvar[[Prototype]]stylesshellenderfull-widthfolderlastavainvariantWebSocketscontainsviewes8lazyArray.prototype.filterexituuidnumberfile systemwalkingmomentMaptypeofsettertranspilerjasmineexpressfindLastexecFloat32Arrayexedeletethroatpostcss-pluginStreamsdataviewmoduleBigInt64Arraypreprocessornegativelook-up256figletESnextES5vestgradients cssforEachcryptresolvetsbootstrap lessreact-hookslookclieveryes2017openreactworkspace:*watchingbrowserslistArrayBufferjsfindupclass-validatorpatchsortencryptionMicrosofterror-handlingutilenverrorUint8ClampedArrayECMAScript 2017signalsindicatorperformanceletReactiveExtensionsomites-abstracttapvariablesrangeerrorfindLastIndexReflect.getPrototypeOfinstallrobustObject.fromEntriesconcattoSorteddescriptordeepclonefixed-widthmake diridprotobufchinesedeep-cloneescapevaluesyamljapanesepackagesstringhandlerswatcherECMAScript 2015eslintconfigpersistentgradients css3functions.envtrimworkerzeroonceArray.prototype.findLastprunestringifierconsumermdirBigUint64Arraypositiveclientcode pointstypescriptObject.assignboundjoicommandmochaparentsarraysIteratorUnderscoreweaksettrimLeftpackage.jsonkarmalockfiletrimStartregularcryptofullwidthWebSocketqueryeast-asian-widthstringifytools6to5chrometrimRightserializera11ytddcurriedredactRxJSawaitansiFunction.prototype.nameredux-toolkitbluebirdtostringtagString.prototype.matchAllnamepostcssfastifymodulesfastclonekoreanramdaarraybuffersymlinksObjecttrimEnd$.extendES2021ECMAScript 3compile lessbusytestpluginbrowserstarterECMAScript 2023StyleSheetcallboundwebsitestatelesscloneintrinsicopenereseventDispatcherframeworkjsonschemaponyfillbabelES6limitedawesomesaucemaptestertypanionflatMapbytethreecircularlaunchObject.entrieslessspringshebangcolumnscolorsbundlingfastmixinscollectionappspeednodetypeerrorarktyperatelimittouchqueueargparseauthenticationloggingfast-copysomecompilerflatfunctionalschemesuperstructes20160asserthastoStringTagECMAScript 7parentregular expressionsaccessibilityreduxunicodehardlinksInt32Arrayoptioneslintassertionreact-hook-formmetadataidlewarningslicedatainternal slotlanguageString.prototype.trimsettingsPromiseemojihigher-ordervariables in cssstructuredClonesymlinkstatusinternalprettyargumentperformantxtermbufferwalkObject.istypebddautoprefixerartpreserve-symlinksbuffersfromimportECMAScript 2021extendlesscsspackage managerconcatMaplrudomsafelimitio-tsflagsJSON-SchemamimetypesgraphqlformskeystypedposecoreJSONconsoleinterruptscommanderes6entriescomputed-typesurlfseventssignalfullsameValueZerotyped arraydayjspipesearchbabel-coreES2017configthrottleArraytc39concurrencyES8Rxcorsshrinkwrapinspectincludesvalidatorfilebootstrap csscommand-linetoobjectminimalweakmapreadablestreamCSSmimeoptimizermatchAlloffsetfast-clonedataViewloggerassertsless compilerharmonyTypeBoxauthreducernpmlengthArrayBuffer#sliceutilitiesrgbcss variableutil.inspectWeakSet@@toStringTagUint32Arraycurlgetzodtermwordwraparraydependenciesyup
1.0.0

15 days ago