Skip to content

Commit 1e74a6f

Browse files
committed
update dependencies
1 parent 784dcb3 commit 1e74a6f

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/dependencies.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import dependency from "./dependency.js";
22
export const d3 = dependency("d3", "7.4.4", "dist/d3.min.js");
33
export const inputs = dependency("@observablehq/inputs", "0.10.4", "dist/inputs.min.js");
4-
export const plot = dependency("@observablehq/plot", "0.4.3", "dist/plot.umd.min.js");
4+
export const plot = dependency("@observablehq/plot", "0.5.0", "dist/plot.umd.min.js");
55
export const graphviz = dependency("@observablehq/graphviz", "0.2.1", "dist/graphviz.min.js");
66
export const highlight = dependency("@observablehq/highlight.js", "2.0.0", "highlight.min.js");
77
export const katex = dependency("@observablehq/katex", "0.11.1", "dist/katex.min.js");
88
export const lodash = dependency("lodash", "4.17.21", "lodash.min.js");
99
export const htl = dependency("htl", "0.3.1", "dist/htl.min.js");
10-
export const jszip = dependency("jszip", "3.9.1", "dist/jszip.min.js");
10+
export const jszip = dependency("jszip", "3.10.0", "dist/jszip.min.js");
1111
export const marked = dependency("marked", "0.3.12", "marked.min.js");
12-
export const sql = dependency("sql.js", "1.6.2", "dist/sql-wasm.js");
12+
export const sql = dependency("sql.js", "1.7.0", "dist/sql-wasm.js");
1313
export const vega = dependency("vega", "5.22.1", "build/vega.min.js");
1414
export const vegalite = dependency("vega-lite", "5.2.0", "build/vega-lite.min.js");
1515
export const vegaliteApi = dependency("vega-lite-api", "5.0.0", "build/vega-lite-api.min.js");
1616
export const arrow = dependency("apache-arrow", "4.0.1", "Arrow.es2015.min.js");
1717
export const arquero = dependency("arquero", "4.8.8", "dist/arquero.min.js");
1818
export const topojson = dependency("topojson-client", "3.1.0", "dist/topojson-client.min.js");
1919
export const exceljs = dependency("exceljs", "4.3.0", "dist/exceljs.min.js");
20-
export const mermaid = dependency("mermaid", "9.0.0", "dist/mermaid.min.js");
20+
export const mermaid = dependency("mermaid", "9.1.1", "dist/mermaid.min.js");
2121
export const leaflet = dependency("leaflet", "1.8.0", "dist/leaflet.js");

src/sqlite.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ export class SQLiteDatabaseClient {
3131
text(rows.map(row => row.detail).join("\n"))
3232
]);
3333
}
34-
async describeTables() {
35-
return this.query(`SELECT name FROM sqlite_master WHERE type = 'table'`);
34+
async describeTables({schema} = {}) {
35+
return this.query(`SELECT schema, name FROM pragma_table_list() WHERE type = 'table'${schema == null ? "" : ` AND schema = ?`}`, schema == null ? [] : [schema]);
3636
}
37-
async describeColumns({table} = {}) {
38-
const rows = await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?) ORDER BY cid`, [table]);
37+
async describeColumns({schema, table} = {}) {
38+
if (table == null) throw new Error(`missing table`);
39+
const rows = await this.query(`SELECT name, type, "notnull" FROM pragma_table_info(?${schema == null ? "" : `, ?`}) ORDER BY cid`, schema == null ? [table] : [table, schema]);
3940
if (!rows.length) throw new Error(`table not found: ${table}`);
4041
return rows.map(({name, type, notnull}) => ({name, type: sqliteType(type), databaseType: type, nullable: !notnull}));
4142
}

0 commit comments

Comments
 (0)