You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SPARQL, FROM and FROM NAMED are ways to specify one or more data sets (graphs) the query will execute against.
Because FROM NAMED only works if you also support the SPARQL GRAPH statement, we can start by just implementing FROM, and initially only support a single data set.
To illustrate, this query specifies it should be run against the cookbook/test ledger:
This change will allow a query to be executed against a conn (connection) and not have to be executed against a db (although we should still support that, in which case :from is implied as being the db). This is the exact situation HTTP-API has, and to get around that limitation it introduced a non-standard "ledger" key to specify the ledger. This change eliminates the need for the proprietary key in favor of the SPARQL standard.
While executing a query against a conn is a departure from always executing a query against a db, it makes even more sense when federating a query across multiple ledgers (which is not part of this initial ticket). e.g., if you wanted to execute the above query against two ledgers, both cookbook/test and foo/bar, the following syntax would be used:
With this pattern, executing this query against either the cookbook/test or the foo/bardb doesn't make much sense... but executing it against a conn does make sense.
This ticket aims to include the following features:
Allow :from (from CLJ) and "from" (from JS) to specify only one ledger as the source, which can be a simple string or a one-element vector (e.g. :from "cookbook/test" or :from ["cookbook/test"]
Allow the query to be executed against a conn, in which case if :from is specified it will load the latest db of the specified ledger and execute the query against the db. If :from is not specified, or is an unknown ledger, throw an exception.
If a query with :from is executed against a db using the library, we ignore :from, and we will end up documenting that we ignore it in that circumstance.
This ticket excludes:
Querying against multiple :from ledgers/graphs (for now)
:from-named, which we'll introduce support for along with support for GRAPH
Time travel query, :from will always load the latest db to execute against (for now)
The text was updated successfully, but these errors were encountered:
Added ticket fluree/core#19 as the initial subtask to deliver immediate need on this ticket. This ticket should be repurposed later to describe work for enabling a query against multiple ledgers using the :from and :from-named keys with an array of ledger names.
In SPARQL,
FROM
andFROM NAMED
are ways to specify one or more data sets (graphs) the query will execute against.Because
FROM NAMED
only works if you also support the SPARQLGRAPH
statement, we can start by just implementingFROM
, and initially only support a single data set.To illustrate, this query specifies it should be run against the
cookbook/test
ledger:This change will allow a query to be executed against a
conn
(connection) and not have to be executed against adb
(although we should still support that, in which case:from
is implied as being the db). This is the exact situation HTTP-API has, and to get around that limitation it introduced a non-standard"ledger"
key to specify the ledger. This change eliminates the need for the proprietary key in favor of the SPARQL standard.While executing a query against a
conn
is a departure from always executing a query against adb
, it makes even more sense when federating a query across multiple ledgers (which is not part of this initial ticket). e.g., if you wanted to execute the above query against two ledgers, bothcookbook/test
andfoo/bar
, the following syntax would be used:With this pattern, executing this query against either the
cookbook/test
or thefoo/bar
db
doesn't make much sense... but executing it against aconn
does make sense.This ticket aims to include the following features:
:from
(from CLJ) and"from"
(from JS) to specify only one ledger as the source, which can be a simple string or a one-element vector (e.g.:from "cookbook/test"
or:from ["cookbook/test"]
conn
, in which case if:from
is specified it will load the latest db of the specified ledger and execute the query against the db. If:from
is not specified, or is an unknown ledger, throw an exception.:from
is executed against adb
using the library, we ignore:from
, and we will end up documenting that we ignore it in that circumstance.This ticket excludes:
:from
ledgers/graphs (for now):from-named
, which we'll introduce support for along with support forGRAPH
:from
will always load the latest db to execute against (for now)The text was updated successfully, but these errors were encountered: