NodeJS API
Version current
Version:

duckdb

Summary: these jsdoc annotations are still a work in progress - feedback and suggestions are welcome!

duckdb~Connection

Kind: inner class of duckdb

connection.run(sql, …params, callback) ⇒ void

Run a SQL statement and trigger a callback when done

Kind: instance method of Connection

Param Type
sql  
…params \*
callback  

connection.all(sql, …params, callback) ⇒ void

Run a SQL query and triggers the callback once for all result rows

Kind: instance method of Connection

Param Type
sql  
…params \*
callback  

connection.each(sql, …params, callback) ⇒ void

Runs a SQL query and triggers the callback for each result row

Kind: instance method of Connection

Param Type
sql  
…params \*
callback  

connection.stream(sql, …params)

Kind: instance method of Connection

Param Type
sql  
…params \*

connection.register(name, return_type, fun) ⇒ void

Register a User Defined Function

Kind: instance method of Connection
Note: this follows the wasm udfs somewhat but is simpler because we can pass data much more cleanly

Param
name
return_type
fun

connection.prepare(sql, …params, callback) ⇒ Statement

Prepare a SQL query for execution

Kind: instance method of Connection

Param Type
sql  
…params \*
callback  

connection.exec(sql, …params, callback) ⇒ void

Execute a SQL query

Kind: instance method of Connection

Param Type
sql  
…params \*
callback  

connection.register_bulk(name, return_type, callback) ⇒ void

Register a User Defined Function

Kind: instance method of Connection

Param
name
return_type
callback

connection.unregister(name, return_type, callback) ⇒ void

Unregister a User Defined Function

Kind: instance method of Connection

Param
name
return_type
callback

duckdb~Statement

Kind: inner class of duckdb

statement.get()

Not implemented

Kind: instance method of Statement

statement.run(sql, …params, callback) ⇒ void

Kind: instance method of Statement

Param Type
sql  
…params \*
callback  

statement.all(sql, …params, callback) ⇒ void

Kind: instance method of Statement

Param Type
sql  
…params \*
callback  

statement.each(sql, …params, callback) ⇒ void

Kind: instance method of Statement

Param Type
sql  
…params \*
callback  

statement.finalize(sql, …params, callback) ⇒ void

Kind: instance method of Statement

Param Type
sql  
…params \*
callback  

statement.stream(sql, …params)

Kind: instance method of Statement

Param Type
sql  
…params \*

duckdb~QueryResult

Kind: inner class of duckdb

queryResult.nextChunk() ⇒

Kind: instance method of QueryResult
Returns: data chunk

queryResult.asyncIterator()

Kind: instance method of QueryResult

duckdb~Database

Main database interface

Kind: inner property of duckdb

database.close(callback) ⇒ void

Closes database instance

Kind: instance method of Database

Param
callback

database.close_internal(callback) ⇒ void

Internal method. Do not use, call Connection#close instead

Kind: instance method of Database

Param
callback

database.wait(callback) ⇒ void

Triggers callback when all scheduled database tasks have completed.

Kind: instance method of Database

Param
callback

database.serialize(callback) ⇒ void

TODO: what does this do?

Kind: instance method of Database

Param
callback

database.parallelize(callback) ⇒ void

TODO: what does this do?

Kind: instance method of Database

Param
callback

database.connect(path) ⇒ Connection

Create a new database connection

Kind: instance method of Database

Param Description
path the database to connect to, either a file path, or :memory:

database.interrupt(callback) ⇒ void

Supposedly interrupt queries, but currently does not do anything.

Kind: instance method of Database

Param
callback

database.prepare(sql) ⇒ Statement

Prepare a SQL query for execution

Kind: instance method of Database

Param
sql

database.run(sql, …params, callback) ⇒ void

Convenience method for Connection#run using a built-in default connection

Kind: instance method of Database

Param Type
sql  
…params \*
callback  

database.each(sql, …params, callback) ⇒ void

Convenience method for Connection#each using a built-in default connection

Kind: instance method of Database

Param Type
sql  
…params \*
callback  

database.all(sql, …params, callback) ⇒ void

Convenience method for Connection#apply using a built-in default connection

Kind: instance method of Database

Param Type
sql  
…params \*
callback  

database.exec(sql, …params, callback) ⇒ void

Convenience method for Connection#exec using a built-in default connection

Kind: instance method of Database

Param Type
sql  
…params \*
callback  

database.register(name, return_type, fun) ⇒ this

Convenience method for Connection#register using a built-in default connection

Kind: instance method of Database

Param
name
return_type
fun

database.unregister(name) ⇒ this

Convenience method for Connection#unregister using a built-in default connection

Kind: instance method of Database

Param
name

database.get()

Not implemented

Kind: instance method of Database

duckdb~ERROR : number

Check that errno attribute equals this to check for a duckdb error

Kind: inner constant of duckdb

duckdb~OPEN_READONLY : number

Open database in readonly mode

Kind: inner constant of duckdb

duckdb~OPEN_READWRITE : number

Currently ignored

Kind: inner constant of duckdb

duckdb~OPEN_CREATE : number

Currently ignored

Kind: inner constant of duckdb

duckdb~OPEN_FULLMUTEX : number

Currently ignored

Kind: inner constant of duckdb

duckdb~OPEN_SHAREDCACHE : number

Currently ignored

Kind: inner constant of duckdb

duckdb~OPEN_PRIVATECACHE : number

Currently ignored

Kind: inner constant of duckdb