Código fuente wiki de QueryOnXWiki
Última modificación por dFa el 2024/09/06 15:25
Mostrar los últimos autores
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | #if($hasProgramming) | ||
| 3 | #set($sqlTools = $xwiki.parseGroovyFromPage('SQLTools.SQLToolsGroovy')) | ||
| 4 | #set($system = $sqlTools.getXWikiDatabaseSystem($xwiki, $xcontext)) | ||
| 5 | = Query = | ||
| 6 | Your database is: **$system** | ||
| 7 | $sqlTools.getForm($request, $doc, false, true) | ||
| 8 | #if($request.query) | ||
| 9 | #set($connection = $sqlTools.getXWikiConnection($xwiki, $xcontext)) | ||
| 10 | #set($results = $sqlTools.getResults($connection, $request.query, true)) | ||
| 11 | = Results = | ||
| 12 | $results | ||
| 13 | #end | ||
| 14 | #else | ||
| 15 | {{error}}Sorry, you need the programming rights to use this tool{{/error}} | ||
| 16 | #end | ||
| 17 | {{/velocity}} |