File tree 3 files changed +3
-11
lines changed
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 {
655
655
return copy ;
656
656
}
657
657
/** 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 > {
666
659
if ( file . startsWith ( "opfs://" ) ) {
667
660
return await this . prepareFileHandle ( file , DuckDBDataProtocol . BROWSER_FSACCESS ) ;
668
661
} else {
Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ export interface DuckDBBindings {
62
62
flushFiles ( ) : void ;
63
63
copyFileToPath ( name : string , path : string ) : void ;
64
64
copyFileToBuffer ( name : string ) : Uint8Array ;
65
- registerOPFSFileName ( file : string ) : void ;
66
- registerOPFSFileNameAsync ( file : string ) : Promise < void > ;
65
+ registerOPFSFileName ( file : string ) : Promise < void > ;
67
66
collectFileStatistics ( file : string , enable : boolean ) : void ;
68
67
exportFileStatistics ( file : string ) : FileStatistics ;
69
68
}
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ export abstract class AsyncDuckDBDispatcher implements Logger {
361
361
break ;
362
362
363
363
case WorkerRequestType . REGISTER_OPFS_FILE_NAME :
364
- await this . _bindings . registerOPFSFileNameAsync ( request . data [ 0 ] ) ;
364
+ await this . _bindings . registerOPFSFileName ( request . data [ 0 ] ) ;
365
365
this . sendOK ( request ) ;
366
366
break ;
367
367
You can’t perform that action at this time.
0 commit comments