interface DuckDBBindings { cancelPendingQuery(conn): boolean; closePrepared(conn,
statement): void; collectFileStatistics(file,
enable): void; connect(): DuckDBConnection; copyFileToBuffer(name): Uint8Array; copyFileToPath(name,
path): void; createPrepared(conn,
text): number; createScalarFunction(conn,
name,
returns,
func): void; disconnect(conn): void; dropFile(name): void; dropFiles(): void; exportFileStatistics(file): FileStatistics; fetchQueryResults(conn): Uint8Array; flushFiles(): void; getFeatureFlags(): number; getTableNames(conn,
text): string[]; getVersion(): string; globFiles(path): WebFile[]; insertArrowFromIPCStream(conn,
buffer,
options?): void; insertCSVFromPath(conn,
path,
options): void; insertJSONFromPath(conn,
path,
options): void; instantiate(onProgress): Promise<DuckDBBindings>; open(config): void; pollPendingQuery(conn): null | Uint8Array; registerFileBuffer(name,
buffer): void; registerFileHandle<HandleType>(name,
handle,
protocol,
directIO): void; registerFileText(name,
text): void; registerFileURL(name,
url,
proto,
directIO): void; reset(): void; runPrepared(conn,
statement,
params): Uint8Array; runQuery(conn,
text): Uint8Array; sendPrepared(conn,
statement,
params): Uint8Array; startPendingQuery(conn,
text,
allowStreamResult): null | Uint8Array; tokenize(text): ScriptTokens; } Methods
cancelPendingQuery
- cancelPendingQuery(conn): boolean
Returns boolean
closePrepared
- closePrepared(conn, statement): void
Parameters
- conn: number
- statement: number
Returns void
collectFileStatistics
- collectFileStatistics(file, enable): void
Parameters
- file: string
- enable: boolean
Returns void
copyFileToBuffer
- copyFileToBuffer(name): Uint8Array
Returns Uint8Array
copyFileToPath
- copyFileToPath(name, path): void
Returns void
createPrepared
- createPrepared(conn, text): number
Returns number
createScalarFunction
- createScalarFunction(conn, name, returns, func): void
Parameters
- conn: number
- name: string
- returns: DataType<Type, any>
- func: ((...args) => void)
- (...args): void
Returns void
Returns void
disconnect
- disconnect(conn): void
Returns void
dropFile
- dropFile(name): void
Returns void
dropFiles
- dropFiles(): void
Returns void
fetchQueryResults
- fetchQueryResults(conn): Uint8Array
Returns Uint8Array
flushFiles
- flushFiles(): void
Returns void
getFeatureFlags
- getFeatureFlags(): number
Returns number
getTableNames
- getTableNames(conn, text): string[]
Returns string[]
getVersion
- getVersion(): string
Returns string
insertArrowFromIPCStream
- insertArrowFromIPCStream(conn, buffer, options?): void
Returns void
insertCSVFromPath
- insertCSVFromPath(conn, path, options): void
Returns void
insertJSONFromPath
- insertJSONFromPath(conn, path, options): void
Returns void
instantiate
- instantiate(onProgress): Promise<DuckDBBindings>
Parameters
- onProgress: ((p) => void)
open
- open(config): void
Returns void
pollPendingQuery
- pollPendingQuery(conn): null | Uint8Array
Returns null | Uint8Array
registerFileBuffer
- registerFileBuffer(name, buffer): void
Parameters
- name: string
- buffer: Uint8Array
Returns void
registerFileHandle
- registerFileHandle<HandleType>(name, handle, protocol, directIO): void
Returns void
registerFileText
- registerFileText(name, text): void
Returns void
registerFileURL
- registerFileURL(name, url, proto, directIO): void
Returns void
reset
- reset(): void
Returns void
runPrepared
- runPrepared(conn, statement, params): Uint8Array
Parameters
- conn: number
- statement: number
- params: any[]
Returns Uint8Array
runQuery
- runQuery(conn, text): Uint8Array
Returns Uint8Array
sendPrepared
- sendPrepared(conn, statement, params): Uint8Array
Parameters
- conn: number
- statement: number
- params: any[]
Returns Uint8Array
startPendingQuery
- startPendingQuery(conn, text, allowStreamResult): null | Uint8Array
Parameters
- conn: number
- text: string
- allowStreamResult: boolean
Returns null | Uint8Array