On 3/17/14 8:04 PM, Quentin wrote:
Hi Hugh,Would:select ?o datatype(?o) from <g1> where {?s ?p ?o . filter (?o = "false"^^xsd:boolean) }return "False xsd:boolean"? Or nothing, because ?o is actually an integer?
Based on: Data Creation: with graph <g1> insert { <strue> <p1> "true"^^xsd:boolean . <sfalse> <p1> "false"^^xsd:boolean } Queries: select * from <g1> where {?s ?p "false"^^xsd:boolean} and select * from <g1> where {?s ?p "0"^^xsd:boolean}?o cannot be an integer, especially as its explicitly typed (as xsd:boolean) at data creation time. It would only be an integer if it was typed as xsd:integer at data creation time.
The only time you will run into issues is when, at data creation time, you have the relation object set as xsd:integer or no type at all.
The data creation statement above, doesn't create an integer. Likewise, if it was:
with graph <g1> insert { <strue> <p1> "1"^^xsd:boolean . <sfalse> <p1> "0"^^xsd:boolean } You will still get the same solution for: select * from <g1> where {?s ?p "false"^^xsd:boolean} and select * from <g1> where {?s ?p "0"^^xsd:boolean} . -- Regards, Kingsley Idehen Founder & CEO OpenLink Software Company Web: http://www.openlinksw.com Personal Weblog: http://www.openlinksw.com/blog/~kidehen Twitter Profile: https://twitter.com/kidehen Google+ Profile: https://plus.google.com/+KingsleyIdehen/about LinkedIn Profile: http://www.linkedin.com/in/kidehen
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech
_______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users