File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { query , Session } from "." ;
2
2
3
3
// Create a new session instance
4
- const session = new Session ( "/ tmp" ) ;
4
+ const session = new Session ( "./chdb-bun- tmp" ) ;
5
5
var result ;
6
6
7
7
// Test standalone query
Original file line number Diff line number Diff line change 1
1
import { dlopen , FFIType } from "bun:ffi" ;
2
- import fs from "fs" ;
2
+ import { rmdirSync , mkdtempSync } from 'fs' ;
3
3
4
4
const path = `chdb_bun.so` ;
5
5
@@ -39,7 +39,7 @@ class Session {
39
39
constructor ( path : string = "" ) {
40
40
if ( path === "" ) {
41
41
// Create a temporary directory
42
- this . path = fs . mkdtempSync ( "tmp-" ) ;
42
+ this . path = mkdtempSync ( "tmp-" ) ;
43
43
this . isTemp = true ;
44
44
} else {
45
45
this . path = path ;
@@ -49,7 +49,7 @@ class Session {
49
49
50
50
// Cleanup method to delete the temporary directory
51
51
cleanup ( ) {
52
- fs . rmdirSync ( this . path , { recursive : true } ) ;
52
+ rmdirSync ( this . path , { recursive : true , force : true } ) ;
53
53
}
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments