1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/
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>
<ul>
{tables.map(t => (
<li>
<a href={t.toString()}>{t.toString()}</a>
</li>
))}
</ul>
</div>
);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
February 9, 2024