Hello Aldo,
I am operating over the RDF_QUAD table directly and I find myself in
> the need to transform all values obtained from column O to the
> explicit SQL type in a programmatic way.
> Is there any stored procedure I can use for this matter?
The SQL value can be extracted as __ro2sq(O).
The datatype can be extracted as DB.DBA.RDF_DATATYPE_OF_OBJ (O) if
IRI_ID of the type is enough or __ro2sq ( DB.DBA.RDF_DATATYPE_OF_OBJ
(O)),
The language can be extracted as DB.DBA.RDF_LANGUAGE_OF_OBJ (O).
OTOH it might be better to create an RDF View for a custom table with
formats rdfdf:default or rdfdf:default-nullable for columns similar to
O, and let SPARQL do the rest. (But I know too little about the
application in question to decide.)
> A quick glance at "sparql.sql" did not help and (re)implementing the
> heuristics to access the RDF Object storage table does not seem like a
> good idea ;)
When you want to find out how SPARQL do this or that trick, use
select sparql_to_sql_text ('query text here without a leading SPARQL keyword
and trailing semicolon')
or
string_to_file ('filename.sql', sparql_to_sql_text ('query text'), -2);
Best Regards,
Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com