boolean value in FlureeQL Query #718
-
Hello, I'm testing the fluree query, but if I run the query below, I don't get the result I want. Is there a way to check only false value? query json {
"@context":{"ex": "http://example.org/", "schema": "http://schema.org/", "f": "https://ns.flur.ee/ledger#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#"}
"from": "test/test",
"where":
{
"@id": "?s",
"@type":"Event",
"ex:public":true // if set fasle, both false and true will come out
},
"select":{"?s":["*"]}
} this is 'create json' of sample data {
"@context":{"ex": "http://example.org/", "schema": "http://schema.org/", "f": "https://ns.flur.ee/ledger#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#"}
"ledger": "test/test",
"insert":[
{"@id":"2489651045","@type":"CreateEvent","ex:public":false,"ex:created_at":"2015-01-01T15:00:00Z"}
,{"@id":"2489651051","@type":"PushEvent","ex:public":true,"ex:created_at":"2015-01-01T15:00:01Z"}
,{"@id":"Event", "@type":"rdfs:Class"},
{"@id":"PushEvent", "rdfs:subClassOf":{"@id":"Event"}},
{"@id":"CreateEvent", "rdfs:subClassOf":{"@id":"Event"}},
]}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @keispace, that indeed seems like a bug. It may be related to issue #522 (already fixed), but in this case, the issue lies within the Although, you can leverage that functionality by using filters on a logical variable. {
"@context": {
"ex": "http://example.org/",
"schema": "http://schema.org/",
"f": "https://ns.flur.ee/ledger#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"from": "test/test",
"where": [
{
"@id": "?s",
"@type": "Event",
"ex:public": "?public"
},
[
"filter",
"(not ?public)"
]
],
"select": {
"?s": [
"*"
]
}
} |
Beta Was this translation helpful? Give feedback.
Hi @keispace, that indeed seems like a bug. It may be related to issue #522 (already fixed), but in this case, the issue lies within the
where
clause.Although, you can leverage that functionality by using filters on a logical variable.