All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.function.rq Maven / Gradle / Ivy

Go to download

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