File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -655,14 +655,7 @@ export abstract class DuckDBBindingsBase implements DuckDBBindings {
655655 return copy ;
656656 }
657657 /** Enable tracking of file statistics */
658- public registerOPFSFileName ( file : string ) : Promise < void > {
659- if ( file . startsWith ( "opfs://" ) ) {
660- return this . prepareFileHandle ( file , DuckDBDataProtocol . BROWSER_FSACCESS ) ;
661- } else {
662- throw new Error ( "Not an OPFS file name: " + file ) ;
663- }
664- }
665- public async registerOPFSFileNameAsync ( file : string ) : Promise < void > {
658+ public async registerOPFSFileName ( file : string ) : Promise < void > {
666659 if ( file . startsWith ( "opfs://" ) ) {
667660 return await this . prepareFileHandle ( file , DuckDBDataProtocol . BROWSER_FSACCESS ) ;
668661 } else {
Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ export interface DuckDBBindings {
6262 flushFiles ( ) : void ;
6363 copyFileToPath ( name : string , path : string ) : void ;
6464 copyFileToBuffer ( name : string ) : Uint8Array ;
65- registerOPFSFileName ( file : string ) : void ;
66- registerOPFSFileNameAsync ( file : string ) : Promise < void > ;
65+ registerOPFSFileName ( file : string ) : Promise < void > ;
6766 collectFileStatistics ( file : string , enable : boolean ) : void ;
6867 exportFileStatistics ( file : string ) : FileStatistics ;
6968}
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ export abstract class AsyncDuckDBDispatcher implements Logger {
361361 break ;
362362
363363 case WorkerRequestType . REGISTER_OPFS_FILE_NAME :
364- await this . _bindings . registerOPFSFileNameAsync ( request . data [ 0 ] ) ;
364+ await this . _bindings . registerOPFSFileName ( request . data [ 0 ] ) ;
365365 this . sendOK ( request ) ;
366366 break ;
367367
You can’t perform that action at this time.
0 commit comments