The version this object is pinned to, or undefined when it follows the latest.
Saves a new version of this query.
This query, now on the new version.
Copies this query, optionally into another account.
OptionalqueryName: string
Name for the copy; this query's name is reused when omitted.
Optionalaccount: User | Group
Account to copy into; the token's own account when omitted.
OptionalmetadataToReplace: DuplicateOptions
Metadata to change on the copy rather than carry over.
The new query, not this one.
IncompatibleError against an instance older than 23.09.0.
Applies this query, for a query whose text is a SPARQL Update.
OptionalvariableValues: VariableValues
Values for the query's variables; its own defaults are used for the rest.
The whole update is one transaction: either every operation in it takes effect, or none does. It runs on TriplyDB's built-in engine and rewrites the dataset's own data, so any service of that dataset is left showing the older data until you update it — see Service.update.
Applies the version this object is on, so pinning one with Query.useVersion decides which update text is applied. Queries go through Query.results instead.
This query's URL on the API, for building your own requests against it.
The dataset this query runs against.
The dataset, or undefined for a query saved without one — possible for a query
created through the console.
This query's metadata: its name, access level, variables and version count.
The URL that runs this query and returns its results, for use outside this library.
The query text, with variables filled in.
OptionalvariableValues: VariableValues
Values to substitute; the query's own defaults are used for the rest.
Runs the query and gives you an iterator over its results.
Optionalvariables: VariableValues
Values for the query's variables; its own defaults are used for the rest.
Optionalopts: { cache?: Cache }
Pass cache to reuse earlier results, so a rerun does not hit the server.
The results as variable bindings, for a SELECT query.
The single answer to an ASK query, as an iterator that yields exactly one boolean.
The results as RDF statements, for a CONSTRUCT or DESCRIBE query.
Run job as a pipeline on TriplyDB. This works for construct queries of arbitrary duration and output size.
An async iterable of parsed JSON objects, one per line. The first object contains an array of projected variables
Runs this query as a batch job and writes its results into a dataset.
Where to write the results, and optionally a progress callback.
The single-query form of Account.runPipeline. Use it to materialise results rather than
paging through them in process; the returned Pipeline has started but not finished.
Changes this query's metadata.
Only the fields you pass are changed. The query text is versioned rather than edited in place — use Query.addVersion for that.
IncompatibleError against an instance older than 23.09.0.
Pins this object to one version of the query.
Version number, or "latest".
This query, for chaining.
A saved query: a stored SPARQL query that can be run, versioned and shared.
Remarks
Obtain one from an Account with
getQueryoraddQuery, and iterate an account's queries withgetQueries. Queries are never constructed directly.Example: Run a saved SELECT query and iterate its results
Example: Pin a version, so a later edit cannot change what you run