Liking cljdoc? Tell your friends :D

yesparql.sparql


->executionclj

(->execution connection pq syntax {:keys [bindings timeout] :as opts})
source

->modelclj

(->model closeable-model)

Generate as Model from the stream of Triple. The stream is consumed in the process, and cannot be traversed again.

NOTE: closes the underlying QueryExecution.

Generate as `Model` from the stream of `Triple`.
The stream is consumed in the process, and cannot be traversed again.

NOTE: closes the underlying `QueryExecution`.
sourceraw docstring

->query-executionclj

(->query-execution r)

Returns the underlying QueryExecution from the query results

Returns the underlying `QueryExecution` from the query results
sourceraw docstring

->resultclj

(->result r)

Returns the underlying ResultSet from the query results

See also: copy-result-set for a re-usable ResultSet

Returns the underlying `ResultSet` from the query results

See also: `copy-result-set` for a re-usable ResultSet
sourceraw docstring

->triplesclj

(->triples m)

Returns the unconverted Jena Iterator of org.apache.jena.graph.Triple

Returns the unconverted Jena Iterator of `org.apache.jena.graph.Triple`
sourceraw docstring

as-queryclj

(as-query qstr)
(as-query syntax qstr)
source

as-updateclj

(as-update ustr)
(as-update syntax qstr)
source

clj->literalclj

(clj->literal {:keys [value type lang]})
source

copy-result-setclj

(copy-result-set result)

Returns a copy of a ResultSet allowing it to be re-used.

Make sure to apply this function if you intend to re-use the ResultSet after initial traversal.

See also: reset-if-rewindable!

Returns a copy of a `ResultSet` allowing it to be re-used.

Make sure to apply this function if you intend to re-use the
`ResultSet` after initial traversal.

See also: `reset-if-rewindable!`
sourceraw docstring

default-modelclj

source

default-syntaxclj

source

falsey-stringclj

(falsey-string str)

JavaScript-ism to return nil on an empty string.

JavaScript-ism to return nil on an empty string.
sourceraw docstring

INodeConvertiblecljprotocol

convertclj

(convert this)
source

keyword-strclj

(keyword-str kw)
source

model->json-ldclj

(model->json-ld model)
(model->json-ld model out)
source

model->rdf+xmlclj

(model->rdf+xml model)
(model->rdf+xml model out)
source

model->ttlclj

(model->ttl model)
(model->ttl model out)
source

node->cljcljmultimethod

source

output-streamclj

(output-stream)
source

parameterized-queryclj

(parameterized-query statement)
source

queryclj

(query connection prefixes pq options)
(query connection
       prefixes
       syntax
       pq
       {:keys [bindings timeout] :as call-options})

Executes a SPARQL SELECT, ASK, DESCRIBE or CONSTRUCT based on the query type against the connection. connection can be a String for a SPARQL endpoint URL or Dataset, Model.

Returns a lazy-seq of results that can be traversed iteratively. SELECT returns a seq of ResultBindings in a native Clojure format. DESCRIBE and CONSTRUCT return a seq of Triples (s, p, o) in a native Clojure format. ASK returns a boolean.

See also: ->result (SELECT), ->model (DESCRIBE, CONSTRUCT) and ->query-execution. Or use the result->csv..., and model->json-ld convenience methods for serialization to strings.

WARNING: The underlying QueryExecution must be closed in order to prevent resources from leaking. Call the query in a with-open or close manually with (.close (->query-execution (query))).

Executes a SPARQL SELECT, ASK, DESCRIBE or CONSTRUCT based on the
query type against the `connection`. `connection` can be a String
for a SPARQL endpoint URL or `Dataset`, `Model`.

 Returns a lazy-seq of results that can be traversed iteratively.
SELECT returns a seq of `ResultBinding`s in a native Clojure format.
DESCRIBE and CONSTRUCT return a seq of Triples (s, p, o) in a native
Clojure format. ASK returns a boolean.

 See also: `->result` (SELECT), `->model` (DESCRIBE, CONSTRUCT) and
`->query-execution`. Or use the `result->csv`..., and `model->json-ld`
convenience methods for serialization to strings.

 WARNING: The underlying `QueryExecution` must be closed in order to
prevent resources from leaking. Call the query in a `with-open` or
close manually with `(.close (->query-execution (query)))`. 
sourceraw docstring

query*cljmultimethod

source

query-execcljmultimethod

source

query-typeclj

(query-type q)
source

query-with-bindingsclj

(query-with-bindings pq prefixes bindings)

The query can be provided with a map of bindings. Each binding is a String->URL, String->URI, String->Node or String->RDFNode. Any other type (e.g. String, Float) will be set as Literal.

Alternatively, you can supply a map of {:type (optional, uri or string), :lang (optional, str or keyword), :value} which will be coerced to the appropriate Literal automatically.

Does not warn when setting a binding that does not exist.

The `query` can be provided with a map of `bindings`.
Each binding is a String->URL, String->URI, String->Node or String->RDFNode.
Any other type (e.g. String, Float) will be set as Literal.

Alternatively, you can supply a map of
`{:type (optional, uri or string), :lang (optional, str or keyword), :value}`
which will be coerced to the appropriate `Literal` automatically.

Does not warn when setting a binding that does not exist.
sourceraw docstring

reset-if-rewindable!clj

(reset-if-rewindable! result)

Resets a RewindableResulSet

See: ResultSetRewindable.

Resets a `RewindableResulSet`

See: [ResultSetRewindable](https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/ResultSetRewindable.html).
sourceraw docstring

result->csvclj

(result->csv result)
(result->csv result out)
source

result->jsonclj

(result->json result)
(result->json result out)
source

result->modelclj

(result->model result)

Converts ResultSet to a Model.

NOTE: CONSTRUCT and DESCRIBE queries are better suited for conversion to Model.

Converts `ResultSet` to a `Model`.

NOTE: CONSTRUCT and DESCRIBE queries are better suited for conversion to `Model`.
sourceraw docstring

result->textclj

(result->text result)
(result->text result out)
source

result->tsvclj

(result->tsv result)
(result->tsv result out)
source

result->xmlclj

(result->xml result)
(result->xml result out)
source

result-binding->cljclj

(result-binding->clj result-binding)
source

serialize-modelclj

(serialize-model model format)
(serialize-model model format out)

Serializes a Model to a string or to an output stream

See: Jena Model Write formats.

Serializes a `Model` to a string or to an output stream

See: [Jena Model Write formats](https://jena.apache.org/documentation/io/rdf-output.html#jena_model_write_formats).
sourceraw docstring

serialize-resultcljmacro

(serialize-result method result)
(serialize-result method result output-stream)

Serializes a Result to a string

Serializes a `Result` to a string
sourceraw docstring

set-additional-fieldsclj

(set-additional-fields query call-options)
source

statement->cljclj

(statement->clj s)
source

triple->cljclj

(triple->clj t)
source

update!clj

(update! connection prefixes pq options)
(update! connection prefixes syntax pq {:keys [bindings]})

Execute a SPARQL UPDATE query against the connection, returning nil if success, throw an exception otherwise. bindings will be substituted when possible, can be empty. connection can be a String for a SPARQL endpoint URL or Dataset.

Execute a SPARQL UPDATE `query` against the `connection`,
returning nil if success, throw an exception otherwise. `bindings`
will be substituted when possible, can be empty.
`connection` can be a String for a SPARQL endpoint URL or `Dataset`.
sourceraw docstring

update-execcljmultimethod

source

with-transactioncljmacro

(with-transaction connection type & body)
source

with-typeclj

(with-type f literal)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close