/test/src/solidstack/hyperdb/tables.slt
Unknown | 18 lines | 18 code | 0 blank | 0 comment | 0 complexity | dc1bf08c2725d9c5acf4aa9014b04e09 MD5 | raw file
Possible License(s): Apache-2.0
1<%@ template version="1.0" language="groovy" contentType="text/html; charset=UTF-8" %> 2<%@ template import="solidstack.hyperdb.*" %> 3<% 4include( template: "/template", title: "Tables", body: { 5 def database = request.getParameter( "database" ) 6 def user = request.getParameter( "user" ) 7 def schema = request.getParameter( "schema" ) 8 def connections = session.getAttribute( "connections" ) 9 def connection = connections.getConnection( database, user ) 10 def tables = Database.getTables( connection, schema ) 11%> 12 <table id="tables"> 13 <tr><th>Table</th><th>approx # records</th></tr> 14<% for( Table table : tables ) { %> 15 <tr><td><a href="tables/${table.name}">${table.name}</a></td><td>${table.records}</td></tr> 16<% } %> 17 </table> 18<% } ) %>