import { sqlite } from "https://esm.town/v/std/sqlite";
export async function sqlite_admin_tables() {
let data = await sqlite.execute(`
SELECT
name
FROM
sqlite_schema
WHERE
type ='table' AND
name NOT LIKE 'sqlite_%';`);
let tables = data.rows;
return (
<div>
<h1>SQLite Admin</h1>
<h2>Tables</h2>
<ul>
{tables.map(t => (
<li>
<a href={t.toString()}>{t.toString()}</a>
</li>
))}
</ul>
</div>
);
}