Re: retrieve a list of all distinct/unique resources in a store/repo

> Is it as simple as
>    repo.terms

Yes. This is true about any `RDF::Enumerable` (`Graph`, `Repository`,
etc...).

See
http://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable#terms-instance_method

- Tom

On Mon, Nov 20, 2017 at 8:47 AM, Anthony Durity <a.durity@umail.ucc.ie>
wrote:

> Replying to self:
>
> If using
>     repo = RDF::DataObjects::Repository.new uri:
> 'sqlite3:./db/development.sqlite3'
> Is it as simple as
>     repo.terms
> ?
>
> What about the SPARQL-y route?
>
> On 20 November 2017 at 16:42, Anthony Durity <a.durity@umail.ucc.ie>
> wrote:
>
>> Hi all,
>>
>> Trying to get a one dimensional array of all unique/distinct resources in
>> local store regardless be the resource a subject, predicate or object.
>>
>> To emphasize. I don't want distinct triples, I want distinct resources
>> (excluding literals and blank nodes).
>>
>> Both SPARQL-y and non SPARQL-y (Ruby RDF) answers welcome.
>>
>> Thanks!
>>
>>
>>
>


-- 
-Tom Johnson

Received on Monday, 20 November 2017 17:32:37 UTC