GraphStore`
GraphStore`
SPARQLOptional
[Experimental]
SPARQLOptional[patt]
represents part of a pattern that does not need to match in order for the whole pattern to match.
Details and Options
- In SPARQLOptional[patt], patt can take the same form as in SPARQLSelect[patt].
Examples
Basic Examples (1)Summary of the most common use cases
In[1]:=1

✖
https://wolfram.com/xid/0cy7ex2uhi052ivh8byuvfg-zeyh9b
In[2]:=2

✖
https://wolfram.com/xid/0cy7ex2uhi052ivh8byuvfg-62gleg
In[3]:=3

✖
https://wolfram.com/xid/0cy7ex2uhi052ivh8byuvfg-6jbqjl
Find the color and optionally the shape of fruits:
In[4]:=4

✖
https://wolfram.com/xid/0cy7ex2uhi052ivh8byuvfg-yfnvq7
Out[4]=4

Wolfram Research (2019), SPARQLOptional, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
✖
Wolfram Research (2019), SPARQLOptional, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
Text
Wolfram Research (2019), SPARQLOptional, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
✖
Wolfram Research (2019), SPARQLOptional, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
CMS
Wolfram Language. 2019. "SPARQLOptional." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
✖
Wolfram Language. 2019. "SPARQLOptional." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html.
APA
Wolfram Language. (2019). SPARQLOptional. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html
✖
Wolfram Language. (2019). SPARQLOptional. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html
BibTeX
✖
@misc{reference.wolfram_2025_sparqloptional, author="Wolfram Research", title="{SPARQLOptional}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html}", note=[Accessed: 01-April-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_sparqloptional, organization={Wolfram Research}, title={SPARQLOptional}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLOptional.html}, note=[Accessed: 01-April-2025
]}