Name

DB.DBA.RDF_DATATYPE_OF_OBJ — Returns the datatype of a given argument.

Synopsis

DB.DBA.RDF_DATATYPE_OF_OBJ ( in arg any ,
in type_val any );

Description

Returns the datatype of a given argument.

Parameters

arg

The argument which datatype should be returned.

type_val

The value to be returned for untyped literal arguments. When omitted, its default value http://www.w3.org/2001/XMLSchema#string is used.

Return Types

any

Examples

Example24.269.Usage Examples

# Explicit typecast (insert)
SQL> sparql insert into <test_datatype> { <a> <string> "string 1"^^xsd:string . };
callret-0
VARCHAR
_______________________________________________________________________________

Insert into <test_datatype>, 1 (or less) triples -- done

1 Rows. -- 94 msec.

#Not explicit typecast (insert)
SQL> sparql insert into <test_datatype> { <a> <string> "string 2". };
callret-0
VARCHAR
_______________________________________________________________________________

Insert into <test_datatype>, 1 (or less) triples -- done

1 Rows. -- 16 msec.

SQL> SPARQL
SELECT ?o (iri(sql:RDF_DATATYPE_OF_OBJ(?o, 'untyped!')))
FROM <test_datatype> { <a> <string> ?o} ;
o                       callret-1
VARCHAR                 VARCHAR
_______________________________________________________________________________

string 1                http://www.w3.org/2001/XMLSchema#string
string 2                untyped!

2 Rows. -- 16 msec.
SQL>