
query.function.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-gui Show documentation
Show all versions of corese-gui Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint)
implementing RDF, RDFS, SPARQL 1.1 Query and Update, Shacl. STTL. LDScript.
The newest version!
#
# Extension functions defined in the query
#
select
(st:fib(10) as ?fib)
(st:fac(10) as ?fac)
(st:date() as ?date)
where {}
function st:fib(?n) {
if (?n <= 2, 1, st:fib(?n - 1) + st:fib(?n - 2))
}
function st:fac(?n) {
if (?n = 0, 1, ?n * st:fac(?n - 1))
}
function st:date() {
let (?d = now()){
concat(day(?d), "/", month(?d), "/", year(?d))
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy