forked from duckdb/duckdb-wasm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjs-stubs.js
75 lines (75 loc) · 3.63 KB
/
js-stubs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html?highlight=addtolibrary#javascript-limits-in-library-files
addToLibrary({
duckdb_web_test_platform_feature__sig: 'ii',
duckdb_web_test_platform_feature: function (feature) {
return globalThis.DUCKDB_RUNTIME.testPlatformFeature(Module, feature);
},
duckdb_web_fs_get_default_data_protocol__sig: 'i',
duckdb_web_fs_get_default_data_protocol: function (Module) {
return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(Module);
},
duckdb_web_fs_file_open__sig: 'pii',
duckdb_web_fs_file_open: function (fileId, flags) {
return globalThis.DUCKDB_RUNTIME.openFile(Module, fileId, flags);
},
duckdb_web_fs_file_sync__sig: 'vi',
duckdb_web_fs_file_sync: function (fileId) {
return globalThis.DUCKDB_RUNTIME.syncFile(Module, fileId);
},
duckdb_web_fs_file_close__sig: 'vi',
duckdb_web_fs_file_close: function (fileId) {
return globalThis.DUCKDB_RUNTIME.closeFile(Module, fileId);
},
duckdb_web_fs_file_truncate__sig: 'vid',
duckdb_web_fs_file_truncate: function (fileId, newSize) {
return globalThis.DUCKDB_RUNTIME.truncateFile(Module, fileId, newSize);
},
duckdb_web_fs_file_read__sig: 'iipid',
duckdb_web_fs_file_read: function (fileId, buf, size, location) {
return globalThis.DUCKDB_RUNTIME.readFile(Module, fileId, buf, size, location);
},
duckdb_web_fs_file_write__sig: 'iipid',
duckdb_web_fs_file_write: function (fileId, buf, size, location) {
return globalThis.DUCKDB_RUNTIME.writeFile(Module, fileId, buf, size, location);
},
duckdb_web_fs_file_get_last_modified_time__sig: 'ii',
duckdb_web_fs_file_get_last_modified_time: function (fileId) {
return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(Module, fileId);
},
duckdb_web_fs_directory_exists__sig: 'ipi',
duckdb_web_fs_directory_exists: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.checkDirectory(Module, path, pathLen);
},
duckdb_web_fs_directory_create__sig: 'vpi',
duckdb_web_fs_directory_create: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.createDirectory(Module, path, pathLen);
},
duckdb_web_fs_directory_remove__sig: 'vpi',
duckdb_web_fs_directory_remove: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.removeDirectory(Module, path, pathLen);
},
duckdb_web_fs_directory_list_files__sig: 'ipi',
duckdb_web_fs_directory_list_files: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(Module, path, pathLen);
},
duckdb_web_fs_glob__sig: 'vpi',
duckdb_web_fs_glob: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.glob(Module, path, pathLen);
},
duckdb_web_fs_file_move__sig: 'vpipi',
duckdb_web_fs_file_move: function (from, fromLen, to, toLen) {
return globalThis.DUCKDB_RUNTIME.moveFile(Module, from, fromLen, to, toLen);
},
duckdb_web_fs_file_exists__sig: 'vpi',
duckdb_web_fs_file_exists: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.checkFile(Module, path, pathLen);
},
duckdb_web_fs_file_remove__sig: 'vpi',
duckdb_web_fs_file_remove: function (path, pathLen) {
return globalThis.DUCKDB_RUNTIME.removeFile(Module, path, pathLen);
},
duckdb_web_udf_scalar_call__sig: 'vpipipi',
duckdb_web_udf_scalar_call: function (funcId, descPtr, descSize, ptrsPtr, ptrsSize, response) {
return globalThis.DUCKDB_RUNTIME.callScalarUDF(Module, funcId, descPtr, descSize, ptrsPtr, ptrsSize, response);
},
});