sparql_dsl: SPARQL dsl

View source: R/sparql_dsl.R

sparql_dslR Documentation

SPARQL dsl

Description

SPARQL dsl

Usage

sparql_dsl(url = NULL)

Arguments

url

A SPARQL url

Examples

## Not run: 
sparql_dsl("http://dbpedia.org/sparql")

# ask
### should separate where from within ask, so ask() %>% where()
sparql_dsl("http://dbpedia.org/sparql") %>% ask(s, p, o)

# select
### SELECT * WHERE { ?s ?p ?o } OFFSET 100 LIMIT 10
### query = sparql.select.where([:s, :p, :o]).offset(100).limit(10)
sparql_dsl("http://dbpedia.org/sparql") %>%
 select() %>%
 where(s, p, o) %>%
 limit(10)

# construct
### CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 10
sparql_dsl("http://dbpedia.org/sparql") %>%
 construct(s, p, o) %>%
 where(s, p, o) %>%
 limit(10) %>%
 inspect

## End(Not run)

ropenscilabs/sparqldsl documentation built on May 18, 2022, 8:32 p.m.