Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
e1arikawa committed Feb 19, 2025
1 parent 235869b commit 095e848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/duckdb-wasm/src/parallel/async_bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { InstantiationProgress } from '../bindings/progress';
import { arrowToSQLField } from '../json_typedef';
import { WebFile } from '../bindings/web_file';
import { DuckDBDataProtocol } from '../bindings';
import { getOPFSFiles, isOPFSProtocol } from "../utils/opfs_util";
import { searchOPFSFiles, isOPFSProtocol } from "../utils/opfs_util";

const TEXT_ENCODER = new TextEncoder();

Expand Down Expand Up @@ -700,7 +700,7 @@ export class AsyncDuckDB implements AsyncDuckDBBindings {
}

private async registerOPFSFileFromSQL(text: string) {
const files = getOPFSFiles(text);
const files = searchOPFSFiles(text);
const result: string[] = [];
for (const file of files) {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/duckdb-wasm/src/utils/opfs_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export function isOPFSProtocol(path: string): boolean {
return path.search(REGEX_OPFS_PROTOCOL) > -1;
}

export function getOPFSFiles(text: string) {
export function searchOPFSFiles(text: string) {
return [...text.matchAll(REGEX_OPFS_FILE)].map(match => match[1]);
}

0 comments on commit 095e848

Please sign in to comment.