MCPcopy Create free account
hub / github.com/observablehq/framework / describeTables

Method describeTables

src/client/stdlib/sqlite.js:27–34  ·  view source on GitHub ↗
({schema} = {})

Source from the content-addressed store, hash-verified

25 return element("pre", {className: "observablehq--inspect"}, [text(rows.map((row) => row.detail).join("\n"))]);
26 }
27 async describeTables({schema} = {}) {
28 return this.query(
29 `SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${
30 schema == null ? "" : " AND schema = ?"
31 } AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`,
32 schema == null ? [] : [schema]
33 );
34 }
35 async describeColumns({schema, table} = {}) {
36 if (table == null) throw new Error("missing table");
37 const rows = await this.query(

Callers

nothing calls this directly

Calls 1

queryMethod · 0.95

Tested by

no test coverage detected