Module:MySPARQL
From TITAF TANGOWIKI
Documentation for this module may be created at Module:MySPARQL/doc
local sparql = require('SPARQL') -- Load the SPARQL binding
local p = {}
function p.debugQuery(frame)
local sparqlQuery = frame.args[1]
local queryResults = sparql.runQuery(sparqlQuery)
if not queryResults then
return "SPARQL query failed! Check endpoint and extension."
end
return mw.text.jsonEncode(queryResults)
end
return p