head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2001.08.03.15.29.42;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2001.08.02.23.04.53;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2001.08.02.22.47.43;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Don't print empty columns.
@
text
@<div id="adhocquery" class="app">

#if( !$loginUser.isAnonymous() && $servletTaskBar.available($servletName))
 #parse("$servletTaskBar.getPath($servletName)")
#end

<h3>Ad Hoc Query Utility</h3>

<p>Enter a SELECT query to be executed against the Tigris database.

<form action="AdHocQuery" method="get" enctype="application/x-www-form-urlencoded">

<p><textarea name="query" rows="5" cols="80" wrap="wrap">$query</textarea></p>

<p><input type="submit" name="Button" value="Run Query" /></p>

</form>

#if ($records)
<p><hr></p>

 <h3>Query results</h3>

 #set ($numColumns = $records.get(0).size())

 <table border="1">
  #foreach ($record in $records)
   <tr> 
    #foreach ($val in [1..$numColumns])
     <td>$!record.getValue($val).asString()</td>
    #end
   </tr>
  #end 
 </table>

<p><hr></p>

<pre>
#foreach ($record in $records)
#foreach ($val in [1..$numColumns])$!record.getValue($val).asString() #if($val < $numColumns)| #end#end

#end
</pre>
#end

</div>
@


1.2
log
@Added plaintext version of results to supplement table version.
@
text
@d20 1
a20 1
 <hr>
d24 1
a24 1
 #set ($numColumns = $records.get(0).size() - 1)
d28 5
a32 5
    <tr> 
     #foreach ($val in [1..$numColumns])
      <td>$!record.getValue($val).asString()</td>
     #end
    </tr>
d35 2
@


1.1
log
@New database user with read-only access to the Tigris database. Used to control access for the new ad hoc query feature and the XML-RPC handlers.
@
text
@d17 2
d26 1
a26 1
 <table border=1>
d28 6
a33 8
   #if ($record)
   <tr>   
    #foreach ($val in [1..$numColumns]) 
      <td>$record.getValue($val)</td>
    #end
   </tr>
   #end
  #end
d35 7
a42 2

</form>
@

