⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 6 of about 6 for await (0.001 sec.)
Node.js Client (Neo) 11132
Installation To use the DuckDB Node.js client, visit the Node.js installation page . The latest stable version of the DuckDB Node.js (Neo) client is 2.0.0. An API for using DuckDB in Node.js . The primary package, @duckdb/node-api , is a hi ... duckdb.configurationOptionDescriptions()); Connect import { DuckDBConnection } from '@duckdb/node-api'; const connection = await DuckDBConnection.create(); This uses the default instance. For advanced usage, you can create instances explicitly. Create ... Instance import { DuckDBInstance } from '@duckdb/node-api'; Create with an in-memory database: const instance = await DuckDBInstance.create(':memory:'); Equivalent to the above: const instance = await DuckDBInstance.create(); Read from and ... write to a database file, which is created if needed: const instance = await DuckDBInstance.create('my_duckdb.db'); Set configuration options : const instance = await DuckDBInstance.create('my_duckdb ...
https://man.mtool.work/duckdb/2.0/clients/node_neo/overview.html
Run Queries 10272
Overview DuckDB-Wasm provides functions for querying data. Queries are run sequentially: First, create a connection by calling connect . Then, run queries by calling query to materialize the whole result, or send to fetch result chunks lazi ... ul for large results that you would rather stream than hold in memory all at once: // Create a new connection const conn = await db.connect(); // Either materialize the query result await conn.query<{ v: arrow.Int }>(` SELECT * FROM generate_series(1, ... 100) t(v) `); // ..., or fetch the result chunks lazily for await (const batch of await conn.send<{ v: arrow.Int }>(` SELECT * FROM generate_series(1, 100) t(v) `)) { // ... } // Close the ... connection to release memory await conn.close(); Prepared Statements Prepared statements let you parse a query once and run it repeatedly with different para ...
https://man.mtool.work/duckdb/2.0/clients/wasm/query.html
Import Data 10199
Overview DuckDB-Wasm has multiple ways to import data, depending on the format of the data. Importing happens in two steps. The data file is registered in a virtual file system using one of the register functions ( registerFileBuffer , regi ... ction. Open one with connect() , and close it when you are done to release memory: // Create a new connection const conn = await db.connect(); // ... import data // Close the connection to release memory await conn.close(); Apache Arrow Apache Arrow i ... 'apache-arrow'; const arrowTable = tableFromArrays({ id: [1, 2, 3], name: ['John', 'Jane', 'Jack'], age: [20, 21, 22], }); await conn.insertArrowTable(arrowTable, { name: 'arrow_table' }); To insert data that arrives as a raw Arrow IPC stream — for ex ... at/Columnar.html#ipc-streaming-format const EOS = new Uint8Array([255, 255, 255, 255, 0, 0, 0, 0]); const streamResponse = await fetch(`someapi`); const streamReader = streamResponse.body.getReader(); const streamInserts = []; while (true) { const { v ...
https://man.mtool.work/duckdb/2.0/clients/wasm/data_ingestion.html
Instantiate 9834
Overview DuckDB-Wasm can be instantiated in several ways, depending on how your application bundles and serves its assets. Each approach resolves the mainModule (the WebAssembly file) and the mainWorker (the worker script) for the browser's ... kdb-wasm'; const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles(); // Select a bundle based on browser checks const bundle = await duckdb.selectBundle(JSDELIVR_BUNDLES); const worker_url = URL.createObjectURL( new Blob([`importScripts("${bundle.mainWork ... er = new Worker(worker_url); const logger = new duckdb.ConsoleLogger(); const db = new duckdb.AsyncDuckDB(logger, worker); await db.instantiate(bundle.mainModule, bundle.pthreadWorker); URL.revokeObjectURL(worker_url); webpack When your application is ... duckdb-browser-eh.worker.js', import.meta.url).toString(), }, }; // Select a bundle based on browser checks const bundle = await duckdb.selectBundle(MANUAL_BUNDLES); // Instantiate the asynchronous version of DuckDB-Wasm const worker = new Worker(bund ...
https://man.mtool.work/duckdb/2.0/clients/wasm/instantiation.html
DuckDB Wasm Client 7403
Installation To use the DuckDB Wasm client, visit the duckdb-wasm GitHub repository . The latest stable version of the DuckDB WebAssembly client is 2.0.0. DuckDB-Wasm is a version of DuckDB that has been compiled to WebAssembly , the portab ... roduction. import * as duckdb from '@duckdb/duckdb-wasm'; // Instantiate DuckDB-Wasm from a jsDelivr bundle const bundle = await duckdb.selectBundle(duckdb.getJsDelivrBundles()); // Worker scripts must be same-origin, so wrap the CDN worker in a Blob ... cript' }) ); const worker = new Worker(worker_url); const db = new duckdb.AsyncDuckDB(new duckdb.ConsoleLogger(), worker); await db.instantiate(bundle.mainModule, bundle.pthreadWorker); URL.revokeObjectURL(worker_url); // Open a connection and run a q ... uery const conn = await db.connect(); const result = await conn.query('SELECT 42 AS answer'); console.log(result.toArray()[0].answer); // prints 4 ...
https://man.mtool.work/duckdb/2.0/clients/wasm/overview.html
Swift Client 5940
DuckDB has a Swift client. See the announcement post for details. Instantiating DuckDB DuckDB supports both in-memory and persistent databases. To work with an in-memory database, run: let database = try Database(store: .inMemory) To work w ... inMemory) let connection = try database.connect() // Download the CSV from the exoplanet archive let (csvFileURL, _) = try await URLSession.shared.download( from: URL(string: "https://exoplanetarchive.ipac.caltech.edu/TAP/sync?query=select+pl_name+,+d ...
https://man.mtool.work/duckdb/2.0/clients/tertiary_clients/swift.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work