Readme

listSqliteTables

Returns a flat array of the names of all tables in your Val Town SQLite database.

import { listSqliteTables } from "https://esm.town/v/nbbaier/listSqliteTables"; console.log(await listSqliteTables())
1
2
3
4
5
6
7
import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
export async function listSqliteTables() {
return (await sqlite.execute(
`select name from sqlite_schema where type='table' and name != 'libsql_wasm_func_table' and name != 'sqlite_sequence'`,
)).rows.flat();
}
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!
March 4, 2024