@perspective-dev/client 4.4.1 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/perspective-server.worker.js +1 -1
- package/dist/cdn/perspective-server.worker.js.map +2 -2
- package/dist/cdn/perspective.js +2 -2
- package/dist/cdn/perspective.js.map +3 -3
- package/dist/esm/perspective.browser.d.ts +19 -0
- package/dist/esm/perspective.inline.js +2 -2
- package/dist/esm/perspective.inline.js.map +3 -3
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +3 -3
- package/dist/esm/perspective.node.d.ts +12 -0
- package/dist/esm/perspective.node.js +160 -15
- package/dist/esm/perspective.node.js.map +2 -2
- package/dist/esm/ts-rs/TypedArrayWindow.d.ts +31 -0
- package/dist/esm/ts-rs/ViewWindow.d.ts +6 -0
- package/dist/esm/virtual_servers/duckdb.js +1 -1
- package/dist/esm/virtual_servers/duckdb.js.map +2 -2
- package/dist/wasm/perspective-js.d.ts +51 -5
- package/dist/wasm/perspective-js.js +167 -14
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +8 -5
- package/package.json +27 -3
- package/src/rust/client.rs +28 -0
- package/src/rust/lib.rs +4 -0
- package/src/rust/typed_array.rs +243 -0
- package/src/rust/view.rs +38 -0
- package/src/rust/virtual_server.rs +4 -4
- package/src/ts/perspective.browser.ts +89 -7
- package/src/ts/perspective.node.ts +15 -1
- package/src/ts/ts-rs/TypedArrayWindow.ts +26 -0
- package/src/ts/ts-rs/ViewWindow.ts +7 -1
- package/src/ts/virtual_servers/duckdb.ts +4 -0
- package/src/ts/wasm/engine.ts +2 -2
- package/src/ts/wasm/perspective-server.poly.ts +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for `with_typed_arrays`, extending `ViewWindow` with
|
|
3
|
+
* typed-array-specific options.
|
|
4
|
+
*/
|
|
5
|
+
export type TypedArrayWindow = {
|
|
6
|
+
/**
|
|
7
|
+
* When `true`, Float64/Date32/Timestamp columns are output as
|
|
8
|
+
* `Float32Array` instead of `Float64Array`.
|
|
9
|
+
*/
|
|
10
|
+
float32: boolean;
|
|
11
|
+
start_row?: number;
|
|
12
|
+
start_col?: number;
|
|
13
|
+
end_row?: number;
|
|
14
|
+
end_col?: number;
|
|
15
|
+
id?: boolean;
|
|
16
|
+
index?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Only impacts [`View::to_csv`]
|
|
19
|
+
*/
|
|
20
|
+
formatted?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Only impacts [`View::to_arrow`]
|
|
23
|
+
*/
|
|
24
|
+
compression?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When `true`, group-by columns use legacy `"colname (Group by N)"`
|
|
27
|
+
* naming. When `false`, they use `__ROW_PATH_N__` naming consistent
|
|
28
|
+
* with the SQL backend. Defaults to `true` for backwards compatibility.
|
|
29
|
+
*/
|
|
30
|
+
emit_legacy_row_path_names?: boolean;
|
|
31
|
+
};
|
|
@@ -19,4 +19,10 @@ export type ViewWindow = {
|
|
|
19
19
|
* Only impacts [`View::to_arrow`]
|
|
20
20
|
*/
|
|
21
21
|
compression?: string;
|
|
22
|
+
/**
|
|
23
|
+
* When `true`, group-by columns use legacy `"colname (Group by N)"`
|
|
24
|
+
* naming. When `false`, they use `__ROW_PATH_N__` naming consistent
|
|
25
|
+
* with the SQL backend. Defaults to `true` for backwards compatibility.
|
|
26
|
+
*/
|
|
27
|
+
emit_legacy_row_path_names?: boolean;
|
|
22
28
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var p=["sum","count","any_value","arbitrary","array_agg","avg","bit_and","bit_or","bit_xor","bitstring_agg","bool_and","bool_or","countif","favg","fsum","geomean","kahan_sum","last","max","min","product","string_agg","sumkahan"],d=["count","any_value","arbitrary","first","countif","last","string_agg"],l=["==","!=","LIKE","IS DISTINCT FROM","IS NOT DISTINCT FROM",">=","<=",">","<"];function g(r){return r=r.toLowerCase(),r==="varchar"||r=="utf8"?"string":r==="double"||r==="bigint"||r==="hugeint"||r==="float64"||r.startsWith("decimal")?"float":r.startsWith("int")?"integer":r.startsWith("date")?"date":r.startsWith("bool")?"boolean":r.startsWith("timestamp")?"datetime":
|
|
1
|
+
var p=["sum","count","any_value","arbitrary","array_agg","avg","bit_and","bit_or","bit_xor","bitstring_agg","bool_and","bool_or","countif","favg","fsum","geomean","kahan_sum","last","max","min","product","string_agg","sumkahan"],d=["count","any_value","arbitrary","first","countif","last","string_agg"],l=["==","!=","LIKE","IS DISTINCT FROM","IS NOT DISTINCT FROM",">=","<=",">","<"];function g(r){return r=r.toLowerCase(),r==="varchar"||r=="utf8"?"string":r==="double"||r==="bigint"||r==="hugeint"||r==="float64"||r.startsWith("decimal")?"float":r.startsWith("int")?"integer":r.startsWith("date")?"date":r.startsWith("bool")?"boolean":r.startsWith("timestamp")?"datetime":r.startsWith("json")||r.startsWith("struct")?"string":r.startsWith("time")?"float":(console.warn(`Unknown type '${r}'`),"string")}async function u(r,e,s={}){e=e.replace(/\s+/g," ").trim();try{let t=await r.query(e);return s.columns?{rows:t.toArray(),columns:t.schema.fields.map(i=>i.name),dtypes:t.schema.fields.map(i=>i.type.toString())}:t.toArray()}catch(t){throw console.error("Query error:",t),console.error("Query:",e),t}}var y=class{db;sqlBuilder;constructor(e,s){if(!s&&customElements){let t=customElements.get("perspective-viewer");if(t)s=t.__wasm_module__;else throw new Error("Missing perspective-client.wasm")}this.db=e,this.sqlBuilder=new s.GenericSQLVirtualServerModel}getFeatures(){return{group_by:!0,split_by:!0,sort:!0,expressions:!0,group_rollup_mode:["rollup","flat","total"],filter_ops:{integer:l,float:l,string:l,boolean:l,date:l,datetime:l},aggregates:{integer:p,float:p,string:d,boolean:d,date:d,datetime:d}}}async getHostedTables(){let e=this.sqlBuilder.getHostedTables();return(await u(this.db,e)).map(t=>{let i=t.toJSON();return`${i.database||"memory"}.${i.name}`})}async tableSchema(e,s){let t=this.sqlBuilder.tableSchema(e),i=await u(this.db,t),c={};for(let o of i){let n=o.toJSON(),a=n.column_name;a.startsWith("__")||(c[a]=g(n.column_type))}return c}async viewColumnSize(e,s){let t=this.sqlBuilder.viewColumnSize(e),i=await u(this.db,t),c=Number(Object.values(i[0].toJSON())[0]),o=s.group_by?.length||0,n=s.group_rollup_mode==="flat";return c-(o===0?0:n?o:o+1)}async tableSize(e){let s=this.sqlBuilder.tableSize(e),t=await u(this.db,s);return Number(t[0].toJSON()["count_star()"])}async tableMakeView(e,s,t){let i=this.sqlBuilder.tableMakeView(e,s,t);await u(this.db,i)}async tableValidateExpression(e,s){let t=this.sqlBuilder.tableValidateExpression(e,s),i=await u(this.db,t);return g(i[0].toJSON().column_type)}async viewDelete(e){let s=this.sqlBuilder.viewDelete(e);await u(this.db,s)}async viewGetMinMax(e,s,t){let i=this.sqlBuilder.viewGetMinMax(e,s,t),o=(await u(this.db,i))[0].toJSON(),[n,a]=Object.values(o);return typeof n=="bigint"&&(n=Number(n)),typeof a=="bigint"&&(a=Number(a)),{min:n??null,max:a??null}}async viewGetData(e,s,t,i,c){let o=this.sqlBuilder.viewGetData(e,s,i,t),n=await this.db.useUnsafe((a,m)=>a.runQuery(m,o));c.fromArrowIpc(n)}};export{y as DuckDBHandler};
|
|
2
2
|
//# sourceMappingURL=duckdb.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ts/virtual_servers/duckdb.ts"],
|
|
4
|
-
"sourcesContent": ["// \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n// \u2503 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2584 \u2580\u2588\u2588\u2588 \u2588 \u2503\n// \u2503 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2588 \u2580\u2580\u2580\u2580\u2580\u2588\u2580\u2580\u2580\u2580\u2580 \u2588 \u2580\u2580\u2580\u2580\u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2584 \u2580\u2588 \u2588 \u2580\u2580\u2580\u2580\u2580 \u2503\n// \u2503 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2588\u2588\u2580\u2580 \u2584\u2584\u2584\u2584\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584 \u2503\n// \u2503 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2580\u2588\u2584 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2503\n// \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252B\n// \u2503 Copyright (c) 2017, the Perspective Authors. \u2503\n// \u2503 \u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C \u2503\n// \u2503 This file is part of the Perspective library, distributed under the terms \u2503\n// \u2503 of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). \u2503\n// \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251B\n\n/**\n * An implementation of a Perspective Virtual Server for DuckDB.\n *\n * This import is optional, and so must be imported manually from either\n * `@perspective-dev/client/dist/esm/virtual_servers/duckdb.js` or\n * `@perspective-dev/client/src/ts/virtual_servers/duckdb.ts`, it is not\n * exported from the package root `@perspective-dev/client`\n *\n * @module\n */\n\nimport type * as perspective from \"@perspective-dev/client\";\nimport type { ColumnType } from \"@perspective-dev/client/dist/esm/ts-rs/ColumnType.d.ts\";\nimport type { ViewConfig } from \"@perspective-dev/client/dist/esm/ts-rs/ViewConfig.d.ts\";\nimport type { ViewWindow } from \"@perspective-dev/client/dist/esm/ts-rs/ViewWindow.d.ts\";\nimport type * as duckdb from \"@duckdb/duckdb-wasm\";\n\nconst NUMBER_AGGS = [\n \"sum\",\n \"count\",\n \"any_value\",\n \"arbitrary\",\n \"array_agg\",\n \"avg\",\n \"bit_and\",\n \"bit_or\",\n \"bit_xor\",\n \"bitstring_agg\",\n \"bool_and\",\n \"bool_or\",\n \"countif\",\n \"favg\",\n \"fsum\",\n \"geomean\",\n \"kahan_sum\",\n \"last\",\n \"max\",\n \"min\",\n \"product\",\n \"string_agg\",\n \"sumkahan\",\n];\n\nconst STRING_AGGS = [\n \"count\",\n \"any_value\",\n \"arbitrary\",\n \"first\",\n \"countif\",\n \"last\",\n \"string_agg\",\n];\n\nconst FILTER_OPS = [\n \"==\",\n \"!=\",\n \"LIKE\",\n \"IS DISTINCT FROM\",\n \"IS NOT DISTINCT FROM\",\n \">=\",\n \"<=\",\n \">\",\n \"<\",\n];\n\nfunction duckdbTypeToPsp(name: string): ColumnType {\n name = name.toLowerCase();\n if (name === \"varchar\" || name == \"utf8\") {\n return \"string\";\n }\n\n if (\n name === \"double\" ||\n name === \"bigint\" ||\n name === \"hugeint\" ||\n name === \"float64\" ||\n name.startsWith(\"decimal\")\n ) {\n return \"float\";\n }\n\n if (name.startsWith(\"int\")) {\n return \"integer\";\n }\n\n if (name.startsWith(\"date\")) {\n return \"date\";\n }\n\n if (name.startsWith(\"bool\")) {\n return \"boolean\";\n }\n\n if (name.startsWith(\"timestamp\")) {\n return \"datetime\";\n }\n\n if (name.startsWith(\"json\")) {\n return \"string\";\n }\n\n if (name.startsWith(\"struct\")) {\n return \"string\";\n }\n\n console.warn(`Unknown type '${name}'`);\n return \"string\";\n}\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options: { columns: true },\n): Promise<{\n rows: any[];\n columns: string[];\n dtypes: string[];\n}>;\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options?: { columns: false },\n): Promise<any[]>;\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options: { columns?: boolean } = {},\n) {\n query = query.replace(/\\s+/g, \" \").trim();\n try {\n const result = await db.query(query);\n if (options.columns) {\n return {\n rows: result.toArray(),\n columns: result.schema.fields.map((f) => f.name),\n dtypes: result.schema.fields.map((f) => f.type.toString()),\n };\n }\n\n return result.toArray();\n } catch (error) {\n console.error(\"Query error:\", error);\n console.error(\"Query:\", query);\n throw error;\n }\n}\n\n/**\n * An implementation of Perspective's Virtual Server for `@duckdb/duckdb-wasm`.\n */\nexport class DuckDBHandler implements perspective.VirtualServerHandler {\n private db: duckdb.AsyncDuckDBConnection;\n private sqlBuilder: perspective.GenericSQLVirtualServerModel;\n constructor(db: duckdb.AsyncDuckDBConnection, mod?: typeof perspective) {\n if (!mod) {\n if (customElements) {\n const viewer_class: any =\n customElements.get(\"perspective-viewer\");\n if (viewer_class) {\n mod = viewer_class.__wasm_module__;\n } else {\n throw new Error(\"Missing perspective-client.wasm\");\n }\n } else {\n }\n }\n\n this.db = db;\n this.sqlBuilder = new mod!.GenericSQLVirtualServerModel();\n }\n\n getFeatures() {\n return {\n group_by: true,\n split_by: true,\n sort: true,\n expressions: true,\n group_rollup_mode: [\"rollup\", \"flat\", \"total\"],\n filter_ops: {\n integer: FILTER_OPS,\n float: FILTER_OPS,\n string: FILTER_OPS,\n boolean: FILTER_OPS,\n date: FILTER_OPS,\n datetime: FILTER_OPS,\n },\n aggregates: {\n integer: NUMBER_AGGS,\n float: NUMBER_AGGS,\n string: STRING_AGGS,\n boolean: STRING_AGGS,\n date: STRING_AGGS,\n datetime: STRING_AGGS,\n },\n };\n }\n\n async getHostedTables() {\n const query = this.sqlBuilder.getHostedTables();\n const results = await runQuery(this.db, query);\n return results.map((row) => {\n const json = row.toJSON();\n return `${json.database || \"memory\"}.${json.name}`;\n });\n }\n\n async tableSchema(tableId: string, config?: ViewConfig) {\n const query = this.sqlBuilder.tableSchema(tableId);\n const results = await runQuery(this.db, query);\n const schema = {} as Record<string, ColumnType>;\n for (const result of results) {\n const res = result.toJSON();\n const colName = res.column_name;\n if (!colName.startsWith(\"__\")) {\n schema[colName] = duckdbTypeToPsp(\n res.column_type,\n ) as ColumnType;\n }\n }\n\n return schema;\n }\n\n async viewColumnSize(viewId: string, config: ViewConfig) {\n const query = this.sqlBuilder.viewColumnSize(viewId);\n const results = await runQuery(this.db, query);\n const count = Number(Object.values(results[0].toJSON())[0]);\n const gs = config.group_by?.length || 0;\n const is_flat = config.group_rollup_mode === \"flat\";\n return count - (gs === 0 ? 0 : is_flat ? gs : gs + 1);\n }\n\n async tableSize(tableId: string) {\n const query = this.sqlBuilder.tableSize(tableId);\n const results = await runQuery(this.db, query);\n return Number(results[0].toJSON()[\"count_star()\"]);\n }\n\n async tableMakeView(tableId: string, viewId: string, config: ViewConfig) {\n const query = this.sqlBuilder.tableMakeView(tableId, viewId, config);\n await runQuery(this.db, query);\n }\n\n async tableValidateExpression(tableId: string, expression: string) {\n const query = this.sqlBuilder.tableValidateExpression(\n tableId,\n expression,\n );\n const results = await runQuery(this.db, query);\n return duckdbTypeToPsp(\n results[0].toJSON()[\"column_type\"],\n ) as ColumnType;\n }\n\n async viewDelete(viewId: string) {\n const query = this.sqlBuilder.viewDelete(viewId);\n await runQuery(this.db, query);\n }\n\n async viewGetMinMax(\n viewId: string,\n columnName: string,\n config: ViewConfig,\n ) {\n const query = this.sqlBuilder.viewGetMinMax(viewId, columnName, config);\n const results = await runQuery(this.db, query);\n const row = results[0].toJSON();\n let [min, max] = Object.values(row);\n if (typeof min === \"bigint\") min = Number(min);\n if (typeof max === \"bigint\") max = Number(max);\n return { min: min ?? null, max: max ?? null };\n }\n\n async viewGetData(\n viewId: string,\n config: ViewConfig,\n schema: Record<string, ColumnType>,\n viewport: ViewWindow,\n dataSlice: perspective.VirtualDataSlice,\n ) {\n const query = this.sqlBuilder.viewGetData(\n viewId,\n config,\n viewport,\n schema,\n );\n\n const ipc = await this.db.useUnsafe((bindings, conn) =>\n bindings.runQuery(conn, query),\n );\n\n dataSlice.fromArrowIpc(ipc);\n }\n}\n"],
|
|
5
|
-
"mappings": "AA6BA,IAAMA,EAAc,CAChB,MACA,QACA,YACA,YACA,YACA,MACA,UACA,SACA,UACA,gBACA,WACA,UACA,UACA,OACA,OACA,UACA,YACA,OACA,MACA,MACA,UACA,aACA,UACJ,EAEMC,EAAc,CAChB,QACA,YACA,YACA,QACA,UACA,OACA,YACJ,EAEMC,EAAa,CACf,KACA,KACA,OACA,mBACA,uBACA,KACA,KACA,IACA,GACJ,EAEA,SAASC,EAAgBC,EAA0B,CAE/C,OADAA,EAAOA,EAAK,YAAY,EACpBA,IAAS,WAAaA,GAAQ,OACvB,SAIPA,IAAS,UACTA,IAAS,UACTA,IAAS,WACTA,IAAS,WACTA,EAAK,WAAW,SAAS,EAElB,QAGPA,EAAK,WAAW,KAAK,EACd,UAGPA,EAAK,WAAW,MAAM,EACf,OAGPA,EAAK,WAAW,MAAM,EACf,UAGPA,EAAK,WAAW,WAAW,EACpB,
|
|
4
|
+
"sourcesContent": ["// \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n// \u2503 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2584 \u2580\u2588\u2588\u2588 \u2588 \u2503\n// \u2503 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2588 \u2580\u2580\u2580\u2580\u2580\u2588\u2580\u2580\u2580\u2580\u2580 \u2588 \u2580\u2580\u2580\u2580\u2580\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2584 \u2580\u2588 \u2588 \u2580\u2580\u2580\u2580\u2580 \u2503\n// \u2503 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2580\u2580\u2580\u2580 \u2588\u2580\u2588\u2588\u2580\u2580 \u2584\u2584\u2584\u2584\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2584\u2584\u2584\u2584\u2584\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2584\u2584\u2584\u2584\u2584 \u2503\n// \u2503 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2580\u2588\u2584 \u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588 \u2588\u2588\u2588\u258C\u2590\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588 \u2503\n// \u2523\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u252B\n// \u2503 Copyright (c) 2017, the Perspective Authors. \u2503\n// \u2503 \u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C\u254C \u2503\n// \u2503 This file is part of the Perspective library, distributed under the terms \u2503\n// \u2503 of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). \u2503\n// \u2517\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u251B\n\n/**\n * An implementation of a Perspective Virtual Server for DuckDB.\n *\n * This import is optional, and so must be imported manually from either\n * `@perspective-dev/client/dist/esm/virtual_servers/duckdb.js` or\n * `@perspective-dev/client/src/ts/virtual_servers/duckdb.ts`, it is not\n * exported from the package root `@perspective-dev/client`\n *\n * @module\n */\n\nimport type * as perspective from \"@perspective-dev/client\";\nimport type { ColumnType } from \"@perspective-dev/client/dist/esm/ts-rs/ColumnType.d.ts\";\nimport type { ViewConfig } from \"@perspective-dev/client/dist/esm/ts-rs/ViewConfig.d.ts\";\nimport type { ViewWindow } from \"@perspective-dev/client/dist/esm/ts-rs/ViewWindow.d.ts\";\nimport type * as duckdb from \"@duckdb/duckdb-wasm\";\n\nconst NUMBER_AGGS = [\n \"sum\",\n \"count\",\n \"any_value\",\n \"arbitrary\",\n \"array_agg\",\n \"avg\",\n \"bit_and\",\n \"bit_or\",\n \"bit_xor\",\n \"bitstring_agg\",\n \"bool_and\",\n \"bool_or\",\n \"countif\",\n \"favg\",\n \"fsum\",\n \"geomean\",\n \"kahan_sum\",\n \"last\",\n \"max\",\n \"min\",\n \"product\",\n \"string_agg\",\n \"sumkahan\",\n];\n\nconst STRING_AGGS = [\n \"count\",\n \"any_value\",\n \"arbitrary\",\n \"first\",\n \"countif\",\n \"last\",\n \"string_agg\",\n];\n\nconst FILTER_OPS = [\n \"==\",\n \"!=\",\n \"LIKE\",\n \"IS DISTINCT FROM\",\n \"IS NOT DISTINCT FROM\",\n \">=\",\n \"<=\",\n \">\",\n \"<\",\n];\n\nfunction duckdbTypeToPsp(name: string): ColumnType {\n name = name.toLowerCase();\n if (name === \"varchar\" || name == \"utf8\") {\n return \"string\";\n }\n\n if (\n name === \"double\" ||\n name === \"bigint\" ||\n name === \"hugeint\" ||\n name === \"float64\" ||\n name.startsWith(\"decimal\")\n ) {\n return \"float\";\n }\n\n if (name.startsWith(\"int\")) {\n return \"integer\";\n }\n\n if (name.startsWith(\"date\")) {\n return \"date\";\n }\n\n if (name.startsWith(\"bool\")) {\n return \"boolean\";\n }\n\n if (name.startsWith(\"timestamp\")) {\n return \"datetime\";\n }\n\n if (name.startsWith(\"json\")) {\n return \"string\";\n }\n\n if (name.startsWith(\"struct\")) {\n return \"string\";\n }\n\n if (name.startsWith(\"time\")) {\n return \"float\";\n }\n\n console.warn(`Unknown type '${name}'`);\n return \"string\";\n}\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options: { columns: true },\n): Promise<{\n rows: any[];\n columns: string[];\n dtypes: string[];\n}>;\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options?: { columns: false },\n): Promise<any[]>;\n\nasync function runQuery(\n db: duckdb.AsyncDuckDBConnection,\n query: string,\n options: { columns?: boolean } = {},\n) {\n query = query.replace(/\\s+/g, \" \").trim();\n try {\n const result = await db.query(query);\n if (options.columns) {\n return {\n rows: result.toArray(),\n columns: result.schema.fields.map((f) => f.name),\n dtypes: result.schema.fields.map((f) => f.type.toString()),\n };\n }\n\n return result.toArray();\n } catch (error) {\n console.error(\"Query error:\", error);\n console.error(\"Query:\", query);\n throw error;\n }\n}\n\n/**\n * An implementation of Perspective's Virtual Server for `@duckdb/duckdb-wasm`.\n */\nexport class DuckDBHandler implements perspective.VirtualServerHandler {\n private db: duckdb.AsyncDuckDBConnection;\n private sqlBuilder: perspective.GenericSQLVirtualServerModel;\n constructor(db: duckdb.AsyncDuckDBConnection, mod?: typeof perspective) {\n if (!mod) {\n if (customElements) {\n const viewer_class: any =\n customElements.get(\"perspective-viewer\");\n if (viewer_class) {\n mod = viewer_class.__wasm_module__;\n } else {\n throw new Error(\"Missing perspective-client.wasm\");\n }\n } else {\n }\n }\n\n this.db = db;\n this.sqlBuilder = new mod!.GenericSQLVirtualServerModel();\n }\n\n getFeatures() {\n return {\n group_by: true,\n split_by: true,\n sort: true,\n expressions: true,\n group_rollup_mode: [\"rollup\", \"flat\", \"total\"],\n filter_ops: {\n integer: FILTER_OPS,\n float: FILTER_OPS,\n string: FILTER_OPS,\n boolean: FILTER_OPS,\n date: FILTER_OPS,\n datetime: FILTER_OPS,\n },\n aggregates: {\n integer: NUMBER_AGGS,\n float: NUMBER_AGGS,\n string: STRING_AGGS,\n boolean: STRING_AGGS,\n date: STRING_AGGS,\n datetime: STRING_AGGS,\n },\n };\n }\n\n async getHostedTables() {\n const query = this.sqlBuilder.getHostedTables();\n const results = await runQuery(this.db, query);\n return results.map((row) => {\n const json = row.toJSON();\n return `${json.database || \"memory\"}.${json.name}`;\n });\n }\n\n async tableSchema(tableId: string, config?: ViewConfig) {\n const query = this.sqlBuilder.tableSchema(tableId);\n const results = await runQuery(this.db, query);\n const schema = {} as Record<string, ColumnType>;\n for (const result of results) {\n const res = result.toJSON();\n const colName = res.column_name;\n if (!colName.startsWith(\"__\")) {\n schema[colName] = duckdbTypeToPsp(\n res.column_type,\n ) as ColumnType;\n }\n }\n\n return schema;\n }\n\n async viewColumnSize(viewId: string, config: ViewConfig) {\n const query = this.sqlBuilder.viewColumnSize(viewId);\n const results = await runQuery(this.db, query);\n const count = Number(Object.values(results[0].toJSON())[0]);\n const gs = config.group_by?.length || 0;\n const is_flat = config.group_rollup_mode === \"flat\";\n return count - (gs === 0 ? 0 : is_flat ? gs : gs + 1);\n }\n\n async tableSize(tableId: string) {\n const query = this.sqlBuilder.tableSize(tableId);\n const results = await runQuery(this.db, query);\n return Number(results[0].toJSON()[\"count_star()\"]);\n }\n\n async tableMakeView(tableId: string, viewId: string, config: ViewConfig) {\n const query = this.sqlBuilder.tableMakeView(tableId, viewId, config);\n await runQuery(this.db, query);\n }\n\n async tableValidateExpression(tableId: string, expression: string) {\n const query = this.sqlBuilder.tableValidateExpression(\n tableId,\n expression,\n );\n const results = await runQuery(this.db, query);\n return duckdbTypeToPsp(\n results[0].toJSON()[\"column_type\"],\n ) as ColumnType;\n }\n\n async viewDelete(viewId: string) {\n const query = this.sqlBuilder.viewDelete(viewId);\n await runQuery(this.db, query);\n }\n\n async viewGetMinMax(\n viewId: string,\n columnName: string,\n config: ViewConfig,\n ) {\n const query = this.sqlBuilder.viewGetMinMax(viewId, columnName, config);\n const results = await runQuery(this.db, query);\n const row = results[0].toJSON();\n let [min, max] = Object.values(row);\n if (typeof min === \"bigint\") min = Number(min);\n if (typeof max === \"bigint\") max = Number(max);\n return { min: min ?? null, max: max ?? null };\n }\n\n async viewGetData(\n viewId: string,\n config: ViewConfig,\n schema: Record<string, ColumnType>,\n viewport: ViewWindow,\n dataSlice: perspective.VirtualDataSlice,\n ) {\n const query = this.sqlBuilder.viewGetData(\n viewId,\n config,\n viewport,\n schema,\n );\n\n const ipc = await this.db.useUnsafe((bindings, conn) =>\n bindings.runQuery(conn, query),\n );\n\n dataSlice.fromArrowIpc(ipc);\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["NUMBER_AGGS", "STRING_AGGS", "FILTER_OPS", "duckdbTypeToPsp", "name", "runQuery", "db", "query", "options", "result", "f", "error", "DuckDBHandler", "mod", "viewer_class", "row", "json", "tableId", "config", "results", "schema", "res", "colName", "viewId", "count", "gs", "is_flat", "expression", "columnName", "min", "max", "viewport", "dataSlice", "ipc", "bindings", "conn"]
|
|
7
7
|
}
|
|
@@ -17,10 +17,12 @@ export type * from "../../src/ts/ts-rs/Filter.d.ts";
|
|
|
17
17
|
export type * from "../../src/ts/ts-rs/ViewConfig.d.ts";
|
|
18
18
|
export type * from "../../src/ts/ts-rs/JoinOptions.ts";
|
|
19
19
|
export type * from "../../src/ts/ts-rs/JoinType.ts";
|
|
20
|
+
export type * from "../../src/ts/ts-rs/TypedArrayWindow.ts";
|
|
20
21
|
|
|
21
22
|
import type {ColumnWindow} from "../../src/ts/ts-rs/ColumnWindow.d.ts";
|
|
22
23
|
import type {ColumnType} from "../../src/ts/ts-rs/ColumnType.d.ts";
|
|
23
24
|
import type {ViewWindow} from "../../src/ts/ts-rs/ViewWindow.d.ts";
|
|
25
|
+
import type {TypedArrayWindow} from "../../src/ts/ts-rs/TypedArrayWindow.ts";
|
|
24
26
|
import type {TableInitOptions} from "../../src/ts/ts-rs/TableInitOptions.d.ts";
|
|
25
27
|
import type {JoinOptions} from "../../src/ts/ts-rs/JoinOptions.ts";
|
|
26
28
|
import type {JoinType} from "../../src/ts/ts-rs/JoinType.ts";
|
|
@@ -75,6 +77,29 @@ export class Client {
|
|
|
75
77
|
free(): void;
|
|
76
78
|
[Symbol.dispose](): void;
|
|
77
79
|
__getClassname(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Unsafely gets a [`View`] by raw ID, useful for JavaScript multi-threaded
|
|
82
|
+
* (via Web Worker) context where a standard `View` cannot otherwise be
|
|
83
|
+
* shared because its wrapper is not serializable.
|
|
84
|
+
*
|
|
85
|
+
* # Safety
|
|
86
|
+
*
|
|
87
|
+
* This method is unsafe because the lifetime of a [`View`] is bound to
|
|
88
|
+
* the [`Client`] which created it.
|
|
89
|
+
*
|
|
90
|
+
* The caller must guarantee that `entity_id` corresponds to a live
|
|
91
|
+
* [`crate::View`] on the connected server (obtained from another
|
|
92
|
+
* [`Client`]'s [`crate::View::get_name`] and forwarded across the
|
|
93
|
+
* serialization boundary).
|
|
94
|
+
*
|
|
95
|
+
* # JavaScript Examples
|
|
96
|
+
*
|
|
97
|
+
* ```javascript
|
|
98
|
+
* const view = client.__unsafe_open_view(name_from_main_thread);
|
|
99
|
+
* const cols = await view.to_columns();
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
__unsafe_open_view(entity_id: string): View;
|
|
78
103
|
/**
|
|
79
104
|
* Retrieves the names of all tables that this client has access to.
|
|
80
105
|
*
|
|
@@ -537,6 +562,7 @@ export class View {
|
|
|
537
562
|
free(): void;
|
|
538
563
|
[Symbol.dispose](): void;
|
|
539
564
|
__get_model(): View;
|
|
565
|
+
__unsafe_get_name(): string;
|
|
540
566
|
/**
|
|
541
567
|
* Collapses the `group_by` row at `row_index`.
|
|
542
568
|
*/
|
|
@@ -711,6 +737,23 @@ export class View {
|
|
|
711
737
|
* formatted [`String`].
|
|
712
738
|
*/
|
|
713
739
|
to_ndjson(window?: ViewWindow | null): Promise<string>;
|
|
740
|
+
/**
|
|
741
|
+
* Fetches columns from the [`View`] in Arrow format, decodes them, and
|
|
742
|
+
* passes typed array views to `callback`. All arrays are only valid for
|
|
743
|
+
* the duration of the callback — if `callback` returns a `Promise`, it
|
|
744
|
+
* is awaited before the backing Arrow buffer is released, so async
|
|
745
|
+
* callbacks may use the views for the full duration of the awaited
|
|
746
|
+
* work (e.g. across an `await requestAnimationFrame`-backed promise).
|
|
747
|
+
*
|
|
748
|
+
* # Arguments
|
|
749
|
+
*
|
|
750
|
+
* - `window` - Optional [`TypedArrayWindow`] controlling row/column
|
|
751
|
+
* windowing and output options (e.g., `float32` mode).
|
|
752
|
+
* - `callback` - A JS function called with `(names: string[], values:
|
|
753
|
+
* TypedArray[], validities: (Uint8Array|null)[], dictionaries:
|
|
754
|
+
* (string[]|null)[]) => void | Promise<void>`.
|
|
755
|
+
*/
|
|
756
|
+
with_typed_arrays(window: TypedArrayWindow | null | undefined, callback: Function): Promise<void>;
|
|
714
757
|
}
|
|
715
758
|
|
|
716
759
|
export class VirtualDataSlice {
|
|
@@ -747,6 +790,7 @@ export interface InitOutput {
|
|
|
747
790
|
readonly __wbg_virtualdataslice_free: (a: number, b: number) => void;
|
|
748
791
|
readonly __wbg_virtualserver_free: (a: number, b: number) => void;
|
|
749
792
|
readonly client___getClassname: (a: number, b: number) => void;
|
|
793
|
+
readonly client___unsafe_open_view: (a: number, b: number, c: number) => number;
|
|
750
794
|
readonly client_get_hosted_table_names: (a: number) => number;
|
|
751
795
|
readonly client_handle_error: (a: number, b: number, c: number, d: number) => number;
|
|
752
796
|
readonly client_handle_response: (a: number, b: number) => number;
|
|
@@ -795,6 +839,7 @@ export interface InitOutput {
|
|
|
795
839
|
readonly table_validate_expressions: (a: number, b: number) => number;
|
|
796
840
|
readonly table_view: (a: number, b: number) => number;
|
|
797
841
|
readonly view___get_model: (a: number) => number;
|
|
842
|
+
readonly view___unsafe_get_name: (a: number, b: number) => void;
|
|
798
843
|
readonly view_collapse: (a: number, b: number) => number;
|
|
799
844
|
readonly view_column_paths: (a: number, b: number) => number;
|
|
800
845
|
readonly view_delete: (a: number) => number;
|
|
@@ -818,6 +863,7 @@ export interface InitOutput {
|
|
|
818
863
|
readonly view_to_json: (a: number, b: number) => number;
|
|
819
864
|
readonly view_to_json_string: (a: number, b: number) => number;
|
|
820
865
|
readonly view_to_ndjson: (a: number, b: number) => number;
|
|
866
|
+
readonly view_with_typed_arrays: (a: number, b: number, c: number) => number;
|
|
821
867
|
readonly virtualdataslice_fromArrowIpc: (a: number, b: number, c: number) => void;
|
|
822
868
|
readonly virtualdataslice_new: (a: number) => number;
|
|
823
869
|
readonly virtualdataslice_setBooleanCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -828,11 +874,11 @@ export interface InitOutput {
|
|
|
828
874
|
readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
829
875
|
readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
830
876
|
readonly virtualserver_new: (a: number, b: number) => void;
|
|
831
|
-
readonly
|
|
832
|
-
readonly
|
|
833
|
-
readonly
|
|
834
|
-
readonly
|
|
835
|
-
readonly
|
|
877
|
+
readonly __wasm_bindgen_func_elem_860: (a: number, b: number) => void;
|
|
878
|
+
readonly __wasm_bindgen_func_elem_4015: (a: number, b: number) => void;
|
|
879
|
+
readonly __wasm_bindgen_func_elem_11006: (a: number, b: number, c: number, d: number) => void;
|
|
880
|
+
readonly __wasm_bindgen_func_elem_4032: (a: number, b: number, c: number) => void;
|
|
881
|
+
readonly __wasm_bindgen_func_elem_1768: (a: number, b: number) => number;
|
|
836
882
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
837
883
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
838
884
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -72,6 +72,36 @@ export class Client {
|
|
|
72
72
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Unsafely gets a [`View`] by raw ID, useful for JavaScript multi-threaded
|
|
77
|
+
* (via Web Worker) context where a standard `View` cannot otherwise be
|
|
78
|
+
* shared because its wrapper is not serializable.
|
|
79
|
+
*
|
|
80
|
+
* # Safety
|
|
81
|
+
*
|
|
82
|
+
* This method is unsafe because the lifetime of a [`View`] is bound to
|
|
83
|
+
* the [`Client`] which created it.
|
|
84
|
+
*
|
|
85
|
+
* The caller must guarantee that `entity_id` corresponds to a live
|
|
86
|
+
* [`crate::View`] on the connected server (obtained from another
|
|
87
|
+
* [`Client`]'s [`crate::View::get_name`] and forwarded across the
|
|
88
|
+
* serialization boundary).
|
|
89
|
+
*
|
|
90
|
+
* # JavaScript Examples
|
|
91
|
+
*
|
|
92
|
+
* ```javascript
|
|
93
|
+
* const view = client.__unsafe_open_view(name_from_main_thread);
|
|
94
|
+
* const cols = await view.to_columns();
|
|
95
|
+
* ```
|
|
96
|
+
* @param {string} entity_id
|
|
97
|
+
* @returns {View}
|
|
98
|
+
*/
|
|
99
|
+
__unsafe_open_view(entity_id) {
|
|
100
|
+
const ptr0 = passStringToWasm0(entity_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
101
|
+
const len0 = WASM_VECTOR_LEN;
|
|
102
|
+
const ret = wasm.client___unsafe_open_view(this.__wbg_ptr, ptr0, len0);
|
|
103
|
+
return View.__wrap(ret);
|
|
104
|
+
}
|
|
75
105
|
/**
|
|
76
106
|
* Retrieves the names of all tables that this client has access to.
|
|
77
107
|
*
|
|
@@ -1094,6 +1124,22 @@ export class View {
|
|
|
1094
1124
|
const ret = wasm.view___get_model(this.__wbg_ptr);
|
|
1095
1125
|
return View.__wrap(ret);
|
|
1096
1126
|
}
|
|
1127
|
+
/**
|
|
1128
|
+
* @returns {string}
|
|
1129
|
+
*/
|
|
1130
|
+
__unsafe_get_name() {
|
|
1131
|
+
try {
|
|
1132
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1133
|
+
wasm.view___unsafe_get_name(retptr, this.__wbg_ptr);
|
|
1134
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1135
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1136
|
+
var v1 = getCachedStringFromWasm0(r0, r1);
|
|
1137
|
+
if (r0 !== 0) { wasm.__wbindgen_export4(r0, r1, 1); }
|
|
1138
|
+
return v1;
|
|
1139
|
+
} finally {
|
|
1140
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1097
1143
|
/**
|
|
1098
1144
|
* Collapses the `group_by` row at `row_index`.
|
|
1099
1145
|
* @param {number} row_index
|
|
@@ -1380,6 +1426,29 @@ export class View {
|
|
|
1380
1426
|
const ret = wasm.view_to_ndjson(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window));
|
|
1381
1427
|
return takeObject(ret);
|
|
1382
1428
|
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Fetches columns from the [`View`] in Arrow format, decodes them, and
|
|
1431
|
+
* passes typed array views to `callback`. All arrays are only valid for
|
|
1432
|
+
* the duration of the callback — if `callback` returns a `Promise`, it
|
|
1433
|
+
* is awaited before the backing Arrow buffer is released, so async
|
|
1434
|
+
* callbacks may use the views for the full duration of the awaited
|
|
1435
|
+
* work (e.g. across an `await requestAnimationFrame`-backed promise).
|
|
1436
|
+
*
|
|
1437
|
+
* # Arguments
|
|
1438
|
+
*
|
|
1439
|
+
* - `window` - Optional [`TypedArrayWindow`] controlling row/column
|
|
1440
|
+
* windowing and output options (e.g., `float32` mode).
|
|
1441
|
+
* - `callback` - A JS function called with `(names: string[], values:
|
|
1442
|
+
* TypedArray[], validities: (Uint8Array|null)[], dictionaries:
|
|
1443
|
+
* (string[]|null)[]) => void | Promise<void>`.
|
|
1444
|
+
* @param {TypedArrayWindow | null | undefined} window
|
|
1445
|
+
* @param {Function} callback
|
|
1446
|
+
* @returns {Promise<void>}
|
|
1447
|
+
*/
|
|
1448
|
+
with_typed_arrays(window, callback) {
|
|
1449
|
+
const ret = wasm.view_with_typed_arrays(this.__wbg_ptr, isLikeNone(window) ? 0 : addHeapObject(window), addHeapObject(callback));
|
|
1450
|
+
return takeObject(ret);
|
|
1451
|
+
}
|
|
1383
1452
|
}
|
|
1384
1453
|
if (Symbol.dispose) View.prototype[Symbol.dispose] = View.prototype.free;
|
|
1385
1454
|
|
|
@@ -1717,6 +1786,10 @@ function __wbg_get_imports() {
|
|
|
1717
1786
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1718
1787
|
return addHeapObject(ret);
|
|
1719
1788
|
}, arguments); },
|
|
1789
|
+
__wbg_call_41bedb84c3e5c0c9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1790
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4), getObject(arg5));
|
|
1791
|
+
return addHeapObject(ret);
|
|
1792
|
+
}, arguments); },
|
|
1720
1793
|
__wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1721
1794
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1722
1795
|
return addHeapObject(ret);
|
|
@@ -1943,7 +2016,7 @@ function __wbg_get_imports() {
|
|
|
1943
2016
|
const a = state0.a;
|
|
1944
2017
|
state0.a = 0;
|
|
1945
2018
|
try {
|
|
1946
|
-
return
|
|
2019
|
+
return __wasm_bindgen_func_elem_11006(a, state0.b, arg0, arg1);
|
|
1947
2020
|
} finally {
|
|
1948
2021
|
state0.a = a;
|
|
1949
2022
|
}
|
|
@@ -1971,6 +2044,10 @@ function __wbg_get_imports() {
|
|
|
1971
2044
|
const ret = new Function(v0);
|
|
1972
2045
|
return addHeapObject(ret);
|
|
1973
2046
|
},
|
|
2047
|
+
__wbg_new_with_length_1763c527b2923202: function(arg0) {
|
|
2048
|
+
const ret = new Array(arg0 >>> 0);
|
|
2049
|
+
return addHeapObject(ret);
|
|
2050
|
+
},
|
|
1974
2051
|
__wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
|
|
1975
2052
|
const ret = getObject(arg0).next();
|
|
1976
2053
|
return addHeapObject(ret);
|
|
@@ -2097,13 +2174,13 @@ function __wbg_get_imports() {
|
|
|
2097
2174
|
console.warn(getObject(arg0));
|
|
2098
2175
|
},
|
|
2099
2176
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2100
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 12, function: Function { arguments: [], shim_idx:
|
|
2101
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
2177
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 12, function: Function { arguments: [], shim_idx: 31, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: false }) -> Externref`.
|
|
2178
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_860, __wasm_bindgen_func_elem_1768);
|
|
2102
2179
|
return addHeapObject(ret);
|
|
2103
2180
|
},
|
|
2104
2181
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2105
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2106
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2182
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 568, function: Function { arguments: [Externref], shim_idx: 569, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2183
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4015, __wasm_bindgen_func_elem_4032);
|
|
2107
2184
|
return addHeapObject(ret);
|
|
2108
2185
|
},
|
|
2109
2186
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -2123,23 +2200,43 @@ function __wbg_get_imports() {
|
|
|
2123
2200
|
return addHeapObject(ret);
|
|
2124
2201
|
},
|
|
2125
2202
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
2203
|
+
// Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
|
|
2204
|
+
const ret = getArrayF32FromWasm0(arg0, arg1);
|
|
2205
|
+
return addHeapObject(ret);
|
|
2206
|
+
},
|
|
2207
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
2208
|
+
// Cast intrinsic for `Ref(Slice(F64)) -> NamedExternref("Float64Array")`.
|
|
2209
|
+
const ret = getArrayF64FromWasm0(arg0, arg1);
|
|
2210
|
+
return addHeapObject(ret);
|
|
2211
|
+
},
|
|
2212
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
2213
|
+
// Cast intrinsic for `Ref(Slice(I32)) -> NamedExternref("Int32Array")`.
|
|
2214
|
+
const ret = getArrayI32FromWasm0(arg0, arg1);
|
|
2215
|
+
return addHeapObject(ret);
|
|
2216
|
+
},
|
|
2217
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
2218
|
+
// Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref("Uint32Array")`.
|
|
2219
|
+
const ret = getArrayU32FromWasm0(arg0, arg1);
|
|
2220
|
+
return addHeapObject(ret);
|
|
2221
|
+
},
|
|
2222
|
+
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
2126
2223
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
2127
2224
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2128
2225
|
return addHeapObject(ret);
|
|
2129
2226
|
},
|
|
2130
|
-
|
|
2227
|
+
__wbindgen_cast_000000000000000b: function(arg0) {
|
|
2131
2228
|
// Cast intrinsic for `U64 -> Externref`.
|
|
2132
2229
|
const ret = BigInt.asUintN(64, arg0);
|
|
2133
2230
|
return addHeapObject(ret);
|
|
2134
2231
|
},
|
|
2135
|
-
|
|
2232
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
2136
2233
|
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
2137
2234
|
wasm.__wbindgen_export4(arg0, arg1 * 4, 4);
|
|
2138
2235
|
// Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
|
|
2139
2236
|
const ret = v0;
|
|
2140
2237
|
return addHeapObject(ret);
|
|
2141
2238
|
},
|
|
2142
|
-
|
|
2239
|
+
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
2143
2240
|
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2144
2241
|
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
2145
2242
|
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
@@ -2160,17 +2257,17 @@ function __wbg_get_imports() {
|
|
|
2160
2257
|
};
|
|
2161
2258
|
}
|
|
2162
2259
|
|
|
2163
|
-
function
|
|
2164
|
-
const ret = wasm.
|
|
2260
|
+
function __wasm_bindgen_func_elem_1768(arg0, arg1) {
|
|
2261
|
+
const ret = wasm.__wasm_bindgen_func_elem_1768(arg0, arg1);
|
|
2165
2262
|
return takeObject(ret);
|
|
2166
2263
|
}
|
|
2167
2264
|
|
|
2168
|
-
function
|
|
2169
|
-
wasm.
|
|
2265
|
+
function __wasm_bindgen_func_elem_4032(arg0, arg1, arg2) {
|
|
2266
|
+
wasm.__wasm_bindgen_func_elem_4032(arg0, arg1, addHeapObject(arg2));
|
|
2170
2267
|
}
|
|
2171
2268
|
|
|
2172
|
-
function
|
|
2173
|
-
wasm.
|
|
2269
|
+
function __wasm_bindgen_func_elem_11006(arg0, arg1, arg2, arg3) {
|
|
2270
|
+
wasm.__wasm_bindgen_func_elem_11006(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2174
2271
|
}
|
|
2175
2272
|
|
|
2176
2273
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2291,6 +2388,21 @@ function dropObject(idx) {
|
|
|
2291
2388
|
heap_next = idx;
|
|
2292
2389
|
}
|
|
2293
2390
|
|
|
2391
|
+
function getArrayF32FromWasm0(ptr, len) {
|
|
2392
|
+
ptr = ptr >>> 0;
|
|
2393
|
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
2397
|
+
ptr = ptr >>> 0;
|
|
2398
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
function getArrayI32FromWasm0(ptr, len) {
|
|
2402
|
+
ptr = ptr >>> 0;
|
|
2403
|
+
return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2294
2406
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2295
2407
|
ptr = ptr >>> 0;
|
|
2296
2408
|
const mem = getDataViewMemory0();
|
|
@@ -2301,6 +2413,11 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
2301
2413
|
return result;
|
|
2302
2414
|
}
|
|
2303
2415
|
|
|
2416
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
2417
|
+
ptr = ptr >>> 0;
|
|
2418
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2304
2421
|
function getArrayU8FromWasm0(ptr, len) {
|
|
2305
2422
|
ptr = ptr >>> 0;
|
|
2306
2423
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -2322,11 +2439,43 @@ function getDataViewMemory0() {
|
|
|
2322
2439
|
return cachedDataViewMemory0;
|
|
2323
2440
|
}
|
|
2324
2441
|
|
|
2442
|
+
let cachedFloat32ArrayMemory0 = null;
|
|
2443
|
+
function getFloat32ArrayMemory0() {
|
|
2444
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
|
2445
|
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
2446
|
+
}
|
|
2447
|
+
return cachedFloat32ArrayMemory0;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
2451
|
+
function getFloat64ArrayMemory0() {
|
|
2452
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
2453
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
2454
|
+
}
|
|
2455
|
+
return cachedFloat64ArrayMemory0;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
let cachedInt32ArrayMemory0 = null;
|
|
2459
|
+
function getInt32ArrayMemory0() {
|
|
2460
|
+
if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {
|
|
2461
|
+
cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);
|
|
2462
|
+
}
|
|
2463
|
+
return cachedInt32ArrayMemory0;
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2325
2466
|
function getStringFromWasm0(ptr, len) {
|
|
2326
2467
|
ptr = ptr >>> 0;
|
|
2327
2468
|
return decodeText(ptr, len);
|
|
2328
2469
|
}
|
|
2329
2470
|
|
|
2471
|
+
let cachedUint32ArrayMemory0 = null;
|
|
2472
|
+
function getUint32ArrayMemory0() {
|
|
2473
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
2474
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
2475
|
+
}
|
|
2476
|
+
return cachedUint32ArrayMemory0;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2330
2479
|
let cachedUint8ArrayMemory0 = null;
|
|
2331
2480
|
function getUint8ArrayMemory0() {
|
|
2332
2481
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -2482,6 +2631,10 @@ function __wbg_finalize_init(instance, module) {
|
|
|
2482
2631
|
wasm = instance.exports;
|
|
2483
2632
|
wasmModule = module;
|
|
2484
2633
|
cachedDataViewMemory0 = null;
|
|
2634
|
+
cachedFloat32ArrayMemory0 = null;
|
|
2635
|
+
cachedFloat64ArrayMemory0 = null;
|
|
2636
|
+
cachedInt32ArrayMemory0 = null;
|
|
2637
|
+
cachedUint32ArrayMemory0 = null;
|
|
2485
2638
|
cachedUint8ArrayMemory0 = null;
|
|
2486
2639
|
return wasm;
|
|
2487
2640
|
}
|
|
Binary file
|
|
@@ -9,6 +9,7 @@ export const __wbg_view_free: (a: number, b: number) => void;
|
|
|
9
9
|
export const __wbg_virtualdataslice_free: (a: number, b: number) => void;
|
|
10
10
|
export const __wbg_virtualserver_free: (a: number, b: number) => void;
|
|
11
11
|
export const client___getClassname: (a: number, b: number) => void;
|
|
12
|
+
export const client___unsafe_open_view: (a: number, b: number, c: number) => number;
|
|
12
13
|
export const client_get_hosted_table_names: (a: number) => number;
|
|
13
14
|
export const client_handle_error: (a: number, b: number, c: number, d: number) => number;
|
|
14
15
|
export const client_handle_response: (a: number, b: number) => number;
|
|
@@ -57,6 +58,7 @@ export const table_update: (a: number, b: number, c: number) => number;
|
|
|
57
58
|
export const table_validate_expressions: (a: number, b: number) => number;
|
|
58
59
|
export const table_view: (a: number, b: number) => number;
|
|
59
60
|
export const view___get_model: (a: number) => number;
|
|
61
|
+
export const view___unsafe_get_name: (a: number, b: number) => void;
|
|
60
62
|
export const view_collapse: (a: number, b: number) => number;
|
|
61
63
|
export const view_column_paths: (a: number, b: number) => number;
|
|
62
64
|
export const view_delete: (a: number) => number;
|
|
@@ -80,6 +82,7 @@ export const view_to_csv: (a: number, b: number) => number;
|
|
|
80
82
|
export const view_to_json: (a: number, b: number) => number;
|
|
81
83
|
export const view_to_json_string: (a: number, b: number) => number;
|
|
82
84
|
export const view_to_ndjson: (a: number, b: number) => number;
|
|
85
|
+
export const view_with_typed_arrays: (a: number, b: number, c: number) => number;
|
|
83
86
|
export const virtualdataslice_fromArrowIpc: (a: number, b: number, c: number) => void;
|
|
84
87
|
export const virtualdataslice_new: (a: number) => number;
|
|
85
88
|
export const virtualdataslice_setBooleanCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -90,11 +93,11 @@ export const virtualdataslice_setIntegerCol: (a: number, b: number, c: number, d
|
|
|
90
93
|
export const virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
91
94
|
export const virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
92
95
|
export const virtualserver_new: (a: number, b: number) => void;
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
95
|
-
export const
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
96
|
+
export const __wasm_bindgen_func_elem_860: (a: number, b: number) => void;
|
|
97
|
+
export const __wasm_bindgen_func_elem_4015: (a: number, b: number) => void;
|
|
98
|
+
export const __wasm_bindgen_func_elem_11006: (a: number, b: number, c: number, d: number) => void;
|
|
99
|
+
export const __wasm_bindgen_func_elem_4032: (a: number, b: number, c: number) => void;
|
|
100
|
+
export const __wasm_bindgen_func_elem_1768: (a: number, b: number) => number;
|
|
98
101
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
99
102
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
100
103
|
export const __wbindgen_export3: (a: number) => void;
|