tripod
tripod copied to clipboard
Serialization of Resource and ResourceCollection yields database queries.
I have noticed that the serialization methods (to_rdf
, to_ttl
etc.) for Resource
and ResourceCollection
objects hit the database to retrieve resources that are previously loaded. Apart from the performance issues, this also means that the resources that are not persisted in the database cannot be serialized.
Is there perhaps a specific reason behind this, such as making sure that the output is consisted with the persisted data?
This is because rdf.rb is really slow at parsing and serialising lots of data, so the principle here was to let the database do the work.
Ah, that makes much more sense now. Thanks!
Serialization of ResourceCollection
objects fails in some cases, due to the use of broken CONSTRUCT
queries produced by _describe_query_for_select
.